Commit 560902d4 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

use docker image build template

parent 495c25f3
Pipeline #31433 passed with stages
in 3 minutes and 53 seconds
......@@ -5,6 +5,10 @@ stages:
variables:
DOCKER_TLS_CERTDIR: ""
include:
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'docker-image/docker-image.yml'
default:
image: golang:1.14
......@@ -93,53 +97,3 @@ webservice:test:build:
extends: .test:build
variables:
BIN_PATH: gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/webservice
.build-image:
stage: publish
image: docker:stable
services:
- docker:dind
# before_script:
# - apk update && apk add curl
script:
# - 'curl --location --output ffprobe --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/937/jobs/artifacts/master/raw/ffmpeg_build/bin/ffprobe?job=snapshot"'
# - 'curl --location --output convert --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/939/jobs/artifacts/master/raw/im_build/bin/convert?job=v6_9_11"'
# - 'curl --location --output identify --header "PRIVATE-TOKEN: $API_ACCESS_TOKEN" "https://gitlab.switch.ch/api/v4/projects/939/jobs/artifacts/master/raw/im_build/bin/identify?job=v6_9_11"'
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY"
- docker build --pull -t "$IMAGE_TAG" -f "$DOCKERFILE" .
- docker push "$IMAGE_TAG"
- docker logout
indexerhelper:build-tagged-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
only:
- tags
indexerhelper:build-latest-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
only:
- master
indexerhelper:build-feature-branch-image:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile.small"
except:
- master
- tags
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