Skip to content
Snippets Groups Projects

Better image building

Merged
Luc Everserequested to merge
better-image-building into development
1 open thread
1 file
+ 13
7
Compare changes
  • Side-by-side
  • Inline
+ 13
7
@@ -2,17 +2,23 @@
set -e
COMPONENT=$1
TAG=$2
if [ -z $COMPONENT ]
if [ -z "$COMPONENT" -o "$COMPONENT" = all ]
then
./$0 core
./$0 worker
./$0 core $TAG
./$0 worker $TAG
exit
fi
if [ -n "$TAG" ]
then
TAG=-$TAG
fi
Please register or sign in to reply
VERSION=$(grep -o " version = '[^']*'" build.gradle | cut -d "'" -f 2 | tr -d '\n')
/bin/echo -e "\033[33;1mDeploying AuTA $COMPONENT v$VERSION\033[0m"
/bin/echo -e "\033[33;1mDeploying AuTA $COMPONENT v$VERSION$TAG\033[0m"
if [ $COMPONENT = core ]
then
@@ -20,11 +26,11 @@ then
ARGS=
else
./gradlew :worker:jar
ARGS='host=$COREADDRESS name=$HOSTNAME api-token=$APIKEY api-protocol=$APIPROTOCOL api-port=$APIPORT'
ARGS='host=$COREADDRESS name=$WORKERNAME api-token=$APIKEY api-protocol=$APIPROTOCOL api-port=$APIPORT'
fi
docker build -t f00f/auta-$COMPONENT:$VERSION -f slim.Dockerfile . \
docker build -t f00f/auta-$COMPONENT:$VERSION$TAG -f slim.Dockerfile . \
--build-arg VERSION=$VERSION --build-arg COMPONENT=$COMPONENT --build-arg ARGS="$ARGS"
docker push f00f/auta-$COMPONENT:$VERSION
docker push f00f/auta-$COMPONENT:$VERSION$TAG
Loading