Skip to content

Commit

Permalink
Add Scorpio.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Oct 16, 2023
1 parent b5b1196 commit 9ba487b
Show file tree
Hide file tree
Showing 11 changed files with 341 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/fiware/core/cygnus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ 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"
echo "VERSION - $VERSION"

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand Down
41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-at-context-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/at-context-server"
DOCKER_TARGET="fiware/scorpio-at-context-server"
QUAY_TARGET="quay.io/fiware/scorpio-at-context-server"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


40 changes: 40 additions & 0 deletions .github/fiware/core/scorpio-entity-manager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/entity-manager"
DOCKER_TARGET="fiware/scorpio-entity-manager"
QUAY_TARGET="quay.io/fiware/scorpio-entity-manager"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )
VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-history-entity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/history-entity-manager"
DOCKER_TARGET="fiware/scorpio-history-entity"
QUAY_TARGET="quay.io/fiware/scorpio-history-entity"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-history-query.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/history-query-manager"
DOCKER_TARGET="fiware/scorpio-history-query"
QUAY_TARGET="quay.io/fiware/scorpio-history-query"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-query-manager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/query-manager"
DOCKER_TARGET="fiware/scorpio-query-manager"
QUAY_TARGET="quay.io/fiware/scorpio-query-manager"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-registry-manager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/registry-manager"
DOCKER_TARGET="fiware/scorpio-registry-manager"
QUAY_TARGET="quay.io/fiware/scorpio-registry-manager"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-subscription-manager.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/subscription-manager"
DOCKER_TARGET="fiware/scorpio-subscription-manager"
QUAY_TARGET="quay.io/fiware/scorpio-subscription-manager"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


41 changes: 41 additions & 0 deletions .github/fiware/core/scorpio-subscription-registry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/registry-subscription-manager"
DOCKER_TARGET="fiware/scorpio-subscription-registry"
QUAY_TARGET="quay.io/fiware/scorpio-subscription-registry"

REPOSITORY="$(git rev-parse --show-toplevel)/$NAME"
TAGS="$(git -C $REPOSITORY rev-list --tags --max-count=1 )"
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )

VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

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" java-kafka-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET" || true
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done


Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ QUAY_TARGET="quay.io/fiware/scorpio"

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 )
VERSIONv=$(git -C $REPOSITORY describe --exclude 'FIWARE*' --tags $TAGS )
VERSION=`echo ${VERSIONv} | sed 's/-.*//'`

echo "NOT DONE - $VERSION"
exit 0
echo "VERSION - $VERSION"

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
Expand All @@ -27,10 +27,16 @@ function clone {

for i in "$@" ; do
if [[ $i == "docker" ]]; then
clone "$SOURCE" "$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" java-"$VERSION" "$DOCKER_TARGET" true
clone "$SOURCE" java-kafka-"$VERSION" "$DOCKER_TARGET"
clone "$SOURCE" ubuntu-"$VERSION" "$DOCKER_TARGET"
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$DOCKER_TARGET"
fi
if [[ $i == "quay" ]]; then
clone "$SOURCE" "$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" java-"$VERSION" "$QUAY_TARGET" true
clone "$SOURCE" java-kafka-"$VERSION" "$QUAY_TARGET"
clone "$SOURCE" ubuntu-"$VERSION" "$QUAY_TARGET"
clone "$SOURCE" ubuntu-kafka-"$VERSION" "$QUAY_TARGET"
fi
echo ""
done
Expand Down
3 changes: 2 additions & 1 deletion .github/fiware/image-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

MY_PATH="`dirname \"$0\"`"

git submodule update --recursive --remote

for file in "$MY_PATH/$1"/*.sh
do
Expand All @@ -24,6 +25,6 @@ done

for i in "$@" ; do
if [[ $i == "clean" ]]; then
docker rmi -f $(docker images -a -q) | true
docker rmi -f $(docker images -a -q) || true
fi
done

0 comments on commit 9ba487b

Please sign in to comment.