diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 08cfd6e..ca4464b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,12 @@ default: tags: - ord1-tenant +workflow: + rules: + - if: $CI_SOURCE_BRANCH != "coreweave" + variables: &variables + DEBUG: "1" + stages: - build - release @@ -12,6 +18,7 @@ stages: build: stage: build variables: + <<: *variables REF_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG FIXED_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA DOCKERFILE: ${CI_PROJECT_DIR}/Dockerfile @@ -24,6 +31,7 @@ build: /kaniko/executor \ $KANIKO_ADDTL_ARGS \ --context . \ + --build-arg DEBUG=$DEBUG \ --dockerfile $DOCKERFILE \ --destination $REF_IMAGE \ --destination $FIXED_IMAGE diff --git a/Dockerfile b/Dockerfile index d668208..2c5fe52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ LABEL org.opencontainers.image.source https://github.com/rpardini/docker-registr RUN apk add --no-cache --update bash ca-certificates-bundle coreutils openssl # If set to 1, enables building mitmproxy, which helps a lot in debugging, but is super heavy to build. -ARG DEBUG_BUILD="0" +ARG DEBUG_BUILD=${DEBUG:-"0"} ENV DO_DEBUG_BUILD="$DEBUG_BUILD" # Build mitmproxy via pip. This is heavy, takes minutes do build and creates a 90mb+ layer. Oh well.