From 9132c4a51b9e92bb7b163a0c50ef8f039fefed9d Mon Sep 17 00:00:00 2001 From: surtur Date: Mon, 28 Mar 2022 19:28:21 +0200 Subject: [PATCH] ci: add 'test-build' pipeline --- .drone.yml | 46 ++++++++++++++++++++++++++++ docker/docker/Dockerfile.linux.amd64 | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index aa654bd..fafe4c7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/docker/docker/Dockerfile.linux.amd64 b/docker/docker/Dockerfile.linux.amd64 index 9ab67ce..9dc4958 100644 --- a/docker/docker/Dockerfile.linux.amd64 +++ b/docker/docker/Dockerfile.linux.amd64 @@ -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"]