-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
58 lines (58 loc) · 2.83 KB
/
.travis.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
sudo: required
addons:
apt:
update: true
packages:
- docker-ce
services:
- docker
script:
- export DOCKER_CLI_EXPERIMENTAL=enabled
- source utils.sh
- alpine_arm_sha=$(get_manifest_sha "treehouses/alpine:latest" "arm")
- echo $alpine_arm_sha
- moodle_arm_sha=$(get_manifest_sha "treehouses/moodle:latest" "arm")
- echo $moodle_arm_sha
- flag_arm=$(is_base "treehouses/alpine@"$alpine_arm_sha "treehouses/moodle@"$moodle_arm_sha)
- echo $flag_arm
- alpine_amd64_sha=$(get_manifest_sha "treehouses/alpine:latest" "amd64")
- echo $alpine_amd64_sha
- moodle_amd64_sha=$(get_manifest_sha "treehouses/moodle:latest" "amd64")
- echo $moodle_amd64_sha
- flag_amd64=$(is_base "treehouses/alpine@"$alpine_amd64_sha "treehouses/moodle@"$moodle_amd64_sha)
- echo $flag_amd64
- alpine_arm64_sha=$(get_manifest_sha "treehouses/alpine:latest" "arm64")
- echo $alpine_arm64_sha
- moodle_arm64_sha=$(get_manifest_sha "treehouses/moodle:latest" "arm64")
- echo $moodle_arm64_sha
- flag_arm64=$(is_base "treehouses/alpine@"$alpine_arm64_sha "treehouses/moodle@"$moodle_arm64_sha)
- echo $flag_arm64
- echo $DOCKERAPIKEY | docker login -u "sevenseas" --password-stdin
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- build_image "treehouses/alpine:latest" arm "treehouses/moodle" $flag_arm
- build_image "treehouses/alpine:latest" arm64 "treehouses/moodle" $flag_arm64
- build_image "treehouses/alpine:latest" amd64 "treehouses/moodle" $flag_amd64
- flag=$(change $flag_arm $flag_arm64 $flag_amd64)
- flag="true"
- echo $flag
before_deploy:
- deploy_image "treehouses/moodle" arm
- deploy_image "treehouses/moodle" arm64
- deploy_image "treehouses/moodle" amd64
- tag1="latest"
- tag2=$(date +%Y%m%d%H%M)
- echo $tag2
- create_manifests treehouses/moodle $tag1 $tag2 treehouses/moodle-tags:amd64 treehouses/moodle-tags:arm
treehouses/moodle-tags:arm64
- docker manifest inspect treehouses/moodle:$tag1
- docker manifest inspect treehouses/moodle:$tag2
deploy:
- provider: script
script: docker manifest push treehouses/moodle:$tag1; docker manifest push treehouses/moodle:$tag2
skip_cleanup: true
on:
all_branches: true
condition: "$flag = true"
env:
global:
- secure: AyMpQLm5AWpl+Y+xiTwfot+kStwXOkb1yh5bzRsyAVDSjgxHAo3BtzzZlvUX4PpeQUsjTzJWgZl6lWuOlervtfOhuhSxi79WfZ3x0CPZwEfuV+VsCOUXk+WOWLDy/f3RFJYMvV40npvD4IjXZOQYR66pq/bR8sL7OTbPMc2JoAl9eZXJZTsHHEyYcx/v2uu/w6RZ/MT1aC1xUFJlYCLOsCwwOVC/x8KqzH5lKk2KRxtWuyr1aysgqkt6tsPPynKxsLgZFC9FVy0MZAn6A+im92fbRhhhTIvkWIMeiapG269cFih0A1ZJA6DyeiLRCNBkqbsvVZ5onDcXe/dzGlN5H374nYUgsJvIWUWAx7AEpcJ3OJyzhVmw87BvrM1gsMxF/W1RW9qSAbpYFdNIl4mfsX5ZC3WbdJLBUeCuB6qpFp8yX/y0Vcb8U9xS6atnLSsm6hJwF5jbIvyCKx2+D4vTx+l7g7eFEJX3t4ULrbyQYSmgcvdAo8MaCocZd07pQA4fjKa4kvgKxy0atMgpInFa7eb35qwKCJBv7YmyoCBPJ6S9FlUajWLxuFW4X2qta0PNerfFCc4K3GR3HAOg09SRfFeC/hKk4Qw9UI25HRxmjzoWNJTD7AxxEEzYk9sgPArPNvSu/mTHHcsG80dclZzADeNUjzEMWp7CmQmlRIYnDpM=