mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-23 09:04:27 +01:00
ci: Update circleci-matrix to display when each sub-step starts and finishes
This commit is contained in:
parent
6018cc6241
commit
7fb4b89937
@ -17,10 +17,23 @@ command:
|
|||||||
if [[ $STEP == "dependencies" ]]; then
|
if [[ $STEP == "dependencies" ]]; then
|
||||||
if [[ $CIRCLE_NODE_INDEX == 0 ]]; then
|
if [[ $CIRCLE_NODE_INDEX == 0 ]]; then
|
||||||
if [[ ! -f ~/BASE_AVAILABLE ]]; then
|
if [[ ! -f ~/BASE_AVAILABLE ]]; then
|
||||||
if [[ -e ~/docker/base.tar ]]; then time docker load -i ~/docker/base.tar; fi
|
|
||||||
|
if [[ -e ~/docker/base.tar ]]; then
|
||||||
|
echo "Loading base.tar from ~/docker cache"
|
||||||
|
time docker load -i ~/docker/base.tar
|
||||||
|
echo "Loading base.tar from ~/docker cache - done"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Pulling dockcross/base"
|
||||||
time docker pull dockcross/base
|
time docker pull dockcross/base
|
||||||
|
echo "Pulling dockcross/base - done"
|
||||||
|
|
||||||
time make base.test
|
time make base.test
|
||||||
|
|
||||||
|
echo "Saving debian:jessie dockcross/base into ~/docker cache"
|
||||||
mkdir -p ~/docker; time docker save -o ~/docker/base.tar debian:jessie dockcross/base
|
mkdir -p ~/docker; time docker save -o ~/docker/base.tar debian:jessie dockcross/base
|
||||||
|
echo "Saving debian:jessie dockcross/base into ~/docker cache - done"
|
||||||
|
|
||||||
touch ~/BASE_AVAILABLE
|
touch ~/BASE_AVAILABLE
|
||||||
else
|
else
|
||||||
echo "Base image already available"
|
echo "Base image already available"
|
||||||
@ -34,9 +47,12 @@ command:
|
|||||||
exit_code=$?
|
exit_code=$?
|
||||||
if [[ $exit_code -eq 0 ]]; then break; elif [[ $exit_code -eq 1 ]]; then echo -n "."; else exit $exit_code;fi
|
if [[ $exit_code -eq 0 ]]; then break; elif [[ $exit_code -eq 1 ]]; then echo -n "."; else exit $exit_code;fi
|
||||||
done
|
done
|
||||||
echo ""
|
echo "Waiting for node0 - done"
|
||||||
|
|
||||||
echo "Copying base image from node0"
|
echo "Copying base image from node0"
|
||||||
mkdir -p ~/docker; time scp node0:~/docker/base.tar ~/docker/base.tar
|
mkdir -p ~/docker; time scp node0:~/docker/base.tar ~/docker/base.tar
|
||||||
|
echo "Copying base image from node0 - done"
|
||||||
|
|
||||||
touch ~/BASE_DOWNLOADED
|
touch ~/BASE_DOWNLOADED
|
||||||
else
|
else
|
||||||
echo "Base image already downloaded"
|
echo "Base image already downloaded"
|
||||||
@ -44,18 +60,38 @@ command:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $STEP == "test" ]]; then
|
if [[ $STEP == "test" ]]; then
|
||||||
if [[ -e ~/docker/$IMAGE.tar ]]; then time docker load -i ~/docker/$IMAGE.tar; fi
|
if [[ -e ~/docker/$IMAGE.tar ]]; then
|
||||||
|
echo "Loading $IMAGE.tar from ~/docker cache"
|
||||||
|
time docker load -i ~/docker/$IMAGE.tar
|
||||||
|
echo "Loading $IMAGE.tar from ~/docker cache - done"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Pulling dockcross/$IMAGE"
|
||||||
time docker pull dockcross/$IMAGE
|
time docker pull dockcross/$IMAGE
|
||||||
|
echo "Pulling dockcross/$IMAGE - done"
|
||||||
|
|
||||||
|
echo "Loading base.tar from ~/docker cache"
|
||||||
time docker load -i ~/docker/base.tar
|
time docker load -i ~/docker/base.tar
|
||||||
|
echo "Loading base.tar from ~/docker cache - done"
|
||||||
|
|
||||||
time make $IMAGE.test
|
time make $IMAGE.test
|
||||||
|
|
||||||
|
echo "Saving dockcross/$IMAGE into ~/docker cache"
|
||||||
mkdir -p ~/docker; time docker save dockcross/$IMAGE > ~/docker/$IMAGE.tar
|
mkdir -p ~/docker; time docker save dockcross/$IMAGE > ~/docker/$IMAGE.tar
|
||||||
|
echo "Saving dockcross/$IMAGE into ~/docker cache - done"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
- |
|
- |
|
||||||
if [[ $STEP == "deployment" ]]; then
|
if [[ $STEP == "deployment" ]]; then
|
||||||
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
||||||
if [[ $CIRCLE_NODE_INDEX == 0 ]] && [[ ! -f ~/BASE_PUSHED ]]; then
|
if [[ $CIRCLE_NODE_INDEX == 0 ]] && [[ ! -f ~/BASE_PUSHED ]]; then
|
||||||
|
echo "Pushing dockcross/base"
|
||||||
time docker push dockcross/base
|
time docker push dockcross/base
|
||||||
|
echo "Pulling dockcross/base - done"
|
||||||
touch ~/BASE_PUSHED
|
touch ~/BASE_PUSHED
|
||||||
fi
|
fi
|
||||||
docker push dockcross/$IMAGE
|
|
||||||
|
echo "Pushing dockcross/$IMAGE"
|
||||||
|
time docker push dockcross/$IMAGE
|
||||||
|
echo "Pushing dockcross/$IMAGE - done"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user