forked from vrnetlab/vrnetlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
63 lines (48 loc) · 1.52 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
image: vrnetlab/ci-builder
stages:
- build
.build: &build-template
stage: build
tags:
- vrnetlab
script:
# make sure we pulled LFS files
- git lfs fetch -I ${CI_JOB_NAME}
- git lfs checkout ${CI_JOB_NAME}
- ls -l ${CI_JOB_NAME}
# We allow the user to control which Docker registry is used through the
# env var DOCKER_REGISTRY. If it is not set then we assume we should use
# the GitLab built-in Docker registry so we check if it is enabled.
# CI_REGISTRY is only set when the GitLab Docker registry is enabled
- if [ -z "${DOCKER_REGISTRY}" ]; then if [ -n "${CI_REGISTRY}" ]; then export DOCKER_USER=gitlab-ci-token; export DOCKER_PASSWORD=${CI_BUILD_TOKEN}; export DOCKER_REGISTRY=${CI_REGISTRY_IMAGE}; fi; fi
- 'echo "DOCKER_REGISTRY: ${DOCKER_REGISTRY}"'
# if DOCKER_REGISTRY set, either explicitly by user or implicitly by GitLab
# (see above) we login to repo, build images and push them
- if [ -n "${DOCKER_REGISTRY}" ]; then docker login -u ${DOCKER_USER} -p=${DOCKER_PASSWORD} ${DOCKER_REGISTRY}; fi
- if [ -n "${DOCKER_REGISTRY}" ]; then make ${CI_JOB_NAME} && make ${CI_JOB_NAME}-push; fi
vr-xcon:
<<: *build-template
vr-bgp:
<<: *build-template
csr:
<<: *build-template
nxos:
<<: *build-template
routeros:
<<: *build-template
sros:
<<: *build-template
veos:
<<: *build-template
vmx:
<<: *build-template
vsr1000:
<<: *build-template
vqfx:
<<: *build-template
vrp:
<<: *build-template
xrv:
<<: *build-template
xrv9k:
<<: *build-template