From b290556dbc8e7aab4c49f3ac2deb22e638127195 Mon Sep 17 00:00:00 2001 From: Eduardo Pinto Date: Thu, 21 Dec 2023 10:43:27 +0000 Subject: [PATCH 1/4] ci: update env var for runtime version --- .vscode/settings.json | 1 + bin/update-proxy-versions.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/bin/update-proxy-versions.sh b/bin/update-proxy-versions.sh index 20ec140e..e9cb9ddc 100755 --- a/bin/update-proxy-versions.sh +++ b/bin/update-proxy-versions.sh @@ -1,32 +1,32 @@ #!/usr/bin/env bash # USAGE: -# > PROXY_VERSION=1.0.31 ./update-proxy-versions.sh +# > 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 -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 From 445d289ce43dfa57ccd99f5aa5f4ab97160ef423 Mon Sep 17 00:00:00 2001 From: Eduardo Pinto Date: Thu, 21 Dec 2023 13:51:20 +0000 Subject: [PATCH 2/4] Update bin/update-proxy-versions.sh Co-authored-by: Enno Runne <458526+ennru@users.noreply.github.com> --- bin/update-proxy-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/update-proxy-versions.sh b/bin/update-proxy-versions.sh index e9cb9ddc..ed96478d 100755 --- a/bin/update-proxy-versions.sh +++ b/bin/update-proxy-versions.sh @@ -6,7 +6,7 @@ # 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 +# provide the new Kalix Runtime version you want the project to be updated to if [[ -z "$RUNTIME_VERSION" ]]; then echo "Must provide RUNTIME_VERSION in environment" 1>&2 exit 1 From a5d86cee90e1896711ebdbdd613f152de880e1e8 Mon Sep 17 00:00:00 2001 From: Eduardo Pinto Date: Thu, 21 Dec 2023 13:53:04 +0000 Subject: [PATCH 3/4] safer version and update file name --- .vscode/settings.json | 1 - ...te-proxy-versions.sh => update-runtime-versions.sh} | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .vscode/settings.json rename bin/{update-proxy-versions.sh => update-runtime-versions.sh} (73%) diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9e26dfee..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/bin/update-proxy-versions.sh b/bin/update-runtime-versions.sh similarity index 73% rename from bin/update-proxy-versions.sh rename to bin/update-runtime-versions.sh index ed96478d..9bc3543e 100755 --- a/bin/update-proxy-versions.sh +++ b/bin/update-runtime-versions.sh @@ -7,26 +7,26 @@ # to facilitate the update of all the places where we usually depend on the latest version # provide the new Kalix Runtime version you want the project to be updated to -if [[ -z "$RUNTIME_VERSION" ]]; then +if [[ -z "${RUNTIME_VERSION}" ]]; then echo "Must provide RUNTIME_VERSION in environment" 1>&2 exit 1 fi cd .. -echo ">>> Updating docker image versions to $RUNTIME_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:$RUNTIME_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:$RUNTIME_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\": \"$RUNTIME_VERSION\"/" ./sdk/config.json +sed -i.bak "s/\"frameworkVersion\": \"\(.*\)\"/\"frameworkVersion\": \"${RUNTIME_VERSION}\"/" ./sdk/config.json rm ./sdk/config.json.bak From 78261e5275a23e2d03b7fc64c3ae1d24d37f8494 Mon Sep 17 00:00:00 2001 From: Eduardo Pinto Date: Thu, 21 Dec 2023 14:01:04 +0000 Subject: [PATCH 4/4] run from root folder --- bin/update-runtime-versions.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/update-runtime-versions.sh b/bin/update-runtime-versions.sh index 9bc3543e..7902ae7f 100755 --- a/bin/update-runtime-versions.sh +++ b/bin/update-runtime-versions.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # USAGE: -# > RUNTIME_VERSION=1.0.31 ./update-proxy-versions.sh +# > RUNTIME_VERSION=1.0.31 ./bin/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 @@ -12,8 +12,6 @@ if [[ -z "${RUNTIME_VERSION}" ]]; then exit 1 fi -cd .. - echo ">>> Updating docker image versions to ${RUNTIME_VERSION}" PROJS=$(find . -type f -name "docker-compose.yml") for i in ${PROJS[@]}