16 lines
410 B
Bash
16 lines
410 B
Bash
|
#!/bin/sh
|
||
|
set -e
|
||
|
set -x
|
||
|
|
||
|
# BRANCH="dev/ci-docker-builder"
|
||
|
# BRANCH="develop"
|
||
|
# BRANCH=$CI_COMMIT_BRANCH
|
||
|
|
||
|
branch=$(echo $CI_COMMIT_BRANCH | grep -v /) || echo $CI_COMMIT_BRANCH ;
|
||
|
p1=$(echo $CI_COMMIT_BRANCH | cut -d / -f1 -s) &&
|
||
|
p2=$(echo $CI_COMMIT_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 .
|