From 5274dee8b2da902bab59e49073d8076d95b621d8 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sat, 22 Jun 2019 23:25:52 +0100 Subject: [PATCH] Update drone config to 1.x --- .drone.yml | 70 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/.drone.yml b/.drone.yml index 636127d..bd947c2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,32 +1,52 @@ -pipeline: - build: - image: spritsail/docker-build - volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] +--- +kind: pipeline +name: build-test-publish + +platform: + os: linux + arch: amd64 + +steps: +- name: build + image: spritsail/docker-build + pull: always + settings: + use_cache: true repo: busybox-dev - test: - image: docker - volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] - commands: - - docker run --rm busybox-dev /bin/sh -xec 'true' - - docker run --rm busybox-dev /bin/sh -xec 'test -f /lib/libc-*.so' - - docker run --rm busybox-dev /bin/sh -xec 'ldconfig -p' - - docker run --rm busybox-dev /bin/sh -xec 'nslookup google.com' - - test "$(docker run --rm busybox-dev /bin/sh -xec 'date +%Z')" = 'UTC' - - test "$(docker run --rm busybox-dev /bin/sh -xec 'echo This is a test string | md5sum | cut -f1 -d\ ' | tee /dev/stderr)" = 'b584c39f97dfe71ebceea3fdb860ed6c' +- name: test + image: busybox-dev + pull: never + commands: + - set -ex + - ldconfig -p + - "test -f /lib/libc-*.so" + - nslookup cloudflare.com + - "test $(date +%Z) = UTC" + - test $(echo This is a test string | md5sum | cut -f1 -d\ | tee /dev/stderr) = b584c39f97dfe71ebceea3fdb860ed6c - publish: - image: spritsail/docker-publish - when: { branch: [ master ], event: [ push, tag, deployment ] } - volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ] - secrets: [ docker_username, docker_password, microbadger_token ] +- name: publish + pull: always + image: spritsail/docker-publish + settings: from: busybox-dev repo: spritsail/busybox tags: - - 'latest' - - '%label io.spritsail.version.busybox' + - latest + - "%label io.spritsail.version.busybox" + environment: + DOCKER_PASSWORD: + from_secret: docker_password + DOCKER_USERNAME: + from_secret: docker_username + when: + branch: + - master + event: + - promote - notify: - image: spritsail/notify - when: { status: [ success, failure ] } - secrets: [ webhook_url, notify_token ] +--- +kind: signature +hmac: ed993c62abb165265b5e3569eb16c4e203db7921840c35932a96962182295327 + +...