Skip to content

Commit

Permalink
Alter 'cp' step in cloudbuild.yaml (kubernetes#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
NimJay committed Jun 10, 2021
1 parent 9375217 commit 8965108
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions hello-app/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,11 @@ steps:
- '.'
dir: 'hello-app'

# Copy hello-app to /workspace.
# Create back-up of main.go and replace "Version: 1.0.0" with "Version: 2.0.0".
- name: 'bash'
args:
- '-c'
- cp -r hello-app/ /workspace

# Copy main.go to /workspace, with "Version: 1.0.0" replaced by "Version: 2.0.0".
- name: 'bash'
args:
- '-c'
- 'sed "s/Version: 1.0.0/Version: 2.0.0/" hello-app/main.go > /workspace/main.go'
- 'cp -p hello-app/main.go hello-app/main.go.bak && sed "s/Version: 1.0.0/Version: 2.0.0/g" hello-app/main.go.bak > hello-app/main.go'

# Build hello-app:2.0 from /workspace.
- name: 'gcr.io/cloud-builders/docker'
Expand Down

0 comments on commit 8965108

Please sign in to comment.