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

Components - Updating component versions in samples during release #1283

Merged
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
13 changes: 13 additions & 0 deletions components/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@ git add --all
git commit --message "Updated component images to version $COMMIT_SHA"
image_update_commit_sha=$(git rev-parse HEAD)

# Updating the samples to use the updated components
git diff HEAD~1 HEAD --name-only | while read component_file; do
echo $component_file
find components samples -type f | while read file; do
sed -i -E "s|(https://raw.githubusercontent.com/kubeflow/pipelines/)[^/]+(/$component_file)|\1${image_update_commit_sha}\2|g" "$file";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this commit sha will be the same after the PR is merged into master?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this commit sha will be the same after the PR is merged into master?

The original commit remains accessible even if the branch was merged and deleted.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

/lgtm

done
done

# Checking-in the component changes
git add --all
git commit --message "Updated components to version $image_update_commit_sha"
component_update_commit_sha=$(git rev-parse HEAD)

# Pushing the changes upstream
read -p "Do you want to push the new branch to upstream to create a PR? [y|n]"
if [ "$REPLY" != "y" ]; then
Expand Down