summaryrefslogtreecommitdiffstats
path: root/jjb/releng/testapi-docker-update.sh
blob: 84f5c3217ccaddc9407397d1b90ebb21dc6f472d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

set -o errexit
set -o nounset

cd $WORKSPACE/utils/test/testapi/docker/

# Remove previous containers
docker ps -a | grep "opnfv/testapi" | awk '{ print $1 }' | xargs -r docker rm -f

# Remove previous images
docker images | grep "opnfv/testapi" | awk '{ print $3 }' | xargs -r docker rmi -f

# Start build
docker build --no-cache -t opnfv/testapi:$DOCKER_TAG .

# Push Image
docker push opnfv/testapi:$DOCKER_TAG