|
|
|
@ -3,19 +3,56 @@ kind: pipeline
|
|
|
|
|
name: default |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- name: build |
|
|
|
|
image: r.mills.io/prologic/golang-alpine-ffmpeg:latest |
|
|
|
|
volumes: |
|
|
|
|
- name: gomodcache |
|
|
|
|
path: /go/pkg/mod/cache |
|
|
|
|
privileged: true |
|
|
|
|
environment: |
|
|
|
|
GOPROXY: https://goproxy.mills.io |
|
|
|
|
- name: build-and-test |
|
|
|
|
image: r.mills.io/prologic/golang-alpine:latest |
|
|
|
|
commands: |
|
|
|
|
- make deps |
|
|
|
|
- make build |
|
|
|
|
- make test |
|
|
|
|
|
|
|
|
|
- name: notify |
|
|
|
|
- name: build-image-push |
|
|
|
|
image: plugins/kaniko |
|
|
|
|
settings: |
|
|
|
|
registry: r.mills.io |
|
|
|
|
repo: r.mills.io/prologic/yarns |
|
|
|
|
tags: latest |
|
|
|
|
build_args: |
|
|
|
|
- VERSION=master |
|
|
|
|
- COMMIT=${DRONE_COMMIT_SHA:0:8} |
|
|
|
|
username: |
|
|
|
|
from_secret: docker_username |
|
|
|
|
password: |
|
|
|
|
from_secret: docker_password |
|
|
|
|
depends_on: |
|
|
|
|
- build-and-test |
|
|
|
|
when: |
|
|
|
|
branch: |
|
|
|
|
- master |
|
|
|
|
event: |
|
|
|
|
- push |
|
|
|
|
|
|
|
|
|
- name: build-image-tag |
|
|
|
|
image: plugins/kaniko |
|
|
|
|
settings: |
|
|
|
|
registry: r.mills.io |
|
|
|
|
repo: r.mills.io/prologic/yarns |
|
|
|
|
tags: latest |
|
|
|
|
build_args: |
|
|
|
|
- VERSION=${DRONE_SEMVER_SHORT##v} |
|
|
|
|
- COMMIT=${DRONE_COMMIT_SHA:0:8} |
|
|
|
|
username: |
|
|
|
|
from_secret: docker_username |
|
|
|
|
password: |
|
|
|
|
from_secret: docker_password |
|
|
|
|
depends_on: |
|
|
|
|
- build-and-test |
|
|
|
|
when: |
|
|
|
|
branch: |
|
|
|
|
- master |
|
|
|
|
event: |
|
|
|
|
- tag |
|
|
|
|
|
|
|
|
|
- name: notify-irc |
|
|
|
|
image: plugins/webhook |
|
|
|
|
settings: |
|
|
|
|
urls: |
|
|
|
@ -25,10 +62,10 @@ steps:
|
|
|
|
|
- success |
|
|
|
|
- failure |
|
|
|
|
|
|
|
|
|
image_pull_secrets: |
|
|
|
|
- dockerconfigjson |
|
|
|
|
|
|
|
|
|
volumes: |
|
|
|
|
- name: gomodcache |
|
|
|
|
host: |
|
|
|
|
path: /var/lib/cache/go |
|
|
|
|
trigger: |
|
|
|
|
branch: |
|
|
|
|
- master |
|
|
|
|
event: |
|
|
|
|
- tag |
|
|
|
|
- push |
|
|
|
|
- pull_request |
|
|
|
|