Skip to content

Commit

Permalink
feat(ci): build debug image when branch not master
Browse files Browse the repository at this point in the history
  • Loading branch information
ChandonPierre committed Sep 8, 2023
1 parent 60346d7 commit 1eb8efb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ default:
tags:
- ord1-tenant

workflow:
rules:
- if: $CI_SOURCE_BRANCH != "coreweave"
variables: &variables
DEBUG: "1"

stages:
- build
- release

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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1eb8efb

Please sign in to comment.