Skip to content

Modularize workflows for feature 2gp#56

Open
jlantz wants to merge 11 commits intocumulusci-next-snapshotsfrom
jlantz/modularize-workflows
Open

Modularize workflows for feature 2gp#56
jlantz wants to merge 11 commits intocumulusci-next-snapshotsfrom
jlantz/modularize-workflows

Conversation

@jlantz
Copy link
Copy Markdown
Contributor

@jlantz jlantz commented Oct 31, 2024

Add new modular workflows and reusable jobs to streamline and standardize common tasks.

  • Documentation

    • Add a section in docs/architecture/workflows.md describing the new modular workflows and reusable jobs.
  • New Workflows

    • Add .github/workflows/check-no-org.yml to check anything that doesn't require an org.
    • Add .github/workflows/create-feature-test-package.yml to create the feature test package.
    • Add .github/workflows/create-test-scratch-org.yml to create the test scratch org and its environment using d2x commands.
    • Add .github/workflows/configure-org-for-testing.yml to configure the org for testing by running cci flow run ci_feature_2gp --skip-from run-tests.
    • Add .github/workflows/run-tests.yml to run the tests by executing cci flow run ci_feature_2gp --start-from.
    • Add .github/workflows/dispose-org.yml to dispose of the org with options for keeping the org based on conditions and snapshotting the org using CumulusCI.
    • Add .github/workflows/create-org.yml to create orgs using a scratchdef path, CLI options, or a CumulusCI scratch profile name, and run against a DevHub environment with D2X_SF_ROLE=devhub-scratch.

For more details, open the Copilot Workspace session.

jlantz added 11 commits October 31, 2024 13:28
Add new modular workflows and reusable jobs to streamline and standardize common tasks.

* **Documentation**
  - Add a section in `docs/architecture/workflows.md` describing the new modular workflows and reusable jobs.

* **New Workflows**
  - Add `.github/workflows/check-no-org.yml` to check anything that doesn't require an org.
  - Add `.github/workflows/create-feature-test-package.yml` to create the feature test package.
  - Add `.github/workflows/create-test-scratch-org.yml` to create the test scratch org and its environment using d2x commands.
  - Add `.github/workflows/configure-org-for-testing.yml` to configure the org for testing by running `cci flow run ci_feature_2gp --skip-from run-tests`.
  - Add `.github/workflows/run-tests.yml` to run the tests by executing `cci flow run ci_feature_2gp --start-from`.
  - Add `.github/workflows/dispose-org.yml` to dispose of the org with options for keeping the org based on conditions and snapshotting the org using CumulusCI.
  - Add `.github/workflows/create-org.yml` to create orgs using a scratchdef path, CLI options, or a CumulusCI scratch profile name, and run against a DevHub environment with `D2X_SF_ROLE=devhub-scratch`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/muselab-d2x/d2x/tree/cumulusci-next-snapshots?shareId=XXXX-XXXX-XXXX-XXXX).
* **Workflow setup**
  - Define the workflow to run on push events to the main and feature branches
  - Set up a job with a matrix strategy to test different scratch org creation options

* **Steps**
  - Check out the repository
  - Attempt scratch org creation using various input options
  - Check the expected output to ensure the commands fail without devhub credentials
* Update workflow names in `.github/workflows/check-no-org.yml`
* Update workflow names in `.github/workflows/create-feature-test-package.yml`
* Update workflow names in `.github/workflows/create-test-scratch-org.yml`
* Update workflow names in `.github/workflows/configure-org-for-testing.yml`
* Update workflow names in `.github/workflows/run-tests.yml`
* Update workflow names in `.github/workflows/dispose-org.yml`
* Update workflow names in `.github/workflows/create-org.yml`
* Update workflow names in `.github/workflows/test-scratch-org-creation.yml`
…quests

* Change the event trigger from `push` to `pull-request`
* Remove the branch specification for the `push` event
…ific trigger for `push` event

* Remove `branches` condition under `push` event to allow the workflow to run on all branches
* Add `flow_name` input parameter with default value `ci_feature_2gp`
* Update `cci flow run` command to use the `flow_name` input parameter
* Change `${{ secrets.github-token }}` to `${{ secrets.GITHUB_TOKEN }}` in the credentials section
…s" using the collect/check/run sequence

* **CommonBaseModel**: Subclass BaseModel to allow arbitrary types
* **CollectStep**: Add model with key, type, and config options
* **CheckAction**: Add model with key, type, and config options
* **CollectPhase**: Add model with a list of collect steps
* **CheckPhase**: Add model with a list of check actions
* **RunStep**: Add model with step_type and config options, including validation
* **RunPhase**: Add model with dependencies, deploy_metadata, install_packages, setup_steps, config_steps, data_steps, and testing_steps
* **Plan**: Add model with collect, check, and run phases
* Add `name` field with a description to the Plan model
* Add `description` field with a default value of None to the Plan model
* Rename workflow from "🏗️ Create Test Scratch Org" to "🏗️ Create Scratch Org"
* Rename job from "create-test-scratch-org" to "create-scratch-org"
* **Plan Structure**
  - Define the `ci_feature_2gp` plan with name and description
  - Add collect phase with steps to collect org info and metadata
  - Add check phase with actions to check org info and metadata
  - Add run phase with dependencies, deploy metadata, install packages, setup steps, config steps, data steps, and testing steps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant