82 lines
1.4 KiB
YAML
82 lines
1.4 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: test-build
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.17.7
|
|
pull: always
|
|
commands:
|
|
- go test ./...
|
|
- sh scripts/build.sh
|
|
|
|
- name: kaniko-build
|
|
image: immawanderer/drone-kaniko:linux-amd64
|
|
pull: always
|
|
settings:
|
|
dockerfile: docker/docker/Dockerfile.linux.amd64
|
|
context: .
|
|
no_push: true
|
|
when:
|
|
event:
|
|
exclude: [cron]
|
|
|
|
- name: docker-build
|
|
image: plugins/docker
|
|
pull: always
|
|
settings:
|
|
repo: immawanderer/drone-kaniko
|
|
tags:
|
|
- linux-amd64
|
|
- ${DRONE_COMMIT_SHA:0:8}
|
|
daemon_off: false
|
|
dockerfile: docker/docker/Dockerfile.linux.amd64
|
|
dry_run: true
|
|
when:
|
|
event:
|
|
exclude: [cron]
|
|
status: [success, failure]
|
|
|
|
trigger:
|
|
ref:
|
|
- "refs/heads/feature-**"
|
|
- "refs/pull/**"
|
|
- "refs/tags/**"
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.17.7
|
|
commands:
|
|
- go test ./...
|
|
- sh scripts/build.sh
|
|
|
|
- name: docker-publish
|
|
image: plugins/docker
|
|
settings:
|
|
repo: immawanderer/drone-kaniko
|
|
tags:
|
|
- linux-amd64
|
|
- ${DRONE_COMMIT_SHA:0:8}
|
|
daemon_off: false
|
|
dockerfile: docker/docker/Dockerfile.linux.amd64
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
when:
|
|
event:
|
|
exclude:
|
|
- pull_request
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/dev
|
|
|
|
...
|