From c1dde8ec30512179142d8e57be77b77cb75ce470 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Thu, 25 Apr 2019 10:37:32 +0200 Subject: [PATCH] drone upgrade --- .drone.yml | 53 ++++++++++++++++++++++++++++++++--------------------- README.md | 14 +++++++------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2915dbb..6125ea9 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/rpm-build: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/rpm-build + 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/rpm-build + tags: + - latest + username: + from_secret: docker_username + when: + event: + - tag diff --git a/README.md b/README.md index a65e95b..7786e60 100644 --- a/README.md +++ b/README.md @@ -14,16 +14,16 @@ docker build . -t libreschool-automation/rpm-build:latest ## How to use ```yml -workspace: - base: /build - path: / +kind: pipeline +name: default -pipeline: - build: - image: libreschool-automation/rpm-build:latest +steps: + - name: build + image: registry.libreschool.org/libreschool-automation/rpm-build:latest + pull: always + working_dir: /build commands: - yum-builddep -y mypackage.spec - rpmbuild -ba mypackage.spec - mkdir out ; mv *.rpm noarch/*.rpm out/ - ```