File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 5151 run : |
5252 gcloud builds submit . \
5353 --config=cloudbuild.yaml \
54- --substitutions=_COMMIT_SHA=${{ github.sha }} \
55- --substitutions=_VERSION=${{ github.ref_name }}
54+ --substitutions=COMMIT_SHA=${{ github.sha }},_VERSION=${{ github.ref_name }}
5655
5756 deploy-staging :
5857 name : Deploy on staging environment (staging.serverest.dev)
Original file line number Diff line number Diff line change 44- name : ' gcr.io/cloud-builders/docker'
55 args : ['build',
66 ' --file' , 'Dockerfile',
7- ' --tag' , 'gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:${_COMMIT_SHA} ',
7+ ' --tag' , 'gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:$COMMIT_SHA ',
88 ' --tag' , 'gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:${_VERSION}',
9- ' --label' , 'org.opencontainers.image.revision=${_COMMIT_SHA} ',
9+ ' --label' , 'org.opencontainers.image.revision=$COMMIT_SHA ',
1010 ' --label' , 'org.opencontainers.image.source=github.com/ServeRest/ServeRest',
1111 ' .' ]
1212# Push the container image to Container Registry
1313- name : ' gcr.io/cloud-builders/docker'
14- args : ['push', 'gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:${_COMMIT_SHA} ']
14+ args : ['push', 'gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:$COMMIT_SHA ']
1515- name : ' gcr.io/cloud-builders/docker'
1616 args : ['push', 'gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:${_VERSION}']
1717substitutions : # default values
1818 _PROJECT_ID : serverest
1919 _SERVICE_NAME : app
2020images : [
21- ' gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:${_COMMIT_SHA} ' ,
21+ ' gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:$COMMIT_SHA ' ,
2222 ' gcr.io/${_PROJECT_ID}/${_SERVICE_NAME}:${_VERSION}'
2323]
You can’t perform that action at this time.
0 commit comments