Skip to content

Commit 2322a73

Browse files
delthasfrancoisferrand
authored andcommitted
Use generated Kafka image in CI tests
Issue: ZENKO-5196
1 parent d498036 commit 2322a73

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.github/scripts/end2end/configure-e2e-ctst.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ KAFKA_REGISTRY_NAME=$(yq eval ".kafka.sourceRegistry" ../../../solution/deps.yam
66
KAFKA_IMAGE_NAME=$(yq eval ".kafka.image" ../../../solution/deps.yaml)
77
KAFKA_IMAGE_TAG=$(yq eval ".kafka.tag" ../../../solution/deps.yaml)
88
KAFKA_IMAGE=$KAFKA_REGISTRY_NAME/$KAFKA_IMAGE_NAME:$KAFKA_IMAGE_TAG
9+
BUILD_TREE_HASH=$(git rev-parse HEAD:solution/kafka)
910

1011
# Setup test environment variables
1112
export ZENKO_NAME=${1:-"end2end"}
@@ -57,7 +58,7 @@ kubectl wait --for=jsonpath='{.status.state}'=ClusterRunning --timeout 10m kafka
5758

5859
# Create SCRAM credentials for the SCRAM listener
5960
kubectl run kafka-config \
60-
--image=$KAFKA_IMAGE \
61+
--image=$KAFKA_IMAGE-$BUILD_TREE_HASH \
6162
--pod-running-timeout=5m \
6263
--rm \
6364
--restart=Never \
@@ -91,7 +92,7 @@ AZURE_ARCHIVE_STATUS_TOPIC_2_S="${UUID}.cold-status-e2e-azure-archive-2-suspende
9192

9293
# Creating bucket notification topic in kafka
9394
kubectl run kafka-topics \
94-
--image=$KAFKA_IMAGE \
95+
--image=$KAFKA_IMAGE-$BUILD_TREE_HASH \
9596
--pod-running-timeout=5m \
9697
--rm \
9798
--restart=Never \

.github/scripts/end2end/configure-e2e.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ KAFKA_IMAGE=$KAFKA_REGISTRY_NAME/$KAFKA_IMAGE_NAME:$KAFKA_IMAGE_TAG
5555
KAFKA_HOST_PORT=$(kubectl get secret -l app.kubernetes.io/name=backbeat-config,app.kubernetes.io/instance=end2end \
5656
-o jsonpath='{.items[0].data.config\.json}' | base64 -di | jq .kafka.hosts)
5757
KAFKA_HOST_PORT=${KAFKA_HOST_PORT:1:-1}
58+
BUILD_TREE_HASH=$(git rev-parse HEAD:solution/kafka)
5859

5960
# Creating replication/transition and notification topics in kafka
6061
kubectl run kafka-topics \
61-
--image=$KAFKA_IMAGE \
62+
--image=$KAFKA_IMAGE-$BUILD_TREE_HASH \
6263
--pod-running-timeout=5m \
6364
--rm \
6465
--restart=Never \

.github/scripts/end2end/deploy-zenko.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function dependencies_env()
8989
echo $(dependencies_policy_env)
9090
echo $(dependencies_config_env)
9191
echo "ZENKO_VERSION_NAME=${ZENKO_VERSION_NAME}"
92+
echo "BUILD_TREE_HASH=$(git rev-parse HEAD:solution/kafka)"
9293
}
9394

9495
create_encryption_secret()

solution/zenkoversion.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ spec:
9696
tag: ${KAFKA_CLEANER_TAG}
9797
cluster:
9898
image: ${KAFKA_IMAGE}
99-
tag: ${KAFKA_TAG}
99+
tag: ${KAFKA_TAG}-${BUILD_TREE_HASH}
100100
connect:
101101
image: ${KAFKA_CONNECT_IMAGE}
102-
tag: ${KAFKA_CONNECT_TAG}
102+
tag: ${KAFKA_CONNECT_TAG}-${BUILD_TREE_HASH}
103103
cruiseControl:
104104
image: ${KAFKA_CRUISECONTROL_IMAGE}
105105
tag: ${KAFKA_CRUISECONTROL_TAG}

0 commit comments

Comments
 (0)