-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
60 lines (60 loc) · 3.07 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
59
60
sudo: required
addons:
apt:
update: true
packages:
- docker-ce
services:
- docker
script:
- export DOCKER_CLI_EXPERIMENTAL=enabled
- source utils.sh
- debian_arm_sha=$(get_manifest_sha "treehouses/debian:latest" "arm")
- echo $debian_arm_sha
- apache_arm_sha=$(get_manifest_sha "treehouses/apache:latest" "arm")
- echo $apache_arm_sha
- flag_arm=$(is_base "treehouses/debian@"$debian_arm_sha "treehouses/apache@"$apache_arm_sha)
- echo $flag_arm
- debian_amd64_sha=$(get_manifest_sha "treehouses/debian:latest" "amd64")
- echo $debian_amd64_sha
- apache_amd64_sha=$(get_manifest_sha "treehouses/apache:latest" "amd64")
- echo $apache_amd64_sha
- flag_amd64=$(is_base "treehouses/debian@"$debian_amd64_sha "treehouses/apache@"$apache_amd64_sha)
- echo $flag_amd64
- debian_arm64_sha=$(get_manifest_sha "treehouses/debian:latest" "arm64")
- echo $debian_arm64_sha
- apache_arm64_sha=$(get_manifest_sha "treehouses/apache:latest" "arm64")
- echo $apache_arm64_sha
- flag_arm64=$(is_base "treehouses/debian@"$debian_arm64_sha "treehouses/apache@"$apache_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/debian:latest" arm "treehouses/apache"
- build_image "treehouses/debian:latest" amd64 "treehouses/apache"
- build_image "treehouses/debian:latest" arm64 "treehouses/apache"
- flag=$(compare "treehouses/debian@"$debian_arm_sha "treehouses/apache@"$apache_arm_sha "treehouses/debian@"$debian_amd64_sha "treehouses/apache@"$apache_amd64_sha "treehouses/debian@"$debian_arm64_sha "treehouses/apache@"$apache_arm64_sha "treehouses/apache:latest" "treehouses/apache-tags:amd64")
- echo $flag
#- flag=false
before_deploy:
- deploy_image "treehouses/apache" arm
- deploy_image "treehouses/apache" amd64
- deploy_image "treehouses/apache" arm64
- timetag=$(date +%Y%m%d%H%M)
- echo $timetag
- tag1="latest"
- tag2=$timetag
- echo $tag2
- create_manifest treehouses/apache $tag1 $tag2 treehouses/apache-tags:amd64 treehouses/apache-tags:arm
treehouses/apache-tags:arm64
- docker manifest inspect treehouses/apache:$tag1
- docker manifest inspect treehouses/apache:$tag2
deploy:
- provider: script
script: docker manifest push treehouses/apache:$tag1; docker manifest push treehouses/apache:$tag2
skip_cleanup: true
on:
all_branches: true
condition: "$flag = true"
env:
global:
- secure: ho/V9sBvcRIjMBzN/FMJDuCFvfZ1z2tUD7INjOzOfizXOK152Mtog64mDaToXAyuXT7GdXP/oz7Rf73jFurE5Xt46EKT7/HluGWvAgYyn9QqvzX1hdM5urMmO/vesfOb/BivbaJatazoNC7AayRiqecG+sMDr2nsgoAlZ1SXjum82x8J0yC1YGhPhHcx/A+KBIuUs/RQDc7iiTCrZuQ65oOXqeKI6TP5N4Qhp6gMJRA5DDoGU0jjwOK3UvCp0zUU29RVjnlldePks/Dl2dATXyTPR+bvZuS8lFy1S8rtLcjdE7wqF1JWv1nmijULGGv68q5yeWO68vELQT6BC/ziYUF/6xQ1VTVloMgaiuzjQKrpd5T2gMhALsSZpZgegg+/zl8RBFyg5hyPV8NH9GmkD3dhDPnR2r4oVaURur2Vmj+aD4hjm3WNhtxNQJ4vJTasTU1A3KWymenfNG0voV3okJe/GsPnx7OYI1R0Cgn6mgV60CHwofYQdtMBkuF9WiYNhqvoUZnJytW2/MbJNLV8Ff7pmuvAz8EJtFhEnfyEr9kpHY/9cxL7NtJJLwrtFToX9wcBpLpbyGRiMpJWecFG42G6EJ/0M5hk8pZzescLM++JCksIMvJncpqLptD6ihi/ff9tPCipGiCAJEfuutMYzEHR5arWKoDmh9W9IF/ylgc=