Add subscription based promotions
This clears up the promotions a bit by making it cleaner and easier to read.
@@ -58,55 +58,45 @@ pipelines:
env:
- CHANNEL: dev
-# These actions are taken when `/expeditor promote` is run from Slack
promote:
-# actions is deprecated. we need to switch to subscription model
+ channels:
+ - dev
+ - acceptance
+ - current
+ - stable
+
+staging_areas:
+ - post_merge:
+ workload: pull_request_merged:chef/automate:master:*
+
+subscriptions:
+ # dev -> acceptance promotion
+ # These actions are taken when `/expeditor promote` is run from Slack
+ - workload: project_promoted:{{agent_id}}:dev:*
actions:
- bash:.expeditor/promote-hab-pkgs-and-cli.sh:
post_commit: true
- - bash:.expeditor/publish-release-notes.sh:
+ - purge_packages_chef_io_fastly:{{target_channel}}/automate/latest:
+ post_commit: true
+ - bash:.expeditor/announce-acceptance.sh:
+ post_commit: true
+ - trigger_pipeline:deploy/acceptance
+ - trigger_pipeline:deploy/automate-chef-io
+ # acceptance -> current promotion
+ - workload: project_promoted:{{agent_id}}:acceptance:*
+ actions:
+ - bash:.expeditor/promote-hab-pkgs-and-cli.sh:
post_commit: true
- only_if_conditions:
- - value_one: "{{target_channel}}"
- operator: equals
- value_two: current
- purge_packages_chef_io_fastly:{{target_channel}}/automate/latest:
post_commit: true
+ - bash:.expeditor/publish-release-notes.sh:
+ post_commit: true
- bash:.expeditor/announce-release.sh:
post_commit: true
- only_if_conditions:
- - value_one: "{{target_channel}}"
- operator: equals
- value_two: current
- bash:.expeditor/push-git-tag.sh:
post_commit: true
- only_if_conditions:
- - value_one: "{{target_channel}}"
- operator: equals
- value_two: current
- - bash:.expeditor/announce-acceptance.sh:
- post_commit: true
- only_if_conditions:
- - value_one: "{{target_channel}}"
- operator: equals
- value_two: acceptance
- - trigger_pipeline:deploy/acceptance:
- only_if_conditions:
- - value_one: "{{target_channel}}"
- operator: equals
- value_two: acceptance
- trigger_pipeline:deploy/automate-chef-io
- channels:
- - dev
- - acceptance
- - current
- - stable
-
-staging_areas:
- - post_merge:
- workload: pull_request_merged:chef/automate:master:*
-subscriptions:
# These actions are taken, in order they are specified, anytime a Pull Request is merged.
- workload: staged_workload_released:chef/automate:master:post_merge:*
actions:
