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

ci: update env var for runtime version #530

Merged
merged 4 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Copy link
Member

Choose a reason for hiding this comment

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

I guess this was not intended.

14 changes: 7 additions & 7 deletions bin/update-proxy-versions.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
#!/usr/bin/env bash

# USAGE:
# > PROXY_VERSION=1.0.31 ./update-proxy-versions.sh
Copy link
Member

Choose a reason for hiding this comment

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

Should we rename the script, as well? (Preferably less broken than I did in the JVM SDK.)

Copy link
Member Author

Choose a reason for hiding this comment

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

# > RUNTIME_VERSION=1.0.31 ./update-proxy-versions.sh

# this script is meant to be used after a new Proxy version is out
# to facilitate the update of all the places where we usually depend on the latest version

# provide the new proxy version you want the project to be updated to
efgpinto marked this conversation as resolved.
Show resolved Hide resolved
if [[ -z "$PROXY_VERSION" ]]; then
echo "Must provide PROXY_VERSION in environment" 1>&2
if [[ -z "$RUNTIME_VERSION" ]]; then
echo "Must provide RUNTIME_VERSION in environment" 1>&2
exit 1
fi

cd ..

echo ">>> Updating docker image versions to $PROXY_VERSION"
echo ">>> Updating docker image versions to $RUNTIME_VERSION"
PROJS=$(find . -type f -name "docker-compose.yml")
for i in ${PROJS[@]}
do
echo "Updating Dockerfile for: $i"
sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)/gcr.io\/kalix-public\/kalix-runtime:$PROXY_VERSION/" $i
sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)/gcr.io\/kalix-public\/kalix-runtime:$RUNTIME_VERSION/" $i
rm $i.bak
done

echo ">>> Updating application.conf"
sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)\"/gcr.io\/kalix-public\/kalix-runtime:$PROXY_VERSION\"/" ./codegen/js-gen-cli/src/it/resources/application.conf
sed -i.bak "s/gcr.io\/kalix-public\/kalix-runtime:\(.*\)\"/gcr.io\/kalix-public\/kalix-runtime:$RUNTIME_VERSION\"/" ./codegen/js-gen-cli/src/it/resources/application.conf
rm ./codegen/js-gen-cli/src/it/resources/application.conf.bak

echo ">>> Updating config.json"
sed -i.bak "s/\"frameworkVersion\": \"\(.*\)\"/\"frameworkVersion\": \"$PROXY_VERSION\"/" ./sdk/config.json
sed -i.bak "s/\"frameworkVersion\": \"\(.*\)\"/\"frameworkVersion\": \"$RUNTIME_VERSION\"/" ./sdk/config.json
rm ./sdk/config.json.bak