diff --git a/src/deploy/carvel/register-apps.sh b/src/deploy/carvel/register-apps.sh index c9c2c90417..4163a410d4 100755 --- a/src/deploy/carvel/register-apps.sh +++ b/src/deploy/carvel/register-apps.sh @@ -34,7 +34,7 @@ if [ "$TYPE" = "" ]; then TYPE=docker fi if [ "$1" != "" ]; then - STREAM_APPS_VERSION=$1 + STREAM_APPS_RT_VERSION=$1 fi if [ "$BROKER" == "kafka" ]; then @@ -44,25 +44,25 @@ else BROKER_NAME=rabbitmq fi -if [ "$STREAM_APPS_VERSION" = "" ]; then +if [ "$STREAM_APPS_RT_VERSION" = "" ]; then STREAM_URI="https://dataflow.spring.io/$BROKER_NAME-${TYPE}-latest" -elif [[ "$STREAM_APPS_VERSION" = *"SNAPSHOT"* ]]; then - STREAM_APPS_DL_VERSION=$STREAM_APPS_VERSION - META_DATA="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/maven-metadata.xml" +elif [[ "$STREAM_APPS_RT_VERSION" = *"SNAPSHOT"* ]]; then + STREAM_APPS_DL_VERSION=$STREAM_APPS_RT_VERSION + META_DATA="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/maven-metadata.xml" echo "Downloading $META_DATA" curl -o maven-metadata.xml -s $META_DATA DL_TS=$(xmllint --xpath "/metadata/versioning/snapshot/timestamp/text()" maven-metadata.xml | sed 's/\.//') STREAM_APPS_DL_VERSION=$(xmllint --xpath "/metadata/versioning/snapshotVersions/snapshotVersion[extension/text() = 'pom' and updated/text() = '$DL_TS']/value/text()" maven-metadata.xml) - STREAM_URI="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_DL_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + STREAM_URI="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_DL_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" else REL_TYPE= - if [[ "$STREAM_APPS_VERSION" = *"-M"* ]] || [[ "$STREAM_APPS_VERSION" = *"-RC"* ]]; then + if [[ "$STREAM_APPS_RT_VERSION" = *"-M"* ]] || [[ "$STREAM_APPS_RT_VERSION" = *"-RC"* ]]; then REL_TYPE=milestone fi if [ "$REL_TYPE" != "" ]; then - STREAM_URI="https://repo.spring.io/$REL_TYPE/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + STREAM_URI="https://repo.spring.io/$REL_TYPE/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_RT_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" else - STREAM_URI="https://repo.maven.apache.org/maven2/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + STREAM_URI="https://repo.maven.apache.org/maven2/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_RT_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" fi fi if [ "$DATAFLOW_URL" = "" ]; then diff --git a/src/deploy/k8s/load-image.sh b/src/deploy/k8s/load-image.sh index 4aad1e268d..e35fa72426 100755 --- a/src/deploy/k8s/load-image.sh +++ b/src/deploy/k8s/load-image.sh @@ -62,14 +62,15 @@ case "$K8S_DRIVER" in docker push localhost:32000/$IMAGE ;; *) - MINIKUBE_JSON=$(minikube image ls --format json | jq -c --arg image $IMAGE '.[] | {id: .id, image: .repoTags[0]} | select(.image | contains($image))') + MINIKUBE_RAW_JSON=$(minikube image ls --format json) + MINIKUBE_JSON=$(echo "$MINIKUBE_RAW_JSON" | jq -c --arg image $IMAGE '.[] | {id: .id, image: .repoTags[0]} | select(.image | endswith($image))') if [ "$MINIKUBE_JSON" != "" ]; then MINIKUBE_SHA="sha256:$(echo $MINIKUBE_JSON | jq -r '.id')" - if [ "$MINIKUBE_SHA" = "$DOCKER_SHA" ]; then + if [ "$MINIKUBE_SHA" != "$DOCKER_SHA" ]; then + echo "Image: $IMAGE, docker $DOCKER_SHA, minikube $MINIKUBE_SHA" + else echo "$IMAGE already uploaded" exit 0 - else - echo "Image: $IMAGE, docker $DOCKER_SHA, minikube $MINIKUBE_SHA" fi fi echo "Loading $IMAGE to minikube" diff --git a/src/deploy/k8s/register-apps.sh b/src/deploy/k8s/register-apps.sh index 28a319b672..ee04f2f03a 100755 --- a/src/deploy/k8s/register-apps.sh +++ b/src/deploy/k8s/register-apps.sh @@ -43,36 +43,36 @@ if [ "$BROKER" = "rabbitmq" ]; then else BROKER_NAME=$BROKER fi -if [ "$STREAM_APPS_VERSION" = "" ]; then - # export STREAM_APPS_VERSION=2022.0.0-SNAPSHOT - # export STREAM_APPS_VERSION=2021.1.2 # release for Boot 2.x - # export STREAM_APPS_VERSION=2022.0.0 # release for Boot 3.x - export STREAM_APPS_VERSION=2022.0.0 +if [ "$STREAM_APPS_RT_VERSION" = "" ]; then + # export STREAM_APPS_RT_VERSION=2022.0.0-SNAPSHOT + # export STREAM_APPS_RT_VERSION=2021.1.2 # release for Boot 2.x + # export STREAM_APPS_RT_VERSION=2022.0.0 # release for Boot 3.x + export STREAM_APPS_RT_VERSION=2022.0.0 fi -echo "STREAM_APPS_VERSION=$STREAM_APPS_VERSION" +echo "STREAM_APPS_RT_VERSION=$STREAM_APPS_RT_VERSION" if [ "$PLATFORM_TYPE" != "kubernetes" ]; then TYPE=maven else TYPE=docker fi -if [[ "$STREAM_APPS_VERSION" = *"-SNAPSHOT"* ]]; then - STREAM_APPS_DL_VERSION=$STREAM_APPS_VERSION - META_DATA="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/maven-metadata.xml" +if [[ "$STREAM_APPS_RT_VERSION" = *"-SNAPSHOT"* ]]; then + STREAM_APPS_DL_VERSION=$STREAM_APPS_RT_VERSION + META_DATA="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/maven-metadata.xml" echo "Downloading $META_DATA" curl -o maven-metadata.xml -s $META_DATA DL_TS=$(xmllint --xpath "/metadata/versioning/snapshot/timestamp/text()" maven-metadata.xml | sed 's/\.//') STREAM_APPS_DL_VERSION=$(xmllint --xpath "/metadata/versioning/snapshotVersions/snapshotVersion[extension/text() = 'pom' and updated/text() = '$DL_TS']/value/text()" maven-metadata.xml) - DESCRIPTORS="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_DL_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + DESCRIPTORS="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_DL_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" else REL_TYPE= - if [[ "$STREAM_APPS_VERSION" = *"-M"* ]] || [[ "$STREAM_APPS_VERSION" = *"-RC"* ]]; then + if [[ "$STREAM_APPS_RT_VERSION" = *"-M"* ]] || [[ "$STREAM_APPS_RT_VERSION" = *"-RC"* ]]; then REL_TYPE=milestone fi if [ "$REL_TYPE" != "" ]; then - DESCRIPTORS="https://repo.spring.io/$REL_TYPE/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + DESCRIPTORS="https://repo.spring.io/$REL_TYPE/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_RT_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" else - DESCRIPTORS="https://repo.maven.apache.org/maven2/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + DESCRIPTORS="https://repo.maven.apache.org/maven2/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_RT_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" fi fi echo "DATAFLOW_IP=$DATAFLOW_IP" diff --git a/src/local/register-apps.sh b/src/local/register-apps.sh index 3dd5ca0714..03301a3688 100755 --- a/src/local/register-apps.sh +++ b/src/local/register-apps.sh @@ -38,31 +38,31 @@ if [ "$BROKER" = "rabbitmq" ]; then else BROKER_NAME=$BROKER fi -if [ "$STREAM_APPS_VERSION" = "" ]; then - export STREAM_APPS_VERSION=2022.0.0 - # export STREAM_APPS_VERSION=2021.1.2 # release for Boot 2.x - # export STREAM_APPS_VERSION=2022.0.0 # release for Boot 3.x +if [ "$STREAM_APPS_RT_VERSION" = "" ]; then + export STREAM_APPS_RT_VERSION=2022.0.0 + # export STREAM_APPS_RT_VERSION=2021.1.2 # release for Boot 2.x + # export STREAM_APPS_RT_VERSION=2022.0.0 # release for Boot 3.x fi -echo "STREAM_APPS_VERSION=$STREAM_APPS_VERSION" +echo "STREAM_APPS_RT_VERSION=$STREAM_APPS_RT_VERSION" TYPE=maven -if [[ "$STREAM_APPS_VERSION" = *"-SNAPSHOT"* ]]; then - STREAM_APPS_DL_VERSION=$STREAM_APPS_VERSION - META_DATA="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/maven-metadata.xml" +if [[ "$STREAM_APPS_RT_VERSION" = *"-SNAPSHOT"* ]]; then + STREAM_APPS_DL_VERSION=$STREAM_APPS_RT_VERSION + META_DATA="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/maven-metadata.xml" echo "Downloading $META_DATA" curl -o maven-metadata.xml -s $META_DATA DL_TS=$(xmllint --xpath "/metadata/versioning/snapshot/timestamp/text()" maven-metadata.xml | sed 's/\.//') STREAM_APPS_DL_VERSION=$(xmllint --xpath "/metadata/versioning/snapshotVersions/snapshotVersion[extension/text() = 'pom' and updated/text() = '$DL_TS']/value/text()" maven-metadata.xml) - DESCRIPTORS="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_DL_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + DESCRIPTORS="https://repo.spring.io/snapshot/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_DL_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" else REL_TYPE= - if [[ "$STREAM_APPS_VERSION" = *"-M"* ]] || [[ "$STREAM_APPS_VERSION" = *"-RC"* ]]; then + if [[ "$STREAM_APPS_RT_VERSION" = *"-M"* ]] || [[ "$STREAM_APPS_RT_VERSION" = *"-RC"* ]]; then REL_TYPE=milestone fi if [ "$REL_TYPE" != "" ]; then - DESCRIPTORS="https://repo.spring.io/$REL_TYPE/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + DESCRIPTORS="https://repo.spring.io/$REL_TYPE/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_RT_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" else - DESCRIPTORS="https://repo.maven.apache.org/maven2/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_VERSION}/stream-applications-descriptor-${STREAM_APPS_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" + DESCRIPTORS="https://repo.maven.apache.org/maven2/org/springframework/cloud/stream/app/stream-applications-descriptor/${STREAM_APPS_RT_VERSION}/stream-applications-descriptor-${STREAM_APPS_RT_VERSION}.stream-apps-${BROKER_NAME}-${TYPE}" fi fi echo "DATAFLOW_IP=$DATAFLOW_IP"