9898 when :
9999 condition :
100100 all :
101+ deployLabel : " match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
101102 githubNotificationsEnabled : " '${{GITHUB_NOTIFICATIONS_ENABLED}}' == 'true'"
102103
103104 push_image_commit :
@@ -108,6 +109,21 @@ steps:
108109 tags :
109110 - " ${{CF_REVISION}}"
110111
112+ wait :
113+ title : Wait
114+ stage : Deploy
115+ image : codefresh/cli:latest
116+ commands :
117+ - codefresh get builds --pipeline=destroy --pipeline=pull-request --branch=${{CF_BRANCH}} --status running --limit 1000 -o json | jq --arg id ${{CF_BUILD_ID}} -ser 'flatten|.[-1].id==$id'
118+ retry :
119+ maxAttempts : 10
120+ delay : 20
121+ exponentialFactor : 1.1
122+ when :
123+ condition :
124+ any :
125+ deployLabel : " match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
126+
111127 deploy_helmfile :
112128 title : Deploy with helmfile
113129 stage : Deploy
@@ -118,6 +134,10 @@ steps:
118134 - " echo 'Preparing to deploy ${{CF_REPO_NAME}}:${{CF_RELEASE_TAG}}'"
119135 # Deploy chart to cluster in a dedicated namespace
120136 - " /deploy/ctl --namespace=${{NAMESPACE}} rolling"
137+ when :
138+ condition :
139+ any :
140+ deployLabel : " match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
121141
122142 set_github_deployment_status_to_success :
123143 title : Set GitHub deployment status to "success"
@@ -136,6 +156,7 @@ steps:
136156 when :
137157 condition :
138158 all :
159+ deployLabel : " match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
139160 githubNotificationsEnabled : " '${{GITHUB_NOTIFICATIONS_ENABLED}}' == 'true'"
140161
141162 send_slack_notification :
@@ -151,4 +172,8 @@ steps:
151172 - GIT_BRANCH_TAG=${{CF_BRANCH_TAG_NORMALIZED}}
152173 commands :
153174 - make codefresh/notify/slack/deploy/webapp GIT_COMMIT_TIMESTAMP=$((${{CF_BUILD_TIMESTAMP}}/1000))
175+ when :
176+ condition :
177+ any :
178+ deployLabel : " match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true"
154179
0 commit comments