build.sh 706 Bytes
Newer Older
Yann Garcia's avatar
Yann Garcia committed
1
2
3
4
5
6
7
#!/bin/bash
# Copyright ETSI 2018-2020
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt

set -e
set -vx

Yann Garcia's avatar
Yann Garcia committed
8
9
10
11
12
# Docker login
if [ $# -eq 2 ]
then
    docker login --username $1 --password $2
fi
Yann Garcia's avatar
Yann Garcia committed
13
14
15
16
17
18

#check and build stfubuntu image
if [ -z `docker images -q stfubuntu` ]; then
  docker build --no-cache --tag stfubuntu:18.04 -f Dockerfile.stfubuntu --force-rm  . || exit 1
fi

Yann Garcia's avatar
Yann Garcia committed
19
20
21
22
23
24
TAG=etsiforge/titan-its-its

# Temporary: Remove TTF002 image
docker image rm --force $TAG

docker build --no-cache --tag $TAG --force-rm  . || ( echo "Docker build failed: $?"; exit 1 )
Yann Garcia's avatar
Yann Garcia committed
25
26

docker images
Yann Garcia's avatar
Yann Garcia committed
27
28
29
docker inspect $TAG || ( echo "Docker inspect failed: $?"; exit 1 )

docker push $TAG:latest
Yann Garcia's avatar
Yann Garcia committed
30
31
32

# That's all Floks
exit 0