-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
61 lines (56 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
DEBIAN_FRONTEND: noninteractive
stages:
- build_docker
- build_and_test
- deploy
build_docker_image:
stage: build_docker
image: docker:latest
tags:
- dind
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build --no-cache -t $IMAGE_TAG .
- docker push $IMAGE_TAG
only:
changes:
- Dockerfile
build_and_test:
stage: build_and_test
image: $IMAGE_TAG
script:
- mkdir build
- cd build
- cmake -DDPDK_BACKEND=ON -DAF_PACKET_BACKEND=ON ..
- make
- cd ../tests
- python3 ./run_tests.py -p ../build/dns-probe-af
pages:
stage: deploy
image: $IMAGE_TAG
script:
- mkdir build
- cd build
- cmake ..
- make doc
- mv doc/html/ ../public/
artifacts:
paths:
- public
only:
- master
obs:
stage: deploy
image: $IMAGE_TAG
before_script:
- apt update
- apt -y install build-essential devscripts debhelper osc python3-setuptools
- pip3 install apkg
script:
- scripts/prepare_obs.sh
- scripts/build_obs.sh
only:
- tags