diff --git a/.github/fiware/image-clone.sh b/.github/fiware/image-clone.sh new file mode 100755 index 0000000..fd3fdd8 --- /dev/null +++ b/.github/fiware/image-clone.sh @@ -0,0 +1,39 @@ +set -e + +SOURCE="orchestracities/anubis-management-api" +DOCKER_TARGET="fiware/anubis" +QUAY_TARGET="quay.io/fiware/anubis" + +# 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 + fi + if [[ $i == "quay" ]]; then + clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true + fi + echo "" +done + +for i in "$@" ; do + if [[ $i == "clean" ]]; then + docker rmi -f $(docker images -a -q) | true + fi +done \ No newline at end of file diff --git a/README.md b/README.md index 885ff10..8fa0fdd 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ [![FIWARE Security](https://nexus.lab.fiware.org/repository/raw/public/badges/chapters/security.svg)](https://www.fiware.org/developers/catalogue/) [![License: APACHE-2.0](https://img.shields.io/github/license/orchestracities/anubis.svg)](https://opensource.org/licenses/APACHE-2.0) -[![Docker Status](https://img.shields.io/docker/pulls/orchestracities/anubis-management-api.svg)](https://hub.docker.com/r/orchestracities/anubis-management-api) +[![Docker badge](https://img.shields.io/badge/quay.io-fiware%2Fanubis-grey?logo=red%20hat&labelColor=EE0000)](https://quay.io/repository/fiware/anubis) [![Support](https://img.shields.io/badge/support-ask-yellowgreen.svg)](https://github.com/orchestracities/anubis/issues) [![Documentation badge](https://img.shields.io/readthedocs/anubis-pep.svg)](https://anubis-pep.readthedocs.io/en/latest/) Welcome to Anubis! -| :books: [Documentation](https://anubis-pep.readthedocs.io/en/latest/) | :whale: [Docker Hub](https://hub.docker.com/r/orchestracities/anubis-management-api) | +| :books: [Documentation](https://anubis-pep.readthedocs.io/en/latest/) | [quay.io](https://quay.io/repository/fiware/anubis) | | ------------- | ---------------| ## What is the project about?