Update CI to create a docker faas-cli image

With  this  change  the  CI  releases a tagged Docker image named
`faas-cli` after every GitHub release/tag and  pushes  the  image
to a docker reistry.

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
This commit is contained in:
Ivana Yovcheva (VMware)
2018-04-24 15:29:29 +03:00
committed by Alex Ellis
parent cd45f60a47
commit 101bee35e1
3 changed files with 29 additions and 4 deletions

View File

@@ -1,6 +1,14 @@
#!/bin/sh
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -t faas-cli . && \
docker create --name faas-cli faas-cli && \
export eTAG="latest-dev"
echo $1
if [ $1 ] ; then
eTAG=$1
fi
echo Building openfaas/faas-cli:$eTAG
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -t openfaas/faas-cli:$eTAG . && \
docker create --name faas-cli openfaas/faas-cli:$eTAG && \
docker cp faas-cli:/root/faas-cli . && \
docker rm -f faas-cli