-
Notifications
You must be signed in to change notification settings - Fork 604
/
.cirrus.yml
105 lines (100 loc) · 5.82 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
linux_docker_builder:
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
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[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
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[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
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[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
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
publish_docker_builder:
depends_on:
- linuxarmv6
- linuxarmv7
- linuxarm64
- linux
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
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}-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