-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add script for component image release #571
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ spec: | |
spec: | ||
containers: | ||
- name: deploy | ||
image: gcr.io/ml-pipeline/bootstrapper:0.1.4 #TODO-release: update the release tag for the next release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe use hash for the bootstrapper image? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this change is specifically for sample images. the bootstrapper is deprecating. this file should be removed in a separate PR |
||
image: gcr.io/ml-pipeline/bootstrapper:0.1.4 | ||
imagePullPolicy: 'Always' | ||
# Additional parameter available: | ||
args: [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright 2018 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This script automated the process to release the component images. | ||
# To run it, find a good release candidate commit SHA from ml-pipeline-staging project, | ||
# and provide a full github COMMIT SHA to the script. E.g. | ||
# ./release.sh 2118baf752d3d30a8e43141165e13573b20d85b8 | ||
# The script copies the images from staging to prod, and update the local code. | ||
# You can then send a PR using your local branch. | ||
|
||
set -xe | ||
|
||
images=( | ||
"ml-pipeline-dataflow-tf-predict" | ||
"ml-pipeline-dataflow-tfdv" | ||
"ml-pipeline-dataflow-tft" | ||
"ml-pipeline-dataflow-tfma" | ||
"ml-pipeline-kubeflow-deployer" | ||
"ml-pipeline-kubeflow-tf-trainer" | ||
"ml-pipeline-kubeflow-tf" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you help to add one more image here called: ml-pipeline-kubeflow-tf-trainer-gpu? |
||
"ml-pipeline-dataproc-analyze" | ||
"ml-pipeline-dataproc-create-cluster" | ||
"ml-pipeline-dataproc-delete-cluster" | ||
"ml-pipeline-dataproc-predict" | ||
"ml-pipeline-dataproc-transform" | ||
"ml-pipeline-dataproc-train" | ||
"resnet-deploy" | ||
"resnet-preprocess" | ||
"resnet-train" | ||
"ml-pipeline-local-confusion-matrix" | ||
"ml-pipeline-local-roc" | ||
) | ||
|
||
COMMIT_SHA=$1 | ||
FROM_GCR_PREFIX='gcr.io/ml-pipeline-staging/' | ||
TO_GCR_PREFIX='gcr.io/ml-pipeline/' | ||
PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
|
||
for image in "${images[@]}" | ||
do | ||
TARGET_IMAGE_BASE=${TO_GCR_PREFIX}${image} | ||
TARGET_IMAGE=${TARGET_IMAGE_BASE}:${COMMIT_SHA} | ||
|
||
# Move image from staging to prod GCR | ||
gcloud container images add-tag --quiet \ | ||
${FROM_GCR_PREFIX}${image}:${COMMIT_SHA} ${TARGET_IMAGE} | ||
|
||
# Update the code | ||
find "${PARENT_PATH}/../samples" -type f | while read file; do sed -i -e "s|${TARGET_IMAGE_BASE}:\([a-zA-Z0-9_.-]\)\+|${TARGET_IMAGE}|g" "$file"; done | ||
find "${PARENT_PATH}" -type f | while read file; do sed -i -e "s|${TARGET_IMAGE_BASE}:\([a-zA-Z0-9_.-]\)\+|${TARGET_IMAGE}|g" "$file"; done | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not do all the job in the release yaml in the release script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the system images doesn't have the double release problem.