forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
49 lines (43 loc) · 1.49 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
variables:
DST_REPOSITORY: quay.io/stackstate/opentelemetry-demo
OPENTELEMETRY_DEMO_VERSION: dev
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
services:
- alias: docker
command:
- --experimental
- --tls=false
name: ${DOCKER_PROXY_URL}/docker:20-dind
stages:
- build
.build-service:
tags:
- sts-k8s-xl-no-agent-runner
stage: build
image: ${DOCKER_PROXY_URL}/docker:20-git
script:
- echo "${quay_password}" | docker login --username=${quay_user} --password-stdin quay.io
- echo "${artifactory_password}" | docker login --username=${artifactory_user} --password-stdin artifactory.tooling.stackstate.io
- DST_TAG="${OPENTELEMETRY_DEMO_VERSION}-${CI_COMMIT_SHORT_SHA}-${SERVICE}"
# fix for https://github.com/docker/buildx/issues/493
- docker run --privileged --rm artifactory.tooling.stackstate.io/docker-virtual/tonistiigi/binfmt --install all
- docker buildx create --name builder --use --bootstrap
- docker buildx build --label "published-by=${CI_JOB_URL}" --platform linux/amd64,linux/arm64 --file "$CI_PROJECT_DIR/src/${SERVICE}/Dockerfile" --tag "${DST_REPOSITORY}:${DST_TAG}" --push "$CI_PROJECT_DIR"
retry:
max: 2
when:
- always
build-featureflag:
extends: .build-service
variables:
SERVICE: featureflagservice
build-adservice:
extends: .build-service
variables:
SERVICE: adservice
build-frauddetection:
extends: .build-service
variables:
SERVICE: frauddetectionservice