Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for skip, skip_from, and start_from for flows #3832

Closed
wants to merge 34 commits into from

Conversation

jlantz
Copy link
Contributor

@jlantz jlantz commented Sep 19, 2024

This PR adds new options when defining and running flows to skip steps.

In cci:

$ cci flow info ci_feature_2gp
An update to CumulusCI is available. To install the update, run this command: pip install --upgrade cumulusci
Description: Install as a managed 2gp package and run Apex tests. Intended for use after build_feature_test_package.

Flow Steps
1) flow: install_2gp_commit [from current folder]
    1) task: github_package_data
       options:
           context: $project_config.project__git__2gp_context
    2) flow: dependencies
        1) task: update_dependencies
           options:
               resolution_strategy: commit_status
               dependencies: ^^github_package_data.dependencies
        2) task: deploy_pre
           options:
               path: unpackaged/pre
    3) task: install_managed
       options:
           version: ^^github_package_data.version_id
2) flow: config_apextest
    1) task: deploy_post
       options:
           path: unpackaged/post
    2) task: update_admin_profile
3) task: run_tests

$ cci flow info ci_feature_2gp --skip deploy_post,run_tests
Description: Install as a managed 2gp package and run Apex tests. Intended for use after build_feature_test_package.

Flow Steps
1) flow: install_2gp_commit [from current folder]
    1) task: github_package_data
       options:
           context: $project_config.project__git__2gp_context
    2) flow: dependencies
        1) task: update_dependencies
           options:
               resolution_strategy: commit_status
               dependencies: ^^github_package_data.dependencies
        2) task: deploy_pre
           options:
               path: unpackaged/pre
    3) task: install_managed
       options:
           version: ^^github_package_data.version_id
2) flow: config_apextest [skip]
    1) task: deploy_post [skip]
    2) task: update_admin_profile
3) task: run_tests [skip]

$ cci flow info ci_feature_2gp --skip-from config_apextest
Description: Install as a managed 2gp package and run Apex tests. Intended for use after build_feature_test_package.

Flow Steps
1) flow: install_2gp_commit [from current folder]
    1) task: github_package_data
       options:
           context: $project_config.project__git__2gp_context
    2) flow: dependencies
        1) task: update_dependencies
           options:
               resolution_strategy: commit_status
               dependencies: ^^github_package_data.dependencies
        2) task: deploy_pre
           options:
               path: unpackaged/pre
    3) task: install_managed
       options:
           version: ^^github_package_data.version_id
2) task: config_apextest [skip]
3) task: run_tests [skip]

$ cci flow info ci_feature_2gp --start-from config_apextest
Description: Install as a managed 2gp package and run Apex tests. Intended for use after build_feature_test_package.

Flow Steps
1) task: install_2gp_commit [from current folder] [skip]
2) flow: config_apextest
    1) task: deploy_post
       options:
           path: unpackaged/post
    2) task: update_admin_profile
3) task: run_tests

And in cumulusci.yml flow definitions:

flows:
     ci_feature_2gp_no_test:
         description: Run ci_feature_2gp without tests
         options:
             steps:
                 1:
                     flow: ci_feature_2gp
                     skip:
                         - run_tests

skip_from and start_from also work in yaml.

Still needs test coverage but otherwise should be a backwards compatible change that unlocks a lot of potential for restructuring CI/CD workflows.

jlantz and others added 30 commits December 13, 2023 09:43
cumulusci.yml to list python modules to load. If a plugin is specified
and not available for import, an error will be thrown. Plugin packages
are scanned for a cumulusci.yml in their root directory and if found, it
is added to the merge stack for cumulusci.yml before the project config.
integration for Job Summary Reports in GitHub Actions runtime
environments
Working parent branch resolver, need to write test coverage
Working implementation of dynamic package version naming for 1GP, needs tests
Output GitHub Actions Job Summary Report for run_tests
Add support for --load-yml on cci task and cci flow commands
… update template to match default version numbering for betas
…ld-api

Fix issue with 2GP package uploads for packages with API version older than 52.0
Never set <fullName> in 2gp package generation manifests
fix: added comma, removed additional None param
Add Snapshot Tasks to D2X's cumulusci-next Docker build for Use Before Release in CumulusCI
…niversal config and added `snapshot_context` field to git schema
Add create_snapshot and github_pull_request_snapshot tasks to universal config
@jlantz jlantz requested a review from a team as a code owner September 19, 2024 14:52
Copy link

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Jason Lantz <j***@j***.localdomain>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

Copy link

Thanks for the contribution! Before we can merge this, we need @agaudoncr to sign the Salesforce Inc. Contributor License Agreement.

@agaudoncr
Copy link

agaudoncr commented Sep 19, 2024 via email

@jlantz
Copy link
Contributor Author

jlantz commented Sep 19, 2024

Oops, need to rebase this branch, closing :)

@jlantz jlantz closed this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants