Skip to content

Commit

Permalink
Adding image clone scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Sep 11, 2023
1 parent dbebf2f commit 01a775d
Show file tree
Hide file tree
Showing 44 changed files with 1,748 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/fiware/api-management/coat-rack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
set -e

NAME="api-management/coat-rack"
SOURCE="telefonicaiot/coat-rack"
DOCKER_TARGET="fiware/coat-rack"
QUAY_TARGET="quay.io/fiware/coat-rack"


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"
exit 0

function clone {
echo 'cloning from '"$1 $2"' to '"$3"
docker pull -q "$1":"$2"
docker tag "$1":"$2" "$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
39 changes: 39 additions & 0 deletions .github/fiware/core/cygnus.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set -e

NAME="core/cygnus"
SOURCE="telefonicaiot/fiware-cygnus"
DOCKER_TARGET="fiware/cygnus-ngsi"
QUAY_TARGET="quay.io/fiware/cygnus-ngsi"

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 )

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
39 changes: 39 additions & 0 deletions .github/fiware/core/draco.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set -e

NAME="core/draco"
SOURCE="ging/fiware-draco"
DOCKER_TARGET="fiware/draco"
QUAY_TARGET="quay.io/fiware/draco"

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 )

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
43 changes: 43 additions & 0 deletions .github/fiware/core/ngsijs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set -e

NAME="core/ngsijs"
SOURCE="telefonicaiot/ngsijs"
DOCKER_TARGET="fiware/nsgijs"
QUAY_TARGET="quay.io/fiware/ngsijs"

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"
exit 0


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
43 changes: 43 additions & 0 deletions .github/fiware/core/o2kconnector.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set -e

NAME="core/o2kconnector"
SOURCE="telefonicaiot/o2kconnector"
DOCKER_TARGET="fiware/o2kconnector"
QUAY_TARGET="quay.io/fiware/o2kconnector"


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"
exit 0

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
39 changes: 39 additions & 0 deletions .github/fiware/core/orion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
set -e

NAME="core/orion"
SOURCE="telefonicaiot/fiware-orion"
DOCKER_TARGET="fiware/orion"
QUAY_TARGET="quay.io/fiware/orion"

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 )

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
43 changes: 43 additions & 0 deletions .github/fiware/core/pyspark-connector.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
set -e

NAME="core/pyspack-connector"
SOURCE="telefonicaiot/pyspack-connector"
DOCKER_TARGET="fiware/pyspack-connector"
QUAY_TARGET="quay.io/fiware/pyspack-connector"


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"
exit 0

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
40 changes: 40 additions & 0 deletions .github/fiware/core/quantum-leap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
set -e

NAME="core/quantum-leap"
SOURCE="orchestracities/quantumleap"
DOCKER_TARGET="fiware/quantum-leap"
QUAY_TARGET="quay.io/fiware/quantumleap"


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 )

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
42 changes: 42 additions & 0 deletions .github/fiware/core/scorpio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
set -e

NAME="core/scorpio"
SOURCE="scorpiobroker/all-in-one-runner"
DOCKER_TARGET="fiware/scorpio"
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 )

echo "NOT DONE"
exit 0

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
Loading

0 comments on commit 01a775d

Please sign in to comment.