-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
57 lines (50 loc) · 1.17 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
---
variables:
DISTRIBUTION_VER: "buster"
CI_APT_PREFIX: "k8s-1.15"
image: docker.git.sos.ethz.ch/isg/debian-ci-base-int:$DISTRIBUTION_VER
cache:
paths:
- 'target/'
stages:
- build
- test
- deploy
build:
stage: build
before_script:
- apt update || /bin/true
- apt install -y --no-install-recommends maven-debian-helper maven || /bin/true
script:
- mvn compile
build-package:
stage: build
before_script:
- apt update || /bin/true
- apt install -y --no-install-recommends maven-debian-helper maven || /bin/true
script:
- dpkg-buildpackage -b -us -uc
- mkdir debbuild
- mv ../*.deb debbuild/
artifacts:
paths:
- debbuild/*
only:
- tags
test:
stage: test
before_script:
- apt update || /bin/true
- apt install -y --no-install-recommends maven-debian-helper maven || /bin/true
script:
- mvn test
deploy_to_apt:
stage: deploy
script:
- echo "Deploying package to $CI_APT_PREFIX prefix and $DISTRIBUTION_VER version"
- sudo -u repo aptly repo add $CI_APT_PREFIX debbuild/*.deb
- sudo -u repo aptly publish update $DISTRIBUTION_VER $CI_APT_PREFIX
only:
- tags
tags:
- apt