CircleCI-Archived / api-preview-docs

In-progress docs about the pre-release preview of CircleCI API v2
72 stars 39 forks source link

Scheduled pipelines improvements #104

Open blag opened 2 years ago

blag commented 2 years ago

This PR fixes a few small things:

It also improves the conversion examples by also including the branch filtering criteria, converted to workflow filtering syntax.

Previously the converted examples did not include workflow filtering for the branch filtering present in the previous trigger syntax:

      daily-run-workflow:
        triggers:
          - schedule:
              # Every day, 0421Z.
              cron: "21 4 * * *"
              filters:      # <--
                branches:   # <--
                  only:     # <--
                    - main  # <-- These parts

Reviewers please pay special attention to the last example, because I'm not 100% sure if this is supported filtering syntax:

when:
  and:
    - not:
        equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
    - equal: [ "main", << pipeline.git.branch >> ]

If I have missed the detailed documentation on the when and unless clauses, please point me to them.

Edit: Completeness and grammar.

blag commented 1 year ago

Is this getting merged anytime soon?