5 Commits

Author SHA1 Message Date
2bf49c405b [fix] CI/CD fixes
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-21 22:39:44 +02:00
9ce9efe574 revert to original golang image
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-18 15:07:38 +02:00
2bfeabb3b0 [fix] Replaced regular golang image with lightweight alpine version
Some checks failed
continuous-integration/drone/push Build is failing
2022-04-18 15:04:36 +02:00
e5aac88664 merge dev/ci-docker-builder
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-18 00:52:09 +02:00
7f8f915653 Merge branch 'dev/ci-docker-builder' into develop
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-17 22:08:17 +02:00
3 changed files with 23 additions and 26 deletions

View File

@@ -3,8 +3,8 @@ type: docker
name: default
steps:
- name: static_check
image: golang:1.18
- name: go_static_check
image: golang:latest
commands:
- go install honnef.co/go/tools/cmd/staticcheck@latest
- staticcheck ./pkg/...
@@ -12,8 +12,8 @@ steps:
- name: gopath
path: /go
- name: lint
image: golang:1.18
- name: go_lint
image: golang:latest
commands:
- go install golang.org/x/lint/golint@latest
- golint -set_exit_status ./pkg/...
@@ -21,8 +21,8 @@ steps:
- name: gopath
path: /go
- name: vet
image: golang:1.18
- name: go_vet
image: golang:latest
commands:
- go vet ./pkg/...
volumes:
@@ -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,16 +1,11 @@
#!/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) &&
tag=${branch:=$p1-$p2} &&
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
echo $DOCKER_PASSWORD | docker login git.pbiernat.dev -u $DOCKER_USERNAME --password-stdin &&