Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce steps for release cloud build yaml #3331

Merged
merged 2 commits into from
Mar 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 16 additions & 41 deletions .release.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,62 +28,46 @@ steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA']
id: 'pullFrontend'
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA', 'gcr.io/ml-pipeline/frontend:$TAG_NAME']
id: 'tagFrontendVersionNumber'
waitFor: ['pullFrontend']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA', 'gcr.io/ml-pipeline/frontend:$COMMIT_SHA']
id: 'tagFrontendCommitSHA'
waitFor: ['pullFrontend']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA', 'gcr.io/ml-pipeline/google/pipelines/frontend:$TAG_NAME']
id: 'tagFrontendForMarketplace'
waitFor: ['pullFrontend']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA', 'gcr.io/ml-pipeline/google/pipelines-test/frontend:$TAG_NAME']
id: 'tagFrontendForMarketplaceTest'
waitFor: ['pullFrontend']
- id: 'tagFrontendForMarketplaceMajorMin'
waitFor: ['pullFrontend', 'parseMajorMinorVersion']
name: 'gcr.io/cloud-builders/docker'
entrypoint: bash
args:
- -ceux
- |
docker tag gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA gcr.io/ml-pipeline/frontend:$TAG_NAME
docker tag gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA gcr.io/ml-pipeline/frontend:$COMMIT_SHA
docker tag gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA gcr.io/ml-pipeline/google/pipelines/frontend:$TAG_NAME
docker tag gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA gcr.io/ml-pipeline/google/pipelines-test/frontend:$TAG_NAME
docker tag gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA gcr.io/ml-pipeline/google/pipelines/frontend:$(cat /workspace/mm.ver)
docker tag gcr.io/$PROJECT_ID/frontend:$COMMIT_SHA gcr.io/ml-pipeline/google/pipelines-test/frontend:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/frontend:$TAG_NAME
docker push gcr.io/ml-pipeline/frontend:$COMMIT_SHA
docker push gcr.io/ml-pipeline/google/pipelines/frontend:$TAG_NAME
docker push gcr.io/ml-pipeline/google/pipelines-test/frontend:$TAG_NAME
docker push gcr.io/ml-pipeline/google/pipelines/frontend:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/google/pipelines-test/frontend:$(cat /workspace/mm.ver)

- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA']
id: 'pullAPIServer'
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA', 'gcr.io/ml-pipeline/api-server:$TAG_NAME']
id: 'tagAPIServerVersionNumber'
waitFor: ['pullAPIServer']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA', 'gcr.io/ml-pipeline/api-server:$COMMIT_SHA']
id: 'tagAPIServerCommitSHA'
waitFor: ['pullAPIServer']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA', 'gcr.io/ml-pipeline/google/pipelines/apiserver:$TAG_NAME']
id: 'tagAPIServerForMarketplace'
waitFor: ['pullAPIServer']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA', 'gcr.io/ml-pipeline/google/pipelines-test/apiserver:$TAG_NAME']
id: 'tagAPIServerForMarketplaceTest'
waitFor: ['pullAPIServer']
- id: 'tagAPIServerForMarketplaceMajorMinor'
waitFor: ['pullAPIServer', 'parseMajorMinorVersion']
name: 'gcr.io/cloud-builders/docker'
entrypoint: bash
args:
- -ceux
- |
docker tag gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA 'gcr.io/ml-pipeline/api-server:$TAG_NAME'
docker tag gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA 'gcr.io/ml-pipeline/api-server:$COMMIT_SHA'
docker tag gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA 'gcr.io/ml-pipeline/google/pipelines/apiserver:$TAG_NAME'
docker tag gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA 'gcr.io/ml-pipeline/google/pipelines-test/apiserver:$TAG_NAME'
docker tag gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA gcr.io/ml-pipeline/google/pipelines/apiserver:$(cat /workspace/mm.ver)
docker tag gcr.io/$PROJECT_ID/api-server:$COMMIT_SHA gcr.io/ml-pipeline/google/pipelines-test/apiserver:$(cat /workspace/mm.ver)
docker push 'gcr.io/ml-pipeline/api-server:$TAG_NAME'
docker push 'gcr.io/ml-pipeline/api-server:$COMMIT_SHA'
docker push 'gcr.io/ml-pipeline/google/pipelines/apiserver:$TAG_NAME'
docker push 'gcr.io/ml-pipeline/google/pipelines-test/apiserver:$TAG_NAME'
docker push gcr.io/ml-pipeline/google/pipelines/apiserver:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/google/pipelines-test/apiserver:$(cat /workspace/mm.ver)

Expand Down Expand Up @@ -590,10 +574,6 @@ steps:


images:
- 'gcr.io/ml-pipeline/frontend:$TAG_NAME'
- 'gcr.io/ml-pipeline/frontend:$COMMIT_SHA'
- 'gcr.io/ml-pipeline/api-server:$TAG_NAME'
- 'gcr.io/ml-pipeline/api-server:$COMMIT_SHA'
- 'gcr.io/ml-pipeline/scheduledworkflow:$TAG_NAME'
- 'gcr.io/ml-pipeline/scheduledworkflow:$COMMIT_SHA'
- 'gcr.io/ml-pipeline/persistenceagent:$TAG_NAME'
Expand All @@ -606,8 +586,6 @@ images:
- 'gcr.io/ml-pipeline/visualization-server:$COMMIT_SHA'
- 'gcr.io/ml-pipeline/metadata-writer:$TAG_NAME'
- 'gcr.io/ml-pipeline/metadata-writer:$COMMIT_SHA'
- 'gcr.io/ml-pipeline/google/pipelines/frontend:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines/apiserver:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines/scheduledworkflow:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines/viewercrd:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines/persistenceagent:$TAG_NAME'
Expand All @@ -625,8 +603,6 @@ images:
- 'gcr.io/ml-pipeline/google/pipelines/cacheserver:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines/cachedeployer:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines-test/frontend:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines-test/apiserver:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines-test/scheduledworkflow:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines-test/viewercrd:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines-test/persistenceagent:$TAG_NAME'
Expand All @@ -645,4 +621,3 @@ images:
- 'gcr.io/ml-pipeline/google/pipelines-test/deployer:$TAG_NAME'
- 'gcr.io/ml-pipeline/google/pipelines-test:$TAG_NAME'
timeout: '1200s'