2022-04-17 21:29:06 +02:00
|
|
|
#!/bin/sh
|
2022-04-21 22:39:44 +02:00
|
|
|
set -evx
|
2022-04-17 21:29:06 +02:00
|
|
|
|
2022-04-21 22:39:44 +02:00
|
|
|
branch=${DRONE_TAG:=$CI_COMMIT_BRANCH}
|
|
|
|
branch=$(echo $branch | grep -v /) || echo $branch ;
|
|
|
|
p1=$(echo $branch | cut -d / -f1 -s) &&
|
|
|
|
p2=$(echo $branch | cut -d / -f2 -s) &&
|
2022-04-17 21:29:06 +02:00
|
|
|
tag=${branch:=$p1-$p2} &&
|
|
|
|
echo "Building" $tag
|
|
|
|
|
|
|
|
docker build -t git.pbiernat.dev/golang/vegvisir:$tag -f deploy/Dockerfile.build .
|