2021-07-23 02:00:02 +02:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2022-04-17 21:29:06 +02:00
|
|
|
- name: static_check
|
2022-04-18 15:07:38 +02:00
|
|
|
image: golang:latest
|
2022-04-17 21:29:06 +02:00
|
|
|
commands:
|
|
|
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
|
|
- staticcheck ./pkg/...
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
2021-08-02 23:14:16 +02:00
|
|
|
|
2022-04-17 21:29:06 +02:00
|
|
|
- name: lint
|
2022-04-18 15:07:38 +02:00
|
|
|
image: golang:latest
|
2022-04-17 21:29:06 +02:00
|
|
|
commands:
|
|
|
|
- go install golang.org/x/lint/golint@latest
|
|
|
|
- golint -set_exit_status ./pkg/...
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
2021-08-02 23:14:16 +02:00
|
|
|
|
2022-04-17 21:29:06 +02:00
|
|
|
- name: vet
|
2022-04-18 15:07:38 +02:00
|
|
|
image: golang:latest
|
2022-04-17 21:29:06 +02:00
|
|
|
commands:
|
|
|
|
- go vet ./pkg/...
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
|
|
|
path: /go
|
2022-04-16 18:57:59 +02:00
|
|
|
|
|
|
|
- name: build_image
|
|
|
|
image: plugins/docker
|
|
|
|
commands:
|
2022-04-17 21:29:06 +02:00
|
|
|
- sleep 5
|
|
|
|
- ./deploy/build_image.sh
|
2022-04-16 18:57:59 +02:00
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run
|
|
|
|
|
|
|
|
- name: push_image
|
|
|
|
image: plugins/docker
|
|
|
|
environment:
|
|
|
|
DOCKER_USERNAME:
|
|
|
|
from_secret: registry_username
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: registry_password
|
|
|
|
commands:
|
2022-04-17 21:29:06 +02:00
|
|
|
- ./deploy/publish_image.sh
|
2022-04-16 18:57:59 +02:00
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run
|
2022-04-17 20:07:35 +02:00
|
|
|
|
2022-04-16 18:57:59 +02:00
|
|
|
services:
|
|
|
|
- name: docker
|
|
|
|
image: docker:dind
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run
|
2021-08-02 23:14:16 +02:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: gopath
|
2022-04-16 18:57:59 +02:00
|
|
|
temp: {}
|
|
|
|
- name: docker-sock
|
|
|
|
temp: {}
|