Skip to content

Commit

Permalink
test: Fix local runs of K8sUpdates
Browse files Browse the repository at this point in the history
When run locally with the default arguments, K8sUpdates fails because
the cilium-operator image for downgrades is downloaded at
quay.io/cilium/operator-generic instead of
quay.io/cilium/operator-generic-ci. Unfortunately, passing
cilium.operator-suffix="-ci" as an argument to ginkgo is not enough
because, for local test runs, the image is pushed to
k8s1:5000/cilium/operator-generic.

This commit fixes those issues and makes "-ci" the default value of
cilium.operator-suffix.

Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno authored and nebril committed Jul 15, 2021
1 parent 118af77 commit 8e9321c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (c *CiliumTestConfigType) ParseFlags() {
"Specifies which image of cilium-operator to use during tests")
flagset.StringVar(&c.CiliumOperatorTag, "cilium.operator-tag", "",
"Specifies which tag of cilium-operator to use during tests")
flagset.StringVar(&c.CiliumOperatorSuffix, "cilium.operator-suffix", "",
flagset.StringVar(&c.CiliumOperatorSuffix, "cilium.operator-suffix", "-ci",
"Specifies a suffix to append to operator image after cloud-specific suffix")
flagset.StringVar(&c.HubbleRelayImage, "cilium.hubble-relay-image", "",
"Specifies which image of hubble-relay to use during tests")
Expand Down
24 changes: 12 additions & 12 deletions test/provision/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ then
echo "building cilium-operator-generic image..."
make -B LOCKDEBUG=1 docker-operator-generic-image
echo "tagging cilium-operator images..."
docker tag "${CILIUM_OPERATOR_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_TAG}"
docker tag "${CILIUM_OPERATOR_AWS_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_AWS_TAG}"
docker tag "${CILIUM_OPERATOR_AZURE_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_AZURE_TAG}"
docker tag "${CILIUM_OPERATOR_GENERIC_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_GENERIC_TAG}"
echo "pushing cilium/operator image to ${REGISTRY}/${CILIUM_OPERATOR_TAG}..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_TAG}"
echo "pushing cilium/operator-aws image to ${REGISTRY}/${CILIUM_OPERATOR_AWS_TAG}..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_AWS_TAG}"
echo "pushing cilium/operator-azure image to ${REGISTRY}/${CILIUM_OPERATOR_AZURE_TAG}..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_AZURE_TAG}"
echo "pushing cilium/operator-generic image to ${REGISTRY}/${CILIUM_OPERATOR_GENERIC_TAG}..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_GENERIC_TAG}"
docker tag "${CILIUM_OPERATOR_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_TAG}-ci"
docker tag "${CILIUM_OPERATOR_AWS_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_AWS_TAG}-ci"
docker tag "${CILIUM_OPERATOR_AZURE_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_AZURE_TAG}-ci"
docker tag "${CILIUM_OPERATOR_GENERIC_TAG}" "${REGISTRY}/${CILIUM_OPERATOR_GENERIC_TAG}-ci"
echo "pushing cilium/operator image to ${REGISTRY}/${CILIUM_OPERATOR_TAG}-ci..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_TAG}-ci"
echo "pushing cilium/operator-aws image to ${REGISTRY}/${CILIUM_OPERATOR_AWS_TAG}-ci..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_AWS_TAG}-ci"
echo "pushing cilium/operator-azure image to ${REGISTRY}/${CILIUM_OPERATOR_AZURE_TAG}-ci..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_AZURE_TAG}-ci"
echo "pushing cilium/operator-generic image to ${REGISTRY}/${CILIUM_OPERATOR_GENERIC_TAG}-ci..."
docker push "${REGISTRY}/${CILIUM_OPERATOR_GENERIC_TAG}-ci"
echo "removing local cilium-operator image..."
docker rmi "${CILIUM_OPERATOR_TAG}:latest"
echo "removing local cilium-operator image..."
Expand Down

0 comments on commit 8e9321c

Please sign in to comment.