forked from socallinuxexpo/scale-network
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
50 lines (50 loc) · 1.49 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
#shallow clones to speed up build
variables:
GIT_DEPTH: 10
# Keep all jobs within these 3 stages
stages:
- test
- build
- integ
# This build takes a long time and should be done
# outside of initial PR CI testing
openwrt-ar71xx-build:
stage: build
# Takes more than 1 hr to build on gitlab shared runners
timeout: 3 hours
only:
variables:
- $OPENWRT_BUILD == "YES"
image:
name: sarcasticadmin/openwrt-build@sha256:bab6de3f66f5365d866de646bb9fd1f2000061d1a5fe8a07b6a714661a9a9a63
script:
- cd ${CI_PROJECT_DIR}/openwrt
- TARGET=ar71xx make templates build-img 2>&1 | tee build.log | grep -i -E "^make.*(error|[12345]...Entering dir)"
artifacts:
paths:
- openwrt/build.log
- openwrt/build/source-ar71xx-*/bin/targets/ath79/generic/
expire_in: 1 week
openwrt-3800ch-integ:
variables:
CI_DEBUG_TRACE: "false"
stage: integ
only:
variables:
- $OPENWRT_INTEG == "YES"
tags:
- openwrt
script:
- cd ${CI_PROJECT_DIR}/openwrt/
- ${CI_PROJECT_DIR}/openwrt/scripts/local/gather-artifact.sh
- sudo -s ./autoflash
- cd ${CI_PROJECT_DIR}/tests/serverspec
- bundle config set --local path '.bundle'
- bundle install
- bash -c 'until nc -zvw 5 192.168.254.100 22; do echo "SSH not ready"; sleep 3; done'
- bundle exec rake spec TEST_TYPE=openwrt TARGET_HOST=192.168.254.100 | tee ${CI_PROJECT_DIR}/openwrt/work/serverspec.log
- rm -rf ./.bundle
artifacts:
paths:
- openwrt/work/
expire_in: 1 week