-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
39 lines (34 loc) · 1.19 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
# This file is a template, and might need editing before it works on your project.
# Official docker image.
image: docker:stable
variables:
CONTAINER_TEST_IMAGE: $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG-temp
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY/$CI_PROJECT_PATH:latest
CONTAINER_TEST_IMAGE_ARM_RPI3: $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG-temp
CONTAINER_RELEASE_IMAGE_ARM_RPI3: $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG
CONTAINER_TEST_IMAGE_ARM_RPI4: $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG-temp
CONTAINER_RELEASE_IMAGE_ARM_RPI4: $CI_REGISTRY/$CI_PROJECT_PATH:$CI_COMMIT_REF_SLUG
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN git.geomar.de:11411
stages:
- build
- test
- release
- trigger
build:
tags:
- arches
stage: build
script:
- docker build --build-arg gitlab_ci_arches_ssh="$gitlab_ci_arches_ssh" --no-cache --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
release:
tags:
- arches
stage: release
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
only:
- master