Compare commits
No commits in common. "7438d94ee1597fb563a51a5d70bed0263717324c" and "c577734ab136c0945a28b2294d11ff09204513ab" have entirely different histories.
7438d94ee1
...
c577734ab1
15
.drone.yml
15
.drone.yml
@ -32,13 +32,12 @@ steps:
|
|||||||
- name: build_image
|
- name: build_image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
commands:
|
commands:
|
||||||
- ./test.sh
|
- branch=$(echo $CI_COMMIT_BRANCH | grep -v '/') || echo $CI_COMMIT_BRANCH
|
||||||
# - branch=$(echo $CI_COMMIT_BRANCH | grep -v '/') || echo $CI_COMMIT_BRANCH
|
- p1=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f1 -s)
|
||||||
# - p1=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f1 -s)
|
- p2=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f2 -s)
|
||||||
# - p2=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f2 -s)
|
- tag=${branch:-$p1-$p2}
|
||||||
# - tag=${branch:-$p1-$p2}
|
- echo $tag
|
||||||
# - echo $tag
|
- docker build -t git.pbiernat.dev/golang/vegvisir:$tag -f Dockerfile.build .
|
||||||
# - docker build -t git.pbiernat.dev/golang/vegvisir:$tag -f Dockerfile.build .
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
@ -51,7 +50,7 @@ steps:
|
|||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
from_secret: registry_password
|
from_secret: registry_password
|
||||||
commands:
|
commands:
|
||||||
- branch=$(echo $CI_COMMIT_BRANCH | grep -v '/') || echo $CI_COMMIT_BRANCH
|
- branch=$(echo $CI_COMMIT_BRANCH | grep '/') || echo $CI_COMMIT_BRANCH
|
||||||
- p1=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f1 -s)
|
- p1=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f1 -s)
|
||||||
- p2=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f2 -s)
|
- p2=$(echo $CI_COMMIT_BRANCH | cut -d '/' -f2 -s)
|
||||||
- tag=${branch:=$p1-$p2}
|
- tag=${branch:=$p1-$p2}
|
||||||
|
28
test.sh
28
test.sh
@ -1,28 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# BRANCH="dev/ci-docker-builder"
|
|
||||||
BRANCH="develop"
|
|
||||||
|
|
||||||
simple=$(echo $BRANCH | grep -v '/') || echo $BRANCH
|
|
||||||
p1=$(echo $BRANCH | cut -d '/' -f1 -s)
|
|
||||||
p2=$(echo $BRANCH | cut -d '/' -f2 -s)
|
|
||||||
tag=${simple:-$p1-$p2}
|
|
||||||
echo $tag
|
|
||||||
|
|
||||||
# p1=$(echo "develop" | grep -s '/') && echo "1: $p1"
|
|
||||||
# p2=$(echo "develop/fix" | grep -s '/') && echo "2: $p2"
|
|
||||||
# p3=$(echo "develop" | grep -s -v '/') && echo "3: $p3"
|
|
||||||
# p4=$(echo "develop/fix" | grep -s -v '/') && echo "4: $p4"
|
|
||||||
|
|
||||||
# echo $p1 $p2 $p3 $p4
|
|
||||||
# echo "DONE"
|
|
||||||
|
|
||||||
|
|
||||||
#simple=$(echo $BRANCH | grep -v '/') ;
|
|
||||||
#p1=$(echo $BRANCH | cut -d '/' -f1 -s) ;
|
|
||||||
#p2=$(echo $BRANCH | cut -d '/' -f2 -s) ;
|
|
||||||
#tag=${simple:=$p1-$p2} &&
|
|
||||||
|
|
||||||
#echo "TAG:" $tag
|
|
Loading…
Reference in New Issue
Block a user