From 9ef9a9bc3376412840aea46784a5faf9b2c8ea36 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 21 Apr 2021 05:03:07 +0200 Subject: [PATCH] ci: add reworked push logic; use own kaniko image --- .drone.yml | 70 +++++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0219be7..3d68d9c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,47 +1,51 @@ --- kind: pipeline type: docker -name: dockerhub-build-trigger - -platform: - os: linux - arch: amd64 - -clone: - disable: true - -steps: -- name: call webhook - pull: always - image: bash:latest - environment: - ENDPOINT: - from_secret: dockerhub_endpoint - commands: - - apk add --no-cache curl - - curl -sO https://git.dotya.ml/wanderer/docker-fedora-hugo/raw/branch/master/curl.it - - bash ./curl.it $ENDPOINT - -trigger: - branch: [master] - event: [push, cron] - ---- -kind: pipeline -type: docker -name: kaniko-build +name: testing platform: os: linux arch: amd64 steps: -- name: build +- name: kaniko-build pull: always - image: ghcr.io/finitum/drone-kaniko:0.8.2 + image: immawanderer/drone-kaniko:efd19c50 settings: dockerfile: Dockerfile context: . + when: + ref: + - refs/heads/master + - "refs/heads/feature-**" + - "refs/pull/**" + - "refs/tags/**" + event: + exclude: [cron] + +- name: kaniko-publish + pull: always + image: immawanderer/drone-kaniko:efd19c50 + settings: + dockerfile: Dockerfile + context: . + tags: + - latest + - linux-amd64 + - ${DRONE_COMMIT_SHA:0:8} + repo: immawanderer/fedora-hugo + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + ref: + - refs/heads/master + event: + exclude: [pull_request, tag] + +trigger: + event: [push, pull_request, cron, tag] --- kind: pipeline @@ -85,7 +89,7 @@ trigger: - failure depends_on: -- kaniko-build +- testing --- kind: pipeline @@ -131,4 +135,4 @@ trigger: - failure depends_on: -- kaniko-build +- testing