forked from istio/istio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
push
executable file
·45 lines (34 loc) · 857 Bytes
/
push
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
#!/bin/bash
set -exu
HUB=${1:?"1st arg hub is required"}
TAG=${2:?"2nd arg tag is required"}
if [[ -z "${GS_BUCKET:-}" ]]; then
GS_BUCKET=${3:-"istio-artifacts"}
fi
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd $ROOT
BUILDINFO=$(mktemp)
function cleanup {
rm -rf "${BUILDINFO}"
}
trap cleanup exit
${ROOT}/bin/get_workspace_status > ${BUILDINFO}
export BUILDINFO
pilot/bin/push-docker -hub ${HUB} -tag ${TAG} &
mixer/bin/push-docker -hub ${HUB} -tag ${TAG} &
security/bin/push-docker -hub ${HUB} -tag ${TAG} &
# Only try to upload if HUB starts with gcr.io
if [[ "${HUB}" =~ ^gcr\.io ]]; then
pilot/bin/upload-istioctl -p "gs://${GS_BUCKET}/pilot/${TAG}/artifacts/istioctl" &
fi
FAIL=0
for job in `jobs -p`
do
echo $job
wait $job || let "FAIL+=1"
done
if [ "$FAIL" != "0" ];
then
echo "FAIL! ($FAIL)"
exit $FAIL
fi