ci: add 'test-build' pipeline
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
surtur 2022-03-28 19:28:21 +02:00
parent ab07d57e85
commit 9132c4a51b
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 47 additions and 1 deletions

@ -1,3 +1,49 @@
---
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

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:v1.8.0-debug
ADD release/linux/amd64/kaniko-docker /kaniko/
COPY release/linux/amd64/kaniko-docker /kaniko/
ENTRYPOINT ["/kaniko/kaniko-docker"]