forked from mpromonet/webrtc-streamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
155 lines (147 loc) · 7.95 KB
/
.cirrus.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
linux_docker_builder:
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
clone_script: |
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
script: |
docker info
export TAG=${CIRRUS_TAG:-${CIRRUS_BRANCH}}
[ "$TAG" == "master" ] && export TAG=latest
docker build -t $CIRRUS_REPO_FULL_NAME:${TAG}-amd64 . -f Dockerfile
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker push $CIRRUS_REPO_FULL_NAME:${TAG}-amd64
linuxarmv7_docker_builder:
timeout_in: 120m
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
clone_script: |
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
script: |
docker info
export TAG=${CIRRUS_TAG:-${CIRRUS_BRANCH}}
[ "$TAG" == "master" ] && export TAG=latest
docker build -t $CIRRUS_REPO_FULL_NAME:${TAG}-armv7 . -f Dockerfile.rpi --build-arg ARCH=armv7l --build-arg CROSSCOMPILER=https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-10.2.0-pi_2-3.tar.gz --build-arg IMAGE=balenalib/raspberry-pi2
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker push $CIRRUS_REPO_FULL_NAME:${TAG}-armv7
linuxarmv6_docker_builder:
timeout_in: 120m
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
clone_script: |
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
script: |
docker info
export TAG=${CIRRUS_TAG:-${CIRRUS_BRANCH}}
[ "$TAG" == "master" ] && export TAG=latest
docker build -t $CIRRUS_REPO_FULL_NAME:${TAG}-armv6 . -f Dockerfile.rpi
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker push $CIRRUS_REPO_FULL_NAME:${TAG}-armv6
linuxarm64_docker_builder:
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
clone_script: |
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git reset --hard $CIRRUS_CHANGE_IN_REPO
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
script: |
docker info
export TAG=${CIRRUS_TAG:-${CIRRUS_BRANCH}}
[ "$TAG" == "master" ] && export TAG=latest
docker build -t $CIRRUS_REPO_FULL_NAME:${TAG}-arm64 . -f Dockerfile.arm64
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker push $CIRRUS_REPO_FULL_NAME:${TAG}-arm64
windows_docker_builder:
only_if: $CIRRUS_TAG == '' && $CIRRUS_BRANCH != 'master'
timeout_in: 120m
platform: windows
os_version: 2019
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
CIRRUS_CLONE_DEPTH: 100
script: |
docker info
set TAG=%CIRRUS_BRANCH%
docker build --no-cache -t %CIRRUS_REPO_FULL_NAME%:%TAG%-windows . -f Dockerfile.windows
docker login --username=%DOCKERHUB_USER% --password=%DOCKERHUB_PASS%
docker push %CIRRUS_REPO_FULL_NAME%:%TAG%-windows
windowsbranch_docker_builder:
only_if: $CIRRUS_TAG == '' && $CIRRUS_BRANCH == 'master'
timeout_in: 120m
platform: windows
os_version: 2019
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
CIRRUS_CLONE_DEPTH: 100
script: |
docker info
set TAG=latest
docker build --no-cache -t %CIRRUS_REPO_FULL_NAME%:%TAG%-windows . -f Dockerfile.windows
docker login --username=%DOCKERHUB_USER% --password=%DOCKERHUB_PASS%
docker push %CIRRUS_REPO_FULL_NAME%:%TAG%-windows
windowstag_docker_builder:
only_if: $CIRRUS_TAG != ''
timeout_in: 120m
platform: windows
os_version: 2019
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
CIRRUS_CLONE_DEPTH: 100
script: |
docker info
set TAG=%CIRRUS_TAG%
docker build --no-cache -t %CIRRUS_REPO_FULL_NAME%:%TAG%-windows . -f Dockerfile.windows
docker login --username=%DOCKERHUB_USER% --password=%DOCKERHUB_PASS%
docker push %CIRRUS_REPO_FULL_NAME%:%TAG%-windows
publish_docker_builder:
depends_on:
- linuxarmv6
- linuxarmv7
- linuxarm64
- linux
- windowsbranch
- windowstag
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[7b81d2ca7878761ea497619cae892e267c0e0fdee71d8ce48dcd4ba11b9351a9d3f2f781dce84a7f8aab92a278007509]
script: |
docker info
export TAG=${CIRRUS_TAG:-latest}
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker manifest create --amend $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-amd64 $CIRRUS_REPO_FULL_NAME:${TAG}-armv7 $CIRRUS_REPO_FULL_NAME:${TAG}-armv6 $CIRRUS_REPO_FULL_NAME:${TAG}-windows $CIRRUS_REPO_FULL_NAME:${TAG}-arm64
docker manifest annotate $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-armv7 --os linux --arch arm --variant v7
docker manifest annotate $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-armv6 --os linux --arch arm --variant v6l
docker manifest push $CIRRUS_REPO_FULL_NAME:${TAG} -p