Newer
Older
include: ".gitlab-ci-common.yml"
stages:
- build-nomyst
- build-myst
nomyst:
extends: .build_with_kaniko
stage: build-nomyst
variables:
DOCKERFILE: Dockerfile
BUILDTITLE: build-nomyst
TAG_EXT: "-noMyST"
environment:
name: push-to-gitlab-project-registry
myst:
stage: build-myst
rules:
- if: '$CI_COMMIT_TAG == "stable"'
when: never
- if: '$CI_COMMIT_TAG != null'
when: always
tags:
- docker
script:
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- echo Building version $CI_COMMIT_TAG
- docker pull $CI_REGISTRY_IMAGE:latest || true
- >
docker build
--pull
--build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy
--build-arg VCS_REF=$CI_COMMIT_SHA
--build-arg VCS_URL=$CI_PROJECT_URL
--build-arg VCS_TAG=$CI_COMMIT_TAG
--cache-from $CI_REGISTRY_IMAGE:latest
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
--file Dockerfile.myst
.
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME