-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtravis-deploy.sh
executable file
·40 lines (35 loc) · 1.13 KB
/
travis-deploy.sh
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
#!/bin/bash
set -e
image="stefanscherer/monitor"
docker tag monitor "$image:linux-$ARCH-$TRAVIS_TAG"
docker push "$image:linux-$ARCH-$TRAVIS_TAG"
if [ "$ARCH" == "amd64" ]; then
set +e
echo "Waiting for other images $image:linux-arm-$TRAVIS_TAG"
until docker run --rm stefanscherer/winspector "$image:linux-arm-$TRAVIS_TAG"
do
sleep 15
echo "Try again"
done
until docker run --rm stefanscherer/winspector "$image:linux-arm64-$TRAVIS_TAG"
do
sleep 15
echo "Try again"
done
set -e
echo "Downloading manifest-tool"
wget https://github.com/estesp/manifest-tool/releases/download/v0.5.0/manifest-tool-linux-amd64
mv manifest-tool-linux-amd64 manifest-tool
chmod +x manifest-tool
./manifest-tool
echo "Pushing manifest $image:$TRAVIS_TAG"
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm,linux/arm64 \
--template "$image:OS-ARCH-$TRAVIS_TAG" \
--target "$image:$TRAVIS_TAG"
echo "Pushing manifest $image:latest"
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm,linux/arm64 \
--template "$image:OS-ARCH-$TRAVIS_TAG" \
--target "$image:latest"
fi