Skip to content

Commit

Permalink
[Release] Fix $(cat VERSION) not in bash script (#3924)
Browse files Browse the repository at this point in the history
* [Release] Fix $(cat VERSION) not in bash script

* Add doublequote
  • Loading branch information
Bobgy committed Jun 5, 2020
1 parent 62959d5 commit b0466cb
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,28 @@ steps:
waitFor: ['preparePythonComponentSDK']

# Build the pipeline system images
- name: 'debian'
entrypoint: '/bin/bash'
args: ['-c', 'sed -i -e "s/ARG DATE/ENV DATE \"$(date -u)\"/" /workspace/frontend/Dockerfile']
id: 'prepareFrontend'
waitFor: ["-"]
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA',
'--build-arg', 'COMMIT_HASH=$COMMIT_SHA',
'--build-arg', 'TAG_NAME=$(cat /workspace/VERSION)',
'-f', '/workspace/frontend/Dockerfile', '/workspace']
entrypoint: /bin/bash
args:
- -ceux
- |
sed -i -e "s/ARG DATE/ENV DATE \"$(date -u)\"/" /workspace/frontend/Dockerfile
docker build -t gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA \
--build-arg COMMIT_HASH=$COMMIT_SHA \
--build-arg TAG_NAME="$(cat /workspace/VERSION)" \
-f /workspace/frontend/Dockerfile \
/workspace
id: 'buildFrontend'
waitFor: ['prepareFrontend']
waitFor: ['-']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA',
'--build-arg', 'COMMIT_SHA=$COMMIT_SHA',
'--build-arg', 'TAG_NAME=$(cat /workspace/VERSION)',
'-f', '/workspace/backend/Dockerfile', '/workspace']
entrypoint: /bin/bash
args:
- -ceux
- |
docker build -t gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA \
--build-arg COMMIT_SHA=$COMMIT_SHA \
--build-arg TAG_NAME="$(cat /workspace/VERSION)" \
-f /workspace/backend/Dockerfile /workspace
id: 'buildApiServer'
waitFor: ['copyPythonSDK']

Expand Down

0 comments on commit b0466cb

Please sign in to comment.