Verified Commit 445bc35d authored by egon w. stemle's avatar egon w. stemle
Browse files

Add .gitlab-ci.yml

parent c49ad0f5
Pipeline #11519 failed with stages
in 1 minute and 50 seconds
variables:
CONTAINER_IMAGE: "gitlab.inf.unibz.it:4567/commul/merlin-platform/www/master"
DOCKER_BUILDER_IMAGE: "docker:19.03.1"
DOCKER_TLS_CERTDIR: "" # See https://gitlab.com/gitlab-org/gitlab-runner/issues/4501
KUBECTL: "https://storage.googleapis.com/kubernetes-release/release/v1.8.10/bin/linux/amd64/kubectl"
stages:
- build
- tag
- deploy
build:
stage: build
tags:
- commul
image: ${DOCKER_BUILDER_IMAGE}
services:
- docker:dind
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN https://gitlab.inf.unibz.it:4567
script:
- docker build --rm --no-cache --tag=${CONTAINER_IMAGE}:${CI_COMMIT_SHA} .
- docker push ${CONTAINER_IMAGE}:${CI_COMMIT_SHA}
- docker tag ${CONTAINER_IMAGE}:${CI_COMMIT_SHA} ${CONTAINER_IMAGE}:staging
- docker push ${CONTAINER_IMAGE}:staging
only:
- master
deploy_staging:
stage: deploy
tags:
- commul
image: ${DOCKER_BUILDER_IMAGE}
services:
- docker:dind
before_script:
- wget ${KUBECTL}
- mv kubectl /usr/bin/
- chmod +x /usr/bin/kubectl
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN gitlab.inf.unibz.it:4567
script:
- docker pull ${CONTAINER_IMAGE}:${CI_COMMIT_SHA}
- kubectl --namespace kommul-dev set image deployment/merlin browser=${CONTAINER_IMAGE}:${CI_COMMIT_SHA}
only:
- master
Supports Markdown
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