[fix] CI/CD fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Piotr Biernat 2022-04-21 22:39:44 +02:00
parent 9ce9efe574
commit 2bf49c405b
3 changed files with 20 additions and 23 deletions

View File

@ -3,7 +3,7 @@ type: docker
name: default
steps:
- name: static_check
- name: go_static_check
image: golang:latest
commands:
- go install honnef.co/go/tools/cmd/staticcheck@latest
@ -12,7 +12,7 @@ steps:
- name: gopath
path: /go
- name: lint
- name: go_lint
image: golang:latest
commands:
- go install golang.org/x/lint/golint@latest
@ -21,7 +21,7 @@ steps:
- name: gopath
path: /go
- name: vet
- name: go_vet
image: golang:latest
commands:
- go vet ./pkg/...
@ -34,6 +34,10 @@ steps:
commands:
- sleep 5
- ./deploy/build_image.sh
depends_on:
- go_static_check
- go_lint
- go_vet
volumes:
- name: docker-sock
path: /var/run
@ -47,6 +51,8 @@ steps:
from_secret: registry_password
commands:
- ./deploy/publish_image.sh
depends_on:
- build_image
volumes:
- name: docker-sock
path: /var/run

View File

@ -1,14 +1,10 @@
#!/bin/sh
set -e
set -x
set -evx
# 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) &&
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

View File

@ -1,15 +1,10 @@
#!/bin/sh
set -e
set -x
set -evx
# 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) &&
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 "Publishing" $tag