File tree Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change 44 - Prepare
55 - Build
66 - Push
7+ - Deploy
78
89steps :
910 main_clone :
@@ -31,3 +32,16 @@ steps:
3132 registry : dockerhub
3233 tags :
3334 - " ${{CF_REVISION}}"
35+
36+ deploy_master :
37+ title : Deploying to Master
38+ stage : " Deploy"
39+ image : ' codefresh/cli:latest'
40+ environment :
41+ STAGE : master
42+ commands :
43+ - codefresh run ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/deploy-${{STAGE}} -d -b=${{CF_BRANCH}} -v CF_RELEASE_TAG=${{CF_REVISION}} -v CF_PRERELEASE_FLAG=${{CF_PRERELEASE_FLAG}} -v STAGE=${{STAGE}}
44+ when :
45+ branch :
46+ only :
47+ - master
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ version: '1.0'
22
33stages :
44 - Promote
5- - Deploy Staging
6- - Deploy Production
5+ - Staging
6+ - Production
77
88steps :
99 main_clone :
@@ -34,18 +34,28 @@ steps:
3434 tags :
3535 - " ${{CF_RELEASE_TAG}}"
3636
37- deploy :
38- title : Deploy Release
39- stage : " Deploy"
37+ deploy_staging_confirmation :
38+ type : pending-approval
39+ title : Deploy Release to Staging?
40+ stage : Staging
41+
42+ deploy_staging :
43+ title : Deploy to Staging
44+ stage : " Staging"
4045 image : ' codefresh/cli:latest'
4146 environment :
4247 STAGE : staging
4348 commands :
4449 - codefresh run ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/deploy-${{STAGE}} -d -b=${{CF_BRANCH}} -v CF_RELEASE_TAG=${{CF_RELEASE_TAG}} -v CF_PRERELEASE_FLAG=${{CF_PRERELEASE_FLAG}} -v STAGE=${{STAGE}}
4550
46- deploy :
51+ deploy_production_confirmation :
52+ type : pending-approval
53+ title : Deploy Release to Production?
54+ stage : Production
55+
56+ deploy_production :
4757 title : Deploy Release to Production
48- stage : " Deploy Production"
58+ stage : " Production"
4959 image : ' codefresh/cli:latest'
5060 environment :
5161 STAGE : prod
You can’t perform that action at this time.
0 commit comments