forked from containernetworking/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
43 lines (39 loc) · 1.13 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
variables:
DISTRIBUTION_VER: "bullseye"
CI_APT_PREFIX: "k8s-1.26"
image: docker.git.sos.ethz.ch/isg/debian-ci-base-int:$DISTRIBUTION_VER
stages:
- build
- deploy
build:
stage: build
before_script:
- apt update
- apt install -y go-md2man golang-any golang-1.19 rsync binutils bash-completion jq debhelper-compat
- export PATH=/usr/lib/go-1.19/bin:$PATH
- export GOROOT=/usr/lib/go-1.19
- export GOPATH=/root/go
- rm /usr/bin/go || /bin/true
- rm /usr/bin/gofmt || /bin/true
- ln -s /usr/lib/go-1.19/bin/go /usr/bin/go
- ln -s /usr/lib/go-1.19/bin/gofmt /usr/bin/gofmt
script:
- gbp buildpackage --git-ignore-branch -b -us -uc
- mv ../*.deb . # GitLab can't copy from the parent directory...
artifacts:
name: packets
expire_in: 3 months
paths:
- '*.deb'
deploy_to_apt:
stage: deploy
variables:
GIT_STRATEGY: none
script:
- echo "Deploying package to $CI_APT_PREFIX prefix and $DISTRIBUTION_VER version"
- sudo -u repo aptly repo add $CI_APT_PREFIX *.deb
- sudo -u repo aptly publish update $DISTRIBUTION_VER $CI_APT_PREFIX
only:
- tags
tags:
- apt