-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
57 lines (52 loc) · 1.72 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
stages:
- fetch
- build
- publish
- deploy
variables:
GIT_DEPTH: 0 # required for Nerdbank.Gitversioning support
CP_VERSION: "11.6"
include:
- project: 'deploy/azure/registry'
file: '.gitlab-ci.template.yml'
fetch-azure-registry-info:
stage: fetch
extends: .fetch-acr-login-data
image: $ACR_FETCH_IMAGE
tags:
- build-docker-linux
press-portal:build:
stage: build
image: gitlab-registry.vit.ch/picturepark/docker-images/docker:19.03.12
services:
- name: gitlab-registry.vit.ch/picturepark/docker-images/docker:19.03.12-dind
alias: docker
tags:
- build-docker-image
script:
- export DOCKER_CONFIG=$(mktemp -d)
- export CONTAINER_IMAGE=picturepark/picturepark.sdk.samples/press-portal/$CP_VERSION:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
- docker build --pull -t $CONTAINER_IMAGE . -f Picturepark.PressPortal.Demo/Picturepark.PressPortal.Demo/Dockerfile
- docker login -u $HARBOR_USER -p $HARBOR_PASSWORD $HARBOR_URL
- docker tag $CONTAINER_IMAGE $HARBOR_URL/$CONTAINER_IMAGE
- docker push $HARBOR_URL/$CONTAINER_IMAGE
- !reference [.push-image-to-azure, script]
press-portal:publish-helm-chart:
stage: publish
image:
name: gitlab-registry.vit.ch/picturepark/ci-containers/helm-helper/$CP_VERSION
tags:
- build-docker-linux
script:
- cd Picturepark.PressPortal.Demo/helm
- helm-set.sh
--set image.service="picturepark/picturepark.sdk.samples/press-portal/$CP_VERSION:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
./sample-press-portal
- helm package
--app-version "$CP_VERSION-$CI_COMMIT_REF_SLUG"
--version "$CP_VERSION.0+$CI_COMMIT_REF_SLUG"
./sample-press-portal
- mv *.tgz ../..
artifacts:
paths:
- ./*.tgz