-
Notifications
You must be signed in to change notification settings - Fork 30
/
.gitlab-ci.yml
77 lines (67 loc) · 1.58 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# This file is part of CPU Energy Meter,
# a tool for measuring energy consumption of Intel CPUs:
# https://github.com/sosy-lab/cpu-energy-meter
#
# SPDX-FileCopyrightText: 2018-2021 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: BSD-3-Clause
# This image is created from test/Dockerfile
image: registry.gitlab.com/sosy-lab/software/cpu-energy-meter/test:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- make clean
stages:
- images
- build
- test
- dist
build:
stage: build
script:
- make
artifacts:
paths:
- cpu-energy-meter
test:
stage: test
script:
- make test
# check license declarations etc.
reuse:
stage: test
image:
name: fsfe/reuse:latest
entrypoint: [""]
dependencies: []
needs: []
before_script: []
script:
- reuse lint
deb:
stage: dist
script:
- scripts/create_deb.sh
artifacts:
paths:
- "*.deb"
# Build Docker images
# following this guideline: https://docs.gitlab.com/ee/ci/docker/using_kaniko.html
.build-docker:
stage: images
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
before_script: []
script:
- mkdir -p /root/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --dockerfile $CI_PROJECT_DIR/$DOCKERFILE --destination $CI_REGISTRY_IMAGE/$IMAGE
only:
- schedules
- web
build-docker:test:
extends: .build-docker
variables:
DOCKERFILE: test/Dockerfile
IMAGE: test:latest