forked from sugarlabs/turtleblocksjs
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
61 lines (61 loc) · 3.29 KB
/
.travis.yml
File metadata and controls
61 lines (61 loc) · 3.29 KB
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
sudo: required
addons:
apt:
update: true
packages:
- docker-ce
services:
- docker
script:
- export DOCKER_CLI_EXPERIMENTAL=enabled
- source utils.sh
- turtle_arm_sha=$(get_manifest_sha "treehouses/turtleblocksjs:latest" "arm")
- echo $turtle_arm_sha
- nginx_arm_sha=$(get_manifest_sha "treehouses/nginx:latest" "arm")
- echo $nginx_arm_sha
- flag_arm=$(is_base "treehouses/nginx@"$nginx_arm_sha "treehouses/turtleblocksjs@"$turtle_arm_sha)
- echo $flag_arm
- turtle_amd64_sha=$(get_manifest_sha "treehouses/turtleblocksjs:latest" "amd64")
- echo $turtle_amd64_sha
- nginx_amd64_sha=$(get_manifest_sha "treehouses/nginx:latest" "amd64")
- echo $nginx_amd64_sha
- flag_amd64=$(is_base "treehouses/nginx@"$nginx_amd64_sha "treehouses/turtleblocksjs@"$turtle_amd64_sha)
- echo $flag_amd64
- turtle_arm64_sha=$(get_manifest_sha "treehouses/turtleblocksjs:latest" "arm64")
- echo $turtle_arm64_sha
- nginx_arm64_sha=$(get_manifest_sha "treehouses/nginx:latest" "arm64")
- echo $nginx_arm64_sha
- flag_arm64=$(is_base "treehouses/nginx@"$nginx_arm64_sha "treehouses/turtleblocksjs@"$turtle_arm64_sha)
- echo $flag_arm64
- flag=$(compare "treehouses/nginx@"$nginx_arm_sha "treehouses/turtleblocksjs@"$turtle_arm_sha "treehouses/nginx@"$nginx_amd64_sha "treehouses/turtleblocksjs@"$turtle_amd64_sha "treehouses/nginx@"$nginx_arm64_sha "treehouses/turtleblocksjs@"$turtle_arm64_sha)
- echo $flag
before_deploy:
- echo "$DOCKERPASS" | docker login -u sevenseas --password-stdin
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- build_image "treehouses/nginx:latest" arm "treehouses/turtleblocksjs" #base image is arm arch
- build_image "treehouses/nginx:latest" amd64 "treehouses/turtleblocksjs" #base image is amd64 arch
- build_image "treehouses/nginx:latest" arm64 "treehouses/turtleblocksjs" #base image is arm64 arch
- deploy_image "treehouses/turtleblocksjs" arm
- deploy_image "treehouses/turtleblocksjs" amd64
- deploy_image "treehouses/turtleblocksjs" arm64
#before_deploy: #in case we want to check the code
- timetag=$(date +%Y%m%d%H%M)
- echo $timetag
- tag1="latest"
- tag2=$timetag
- echo "timetag is $tag2"
- create_manifest treehouses/turtleblocksjs $tag1 $tag2 treehouses/turtleblocksjs-tags:amd64
treehouses/turtleblocksjs-tags:arm treehouses/turtleblocksjs-tags:arm64
- docker manifest inspect treehouses/turtleblocksjs:$tag1
- docker manifest inspect treehouses/turtleblocksjs:$tag2
deploy:
- provider: script
script: docker manifest push treehouses/turtleblocksjs:$tag1; docker manifest push
treehouses/turtleblocksjs:$tag2
skip_cleanup: true
on:
all_branches: true
condition: "$flag = true"
env:
global:
- secure: p/oMr9+Zmk991tu7JiNx1ySJ0LhzBFKHIGHJwhjSK0Cz0vhLv2Jw2ii9iW169mCFEut9LlGXwb8LeP54g/ZKfdj+RP+SsvrcUMyyZQaMQ12Fa0dC1hRu2+ovu+uffoH4IgoRt2Lc2YGi/Etr9QYLLdu6BD1Sx6KaSweEne1RCfXj2EyGsMqWWkE+N4xqhPsVICdjnmCXeg+ROVgOobtFjGn3BAujDsQBqpELWRAydGQNGgvYca8RQlLSnSTDNqrLEo4NyjyqKbvgAmp5UNDo6yA9MIQTUbbP7habpkrtAzR0+ilUAzsAc9x/6B0ua/eDaRVon5peIHnoM+kt5P5wNsZFt9spB1qsp/TL5Vif2wjvF9sMHO8baCOBI6yqc149Fmcpd6/JdQvyHt3vol8j9BcSG8y9Tr2GiceuwRTLWqgN6xHDFYsrOiSwddyY+BxK/Uqh50CZLKn/IQePfg/Hz+Qy1wRhiFiE9mYmcJ2BApc4hYT5LZ63KjeoJzoH6dP+p+AvXWeRAmYFvZiKtlPWJ9nEex+EhQ7d71icbBNxCmPcESoDgk6oHgA2qeThtXFUj8ApjuGsqNhJsXu6epHE+PnFB5+jllXNolo3sPDKB6cq1POzxb2AJDkzw56kxT3hzmyssBg0MqXZ46mpUOio233nEsuLpRAC8iIF+SeScKs=