Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
midPoint_container/jenkins-rebuild.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
22 lines (14 sloc)
645 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Temporary workaround for docker/util not rebuilding the specific version of the image | |
# from destroy.sh (adapted) | |
source common.bash | |
source tag.bash | |
echo "Rebuilding $maintainer/$imagename:$tag..." | |
result=$(docker ps -a | grep $maintainer/$imagename:$tag) | |
if [ ! -z "$result" ]; then | |
docker rm -f $(docker ps -a | grep $maintainer/$imagename:$tag | awk '{print $1}') | |
docker rmi -f $maintainer/$imagename:$tag | |
fi | |
# from build.sh (adapted) | |
echo "Building new Docker image($maintainer/$imagename:$tag)" | |
docker build --rm -t $maintainer/$imagename:$tag --build-arg maintainer=$maintainer --build-arg imagename=$imagename . |