From afea52af09988c3ba1c4bf50229dcd71fbc68a0e Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Thu, 25 Apr 2019 12:08:30 +0200 Subject: [PATCH] drone upgrade --- .drone.yml | 53 ++++++++++++++++++++++++++++++++--------------------- Dockerfile | 2 +- README.md | 43 +++++++++++++++++++++++++++---------------- 3 files changed, 60 insertions(+), 38 deletions(-) diff --git a/.drone.yml b/.drone.yml index fa49bd3..47bf95d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,23 +1,34 @@ +kind: pipeline +name: default -pipeline: - - build: - image: docker - commands: - - docker build -t libreschool-automation/deb-sign:latest . - volumes: - - /var/run/docker.sock:/var/run/docker.sock +steps: + - name: build + image: plugins/docker:linux-amd64 + pull: always + settings: + daemon_off: false + dry_run: true + repo: registry.libreschool.org/libreschool-automation/deb-sign + tags: + - latest when: - event: tag - -# build_and_publish: - # no publish at this time -# image: plugins/docker -# pull: true -# secrets: [ docker_username, docker_password ] -# repo: libreschool-automation/ubuntu-build -# auto_tag: true -# auto_tag_suffix: linux-amd64 -# dockerfile: Dockerfile -# when: -# event: [ push, tag ] + event: + exclude: + - tag + + - name: build_and_publish + image: plugins/docker:linux-amd64 + pull: always + settings: + daemon_off: false + password: + from_secret: docker_password + registry: registry.libreschool.org + repo: registry.libreschool.org/libreschool-automation/deb-sign + tags: + - latest + username: + from_secret: docker_username + when: + event: + - tag diff --git a/Dockerfile b/Dockerfile index cbc2c79..90f43c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:18.04 RUN apt-get update && apt-get install -y \ dpkg-sig diff --git a/README.md b/README.md index 67bbb57..759765e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://drone.libreschool.org/api/badges/libreschool-automation/deb-sign/status.svg)](https://drone.libreschool.org/libreschool-automation/deb-sign) -Ubuntu docker image with some packages preinstalled. +Ubuntu 18.04 docker image with some packages preinstalled. This is used to sign .deb packages. @@ -15,14 +15,18 @@ docker build . -t libreschool-automation/deb-sign:latest ## How NOT to use ```yml -pipeline: - pkg_sign: - image: libreschool-automation/deb-sign:latest - files: my_package.deb - sign_type: origin - gpg_key: [] - passphrase: supersecretpassword - +kind: pipeline +name: default + +steps: + - name: pkg_sign + image: registry.libreschool.org/libreschool-automation/rpm-sign:latest + pull: always + settings: + files: my_package.deb + sign_type: origin + gpg_key: [] + passphrase: supersecretpassword ``` ## How to use @@ -31,13 +35,20 @@ Seriously, don't put the GPG key or the passphrase in .drone.yml. ```yml -pipeline: - pkg_sign: - image: libreschool-automation/deb-sign:latest - files: my_package.deb - sign_type: origin - secrets: [gpg_key, passphrase] - +kind: pipeline +name: default + +steps: + - name: pkg_sign + image: registry.libreschool.org/libreschool-automation/deb-sign:latest + pull: always + settings: + files: my_package.deb + sign_type: origin + gpg_key: + from_secret: gpg_key + passphrase: + from_secret: gpg_passphrase ``` ## Parameters