This repository has been archived by the owner on Feb 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
75 lines (69 loc) · 2.09 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
64
65
66
67
68
69
70
71
72
73
74
75
variables:
DEBUG: 1
build:
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:alpine$CI_COMMIT_REF_SLUG" -f ".ci/Dockerfile.alpine" .
- docker build --pull -t "$CI_REGISTRY_IMAGE:debian$CI_COMMIT_REF_SLUG" -f ".ci/Dockerfile.debian" .
- docker push "$CI_REGISTRY_IMAGE"
test-examples:
image: "$CI_REGISTRY_IMAGE:alpine$CI_COMMIT_REF_SLUG"
stage: test
script:
- |
for example in $(ls example-*.sh); do
bash "$example"
done
test-alpine-1806:
image: "$CI_REGISTRY_IMAGE:alpine$CI_COMMIT_REF_SLUG"
stage: test
variables:
VERSION: "18.06.4"
TARGET: "ar71xx/generic"
PROFILE: "archer-c7-v4"
script:
- bash ./meta info
- bash ./meta package_list
- bash ./meta image
- ls ./bin/openwrt/releases/$VERSION/targets/$TARGET/*sysupgrade.bin
test-alpine-snapshot:
image: "$CI_REGISTRY_IMAGE:alpine$CI_COMMIT_REF_SLUG"
stage: test
variables:
TARGET: "ath79/generic"
PROFILE: "tplink_archer-c7-v1"
script:
- bash ./meta info
- bash ./meta package_list
- bash ./meta image
- ls ./bin/openwrt/snapshots/targets/$TARGET/*sysupgrade.bin
test-debian-snapshot:
image: "$CI_REGISTRY_IMAGE:debian$CI_COMMIT_REF_SLUG"
stage: test
variables:
TARGET: "ath79/generic"
PROFILE: "tplink_archer-c7-v1"
script:
- bash ./meta info
- bash ./meta package_list
- bash ./meta image
- ls ./bin/openwrt/snapshots/targets/$TARGET/*sysupgrade.bin
deploy:
image: docker:latest
only:
- master
stage: deploy
services:
- docker:dind
before_script:
- docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
script:
- docker build --pull -t "aparcar/openwrt-metabuilder:alpine" -f ".ci/Dockerfile.alpine" .
- docker build --pull -t "aparcar/openwrt-metabuilder:debian" -f ".ci/Dockerfile.debian" .
- docker tag "aparcar/openwrt-metabuilder:debian" "aparcar/openwrt-metabuilder:latest"
- docker push "aparcar/openwrt-metabuilder"