Skip to content

Commit

Permalink
verion_code two cases in one line
Browse files Browse the repository at this point in the history
  • Loading branch information
jfederico committed May 12, 2020
1 parent 7411eba commit 94e5401
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cloudbuild-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ steps:
]
- name: 'gcr.io/cloud-builders/docker'
args: ['build',
'--build-arg',
'version_code=${BRANCH_NAME} (${SHORT_SHA})',
'--build-arg',
'if [ -z $TAG_NAME ]; then version_code=${BRANCH_NAME} (${SHORT_SHA}); else version_code=${TAG_NAME}; fi
'-t',
'gcr.io/$PROJECT_ID/${_URL}:${BRANCH_NAME}.${SHORT_SHA}',
'-t',
Expand All @@ -18,10 +18,10 @@ steps:
'.']
- name: 'gcr.io/cloud-builders/kubectl'
args: [
'set',
'image',
'deployment',
'${_APP_NAME}',
'set',
'image',
'deployment',
'${_APP_NAME}',
'${_IMAGE_NAME}=gcr.io/$PROJECT_ID/${_URL}:${BRANCH_NAME}.${SHORT_SHA}'
]
env:
Expand All @@ -30,4 +30,4 @@ steps:
images: [
'gcr.io/$PROJECT_ID/${_URL}:${BRANCH_NAME}.${SHORT_SHA}',
'gcr.io/$PROJECT_ID/${_URL}:latest'
]
]

0 comments on commit 94e5401

Please sign in to comment.