Skip to content

Commit

Permalink
chore: update to use scheduled pipeline (2.x) (#23811)
Browse files Browse the repository at this point in the history
* chore: update to use scheduled pipeline

* chore: add documentation to scheduled pipelines
  • Loading branch information
bnpfeife committed Oct 18, 2022
1 parent a0c3703 commit 89d9207
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ parameters:
type: string
default: go1.18.6-9c97f2f2903566a00bd4b00184aeca0c813adda0

workflow:
type: string
default: build

executors:
cross-builder:
docker:
Expand Down Expand Up @@ -64,6 +68,8 @@ nofork_filter: &nofork_filter
workflows:
version: 2
build:
when:
equal: [ << pipeline.parameters.workflow >>, build ]
jobs:
- test-race:
<<: *any_filter
Expand Down Expand Up @@ -200,13 +206,17 @@ workflows:
- aws-destroy-by-date

nightly:
triggers:
- schedule:
cron: "0 5 * * *"
filters:
branches:
only:
- master
when:
and:
# This requires a pipeline trigger with a custom "workflow" parameter
# set to "nightly". Since we want to trigger this workflow on several
# branches, we cannot use the trigger name as suggested by the
# documentation.
#
# For more information:
# https://circleci.com/docs/scheduled-pipelines/
- equal: [ << pipeline.trigger_source >>, scheduled_pipeline ]
- equal: [ << pipeline.parameters.workflow >>, nightly ]
jobs:
- changelog
- s3-publish-changelog:
Expand Down

0 comments on commit 89d9207

Please sign in to comment.