-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
executable file
·58 lines (58 loc) · 3.29 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
dist: bionic
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
- alpine_amd64_sha=$(get_manifest_sha "treehouses/alpine:latest" "amd64")
- echo $alpine_amd64_sha
- alpine_arm64_sha=$(get_manifest_sha "treehouses/alpine:latest" "arm64")
- echo $alpine_arm64_sha
- webssh_arm_sha=$(get_manifest_sha "treehouses/webssh:latest" "arm")
- echo $webssh_arm_sha
- webssh_amd64_sha=$(get_manifest_sha "treehouses/webssh" "amd64")
- echo $webssh_amd64_sha
- webssh_arm64_sha=$(get_manifest_sha "treehouses/webssh" "arm64")
- echo $webssh_arm64_sha
- flag_arm=$(is_base "treehouses/alpine@"$alpine_arm_sha "treehouses/webssh@"$webssh_arm_sha )
- echo $flag_arm
- flag_amd64=$(is_base "treehouses/alpine@"$alpine_amd64_sha "treehouses/webssh@"$webssh_amd64_sha )
- echo $flag_amd64
- flag_arm64=$(is_base "treehouses/alpine@"$alpine_arm64_sha "treehouses/webssh@"$webssh_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/webssh" #base image is arm arch
- build_image "treehouses/alpine:latest" amd64 "treehouses/webssh" #base image is amd64 arch
- build_image "treehouses/alpine:latest" arm64 "treehouses/webssh" #base image is arm64 arch
#- "./docker-build.sh treehouses/alpine:latest arm arm64 amd64"
- flag=$(compare "treehouses/alpine@"$alpine_arm_sha "treehouses/webssh@"$webssh_arm_sha "treehouses/alpine@"$alpine_amd64_sha "treehouses/webssh@"$webssh_amd64_sha "treehouses/alpine@"$alpine_arm64_sha "treehouses/webssh@"$webssh_arm64_sha "treehouses/webssh:latest" "treehouses/webssh-tags:amd64")
- echo $flag
before_deploy:
- deploy_image "treehouses/webssh" arm
- deploy_image "treehouses/webssh" amd64
- deploy_image "treehouses/webssh" arm64
- tag_time=$(date +%Y%m%d%H%M)
- echo $tag_time
- tag_latest="latest"
- create_manifest treehouses/webssh $tag_latest $tag_time treehouses/webssh-tags:arm treehouses/webssh-tags:arm64 treehouses/webssh-tags:amd64
- docker manifest inspect treehouses/webssh:$tag_latest
- docker manifest inspect treehouses/webssh:$tag_time
deploy:
- provider: script
script: docker manifest push treehouses/webssh:$tag_latest; docker manifest push treehouses/webssh:$tag_time
skip_cleanup: true
on:
all_branches: true
condition: "$flag = true"
env:
global:
secure: "BmYuUvrKczoqtSiaxI7ps4LLdzpLNGnPTR9gFM7A6+mcYU9FOIAgzuhDC00tq2NeafpXpebmA+e/i1f+QPHg/z6pIVnYq0UM7IfzHBrP2KBu9QIoOn62KcAwVgMAbvIVpASN1zsykYba8NHuiloQ7ol2CxnqJupdhxUr4+d0nthYCM90at/qLHQRrvplIdBfLY6ilGGEOad9zq1HLZDkmsJPHkhVEm8QVeiEQg2JxBmhZLGD1dT5HATJIhsnwBuzq1GBBzFQ0ELeH0svRnXpUsBLa8MK94+mxVCG+mARbka2Cqp8TfhZv5+Sa+7Bdxwvq9HOtdg/2KF+sxz+lKPQ/agmAvt+UR0VtOEND2hWhQrvUXZpOJY5zq2B+2XnLJHc/pzAlHYLnRVXwszW6fR8ILw27m+0OL5GnRY/s8gBT0BnTH4NAAobc+Jz4RPFfAJT1EWoiBDn3odPcE2U+D7uEnadrZD7Kz+TBMKC0xQ6ba2KPxbt1JWIGKSynedzW40BPXw1mZfZGgw793H1pIzehVrrf83nU1/26h80ujT2gljbP4kwN0kwM8LQtjI/1665spqNhXc/UIzT5RJT74OU5GHKAJrF5nIT/feNncudOk05Qg/riO3T4Ks66BhfAF4LN0V6/7A/k44iROM8fxaZ+j7Amu5uhJPJnDBo3mWIkqI="