diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh deleted file mode 100755 index 0f8f00a5..00000000 --- a/.github/fiware/image-clone.sh +++ /dev/null @@ -1,42 +0,0 @@ -set -e - -SOURCE="telefonicaiot/iotagent-ul" -DOCKER_TARGET="fiware/iotagent-ul" -QUAY_TARGET="quay.io/fiware/iotagent-ul" - -# DOCKER_TARGET="fiware/$(basename $(git rev-parse --show-toplevel))" -# QUAY_TARGET="quay.io/fiware/$(basename $(git rev-parse --show-toplevel))" - -VERSION=$(git describe --exclude 'FIWARE*' --tags $(git rev-list --tags --max-count=1)) - -function clone { - echo 'cloning from '"$1 $2"' to '"$3" - docker pull -q "$1":"$2" - docker tag "$1":"$2" "$3":"$2" - docker push -q "$3":"$2" - - if ! [ -z "$4" ]; then - echo 'pushing '"$1 $2"' to latest' - docker tag "$1":"$2" "$3":latest - docker push -q "$3":latest - fi -} - -for i in "$@" ; do - if [[ $i == "docker" ]]; then - - clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true - clone "$SOURCE" "$VERSION"-distroless "$DOCKER_TARGET" - fi - if [[ $i == "quay" ]]; then - clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true - clone "$SOURCE" "$VERSION"-distroless "$QUAY_TARGET" - fi - echo "" -done - -for i in "$@" ; do - if [[ $i == "clean" ]]; then - docker rmi -f $(docker images -a -q) | true - fi -done