-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
59 lines (51 loc) · 1.29 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
58
59
# SPDX-FileCopyrightText: 2023 Institute for Automation of Complex Power Systems
# SPDX-License-Identifier: Apache-2.0
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_TAG: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE: registry.git.rwth-aachen.de/acs/public/villas/signaling
stages:
- test
- packaging
- latest
test:reuse:
stage: test
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint
tags:
- docker
pkg:docker:
stage: packaging
image: docker:20.10
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
script:
- docker build --tag ${DOCKER_IMAGE}:${DOCKER_TAG} .
- docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
tags:
- docker
variables:
TARGET: app
.latest:docker:latest: &deploy_latest_docker
stage: latest
image: docker:20.10
before_script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
script:
- docker tag ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_IMAGE}:latest
- docker push ${DOCKER_IMAGE}:latest
tags:
- docker
latest:docker:
<<: *deploy_latest_docker
only:
- "/^v\\d+(\\.\\d+)+$/" # Only on version tags
latest:docker:manual:
<<: *deploy_latest_docker
when: manual
except:
- "/^v\\d+(\\.\\d+)+$/" # Only on version tags