vegvisir/deploy/build_image.sh
Piotr Biernat 2bf49c405b
All checks were successful
continuous-integration/drone/push Build is passing
[fix] CI/CD fixes
2022-04-21 22:39:44 +02:00

12 lines
324 B
Bash
Executable File

#!/bin/sh
set -evx
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) &&
tag=${branch:=$p1-$p2} &&
echo "Building" $tag
docker build -t git.pbiernat.dev/golang/vegvisir:$tag -f deploy/Dockerfile.build .