diff --git a/.github/fiware/core/x-stellio.sh b/.github/fiware/core/stellio-api-gateway.sh similarity index 87% rename from .github/fiware/core/x-stellio.sh rename to .github/fiware/core/stellio-api-gateway.sh index 1025f0c42..66d28d4e2 100755 --- a/.github/fiware/core/x-stellio.sh +++ b/.github/fiware/core/stellio-api-gateway.sh @@ -2,15 +2,14 @@ set -e NAME="core/stellio" SOURCE="stellio/stellio-api-gateway" -DOCKER_TARGET="fiware/stellio" -QUAY_TARGET="quay.io/fiware/stellio" +DOCKER_TARGET="fiware/stellio-api-gateway" +QUAY_TARGET="quay.io/fiware/stellio-api-gateway" REPOSITORY="$(git rev-parse --show-toplevel)/$NAME" TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )" VERSION=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS ) -echo "NOT DONE - $VERSION" -exit 0 +echo "VERSION - $VERSION" function clone { echo 'cloning from '"$1 $2"' to '"$3" diff --git a/.github/fiware/core/stellio-search-service.sh b/.github/fiware/core/stellio-search-service.sh new file mode 100755 index 000000000..c6a8bef64 --- /dev/null +++ b/.github/fiware/core/stellio-search-service.sh @@ -0,0 +1,37 @@ +set -e + +NAME="core/stellio" +SOURCE="stellio/stellio-search-service" +DOCKER_TARGET="fiware/stellio-search-service" +QUAY_TARGET="quay.io/fiware/stellio-search-service" + +REPOSITORY="$(git rev-parse --show-toplevel)/$NAME" +TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )" +VERSION=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS ) + +echo "VERSION - $VERSION" + +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 + + diff --git a/.github/fiware/core/stellio-subscription-service.sh b/.github/fiware/core/stellio-subscription-service.sh new file mode 100755 index 000000000..bcde09ddc --- /dev/null +++ b/.github/fiware/core/stellio-subscription-service.sh @@ -0,0 +1,37 @@ +set -e + +NAME="core/stellio" +SOURCE="stellio/stellio-subscription-service" +DOCKER_TARGET="fiware/stellio-subscription-service" +QUAY_TARGET="quay.io/fiware/stellio-subscription-service" + +REPOSITORY="$(git rev-parse --show-toplevel)/$NAME" +TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )" +VERSION=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS ) + +echo "VERSION - $VERSION" + +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 + +