Skip to content

Commit

Permalink
Add Stellio
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Nov 20, 2023
1 parent 3d3f516 commit 6939df6
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
37 changes: 37 additions & 0 deletions .github/fiware/core/stellio-search-service.sh
Original file line number Diff line number Diff line change
@@ -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


37 changes: 37 additions & 0 deletions .github/fiware/core/stellio-subscription-service.sh
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit 6939df6

Please sign in to comment.