Skip to content

Commit

Permalink
Remove duplicate jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
  • Loading branch information
HadrienPatte committed Feb 17, 2025
1 parent 34f3956 commit ff4c4bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 50 deletions.
47 changes: 0 additions & 47 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,6 @@ before_script:
aud: image-integrity
script: .gitlab/build-image.sh

cilium-operator:
extends: .build-docker-image
variables:
DOCKERFILE_PATH: images/operator/Dockerfile
DOCKER_BUILD_ARGS: |
OPERATOR_VARIANT=operator
BASE_IMAGE=$FIPS_BASE_IMAGE
GOLANG_IMAGE=$GOLANG_IMAGE
ALPINE_IMAGE=$ALPINE_IMAGE
CILIUM_BUILDER_IMAGE=$CILIUM_BUILDER_IMAGE
TARGET: release

cilium-operator-fips:
extends: .build-docker-image
variables:
DOCKERFILE_PATH: images/operator/Dockerfile
DOCKER_BUILD_ARGS: |
OPERATOR_VARIANT=operator
BASE_IMAGE=$FIPS_BASE_IMAGE
GOLANG_IMAGE=$GOLANG_IMAGE
ALPINE_IMAGE=$ALPINE_IMAGE
CILIUM_BUILDER_IMAGE=$CILIUM_BUILDER_IMAGE
TARGET: release

cilium-operator-generic:
extends: .build-docker-image
variables:
Expand All @@ -82,18 +58,6 @@ cilium-operator-aws:
CILIUM_BUILDER_IMAGE=$CILIUM_BUILDER_IMAGE
TARGET: release

cilium-operator-aws-fips:
extends: .build-docker-image
variables:
DOCKERFILE_PATH: images/operator/Dockerfile
DOCKER_BUILD_ARGS: |
OPERATOR_VARIANT=operator-aws
BASE_IMAGE=$FIPS_BASE_IMAGE
GOLANG_IMAGE=$GOLANG_IMAGE
ALPINE_IMAGE=$ALPINE_IMAGE
CILIUM_BUILDER_IMAGE=$CILIUM_BUILDER_IMAGE
TARGET: release

cilium-operator-azure:
extends: .build-docker-image
variables:
Expand Down Expand Up @@ -145,17 +109,6 @@ hubble-relay:
CILIUM_BUILDER_IMAGE=$CILIUM_BUILDER_IMAGE
TARGET: release

# This job is a duplicate of the clustermesh-apiserver one
# We keep it until we replaced all image references from kvstoremesh to clustermesh-apiserver
kvstoremesh:
extends: .build-docker-image
variables:
DOCKERFILE_PATH: images/clustermesh-apiserver/Dockerfile
DOCKER_BUILD_ARGS: |
BASE_IMAGE=$FIPS_BASE_IMAGE
GOLANG_IMAGE=$GOLANG_IMAGE
TARGET: release

cilium-clustermesh-apiserver:
extends: .build-docker-image
variables:
Expand Down
7 changes: 4 additions & 3 deletions .gitlab/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ for arg in $DOCKER_BUILD_ARGS; do
done
IFS=$' '

IMAGE_NAME=$CI_JOB_NAME
# Construct the image tag
IMAGE_TAG="$CI_COMMIT_TAG"
if [ "$TARGET" = "debug" ]; then
IMAGE_TAG="${IMAGE_TAG}-debug"
fi
IMAGE_REF="registry.ddbuild.io/$CI_JOB_NAME:$IMAGE_TAG"
IMAGE_REF="registry.ddbuild.io/$IMAGE_NAME:$IMAGE_TAG"

# Find the right Cilium Runtime image to use for the main Cilium image build
if [ "$CI_JOB_NAME" == "cilium" ]; then
if [ "$IMAGE_NAME" == "cilium" ]; then
CILIUM_RUNTIME_IMAGE="registry.ddbuild.io/cilium-runtime:$IMAGE_TAG"
BUILD_ARGS+=" --build-arg CILIUM_RUNTIME_IMAGE=$CILIUM_RUNTIME_IMAGE"
fi
Expand All @@ -41,7 +42,7 @@ docker buildx build --platform linux/amd64,linux/arm64 \
ddsign sign "$IMAGE_REF" --docker-metadata-file "$METADATA_FILE"

# Always build the debug version of the Cilium Agent and Operator images
if [[ $CI_JOB_NAME == "cilium" || $CI_JOB_NAME == "cilium-operator" ]]; then
if [[ $IMAGE_NAME == "cilium" || $IMAGE_NAME =~ "cilium-operator" ]]; then
METADATA_FILE_DEBUG=$(mktemp)
docker buildx build --platform linux/amd64,linux/arm64 \
--tag "$IMAGE_REF"-debug \
Expand Down

0 comments on commit ff4c4bf

Please sign in to comment.