Commit 6a46c7b1 authored by MUSSET Paul's avatar MUSSET Paul
Browse files

Merge branch 'separate_jobs' into 'master'

Separate jobs

See merge request !6
parents 1e867920 4d39e698
Pipeline #71973 passed with stages
in 4 minutes and 33 seconds
...@@ -14,20 +14,54 @@ stages: ...@@ -14,20 +14,54 @@ stages:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --context-sub-path "$DIRECTORY" --dockerfile "$CI_PROJECT_DIR/$DIRECTORY/Dockerfile" --destination "$CI_REGISTRY_IMAGE/$IMAGE_NAME" --build-arg "tag=$TAG" --skip-unused-stages - /kaniko/executor --context $CI_PROJECT_DIR --context-sub-path "$DIRECTORY" --dockerfile "$CI_PROJECT_DIR/$DIRECTORY/Dockerfile" --destination "$CI_REGISTRY_IMAGE/$IMAGE_NAME" --build-arg "tag=$TAG" --skip-unused-stages
build-standalone-base: .job_other:
extends: .build rules:
- if: '$CI_COMMIT_BRANCH != "master"'
.job_master:
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
build_standalone_base:
extends:
- .build
- .job_other
stage: build:docker_base stage: build:docker_base
variables: variables:
TAG: ${CI_COMMIT_REF_SLUG} TAG: ${CI_COMMIT_REF_SLUG}
DIRECTORY: xcache-standalone/base/dockerfile/ DIRECTORY: xcache-standalone/base/dockerfile/
IMAGE_NAME: standalone/base:${CI_COMMIT_REF_SLUG} IMAGE_NAME: standalone/base:${CI_COMMIT_REF_SLUG}
build-standalone-token: build_standalone_base_master:
extends: .build extends:
- .build
- .job_master
stage: build:docker_base
variables:
TAG: ""
DIRECTORY: xcache-standalone/base/dockerfile/
IMAGE_NAME: standalone/base
build_standalone_token:
extends:
- .build
- .job_other
stage: build:docker_standalone stage: build:docker_standalone
needs: needs:
- build-standalone-base - build_standalone_base
variables: variables:
TAG: ${CI_COMMIT_REF_SLUG} TAG: ${CI_COMMIT_REF_SLUG}
DIRECTORY: xcache-standalone/token/dockerfile/ DIRECTORY: xcache-standalone/token/dockerfile/
IMAGE_NAME: standalone/token:${CI_COMMIT_REF_SLUG} IMAGE_NAME: standalone/token:${CI_COMMIT_REF_SLUG}
build_standalone_token_master:
extends:
- .build
- .job_master
stage: build:docker_standalone
needs:
- build_standalone_base_master
variables:
TAG: ""
DIRECTORY: xcache-standalone/token/dockerfile/
IMAGE_NAME: standalone/token
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment