diff --git a/.drone.yml b/.drone.yml index ace4c3b..9eeb036 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-pack: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-pack + 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-pack + tags: + - latest + username: + from_secret: docker_username + when: + event: + - tag diff --git a/README.md b/README.md index 3771735..df28c55 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,23 @@ docker build . -t libreschool-automation/rpm-pack:latest ## How to use ```yml -pipeline: - create_targz: - image: libreschool-automation/rpm-pack:latest - dest: myfile.tar.gz - dir: myproject-1.0 - files: - - root - - createlinks.pl - - README.md - - COPYING - - LICENSE - - strange\,file.txt +kind: pipeline +name: default +steps: + - name: create_targz + image: registry.libreschool.org/libreschool-automation/rpm-pack:latest + pull: always + settings: + dest: myfile.tar.gz + dir: myproject-1.0 + files: + - root + - createlinks.pl + - README.md + - COPYING + - LICENSE + - strange\,file.txt ``` Commas inside filenames should be escaped (or it'll be considered 2 distinct file names). @@ -43,15 +47,21 @@ Commas inside filenames should be escaped (or it'll be considered 2 distinct fil Both `dest` and `dir` supports expansion of $NAME, $VERSION and $RELEASE. Like this: ```yml -pipeline: - create_targz: - image: libreschool-automation/rpm-pack:latest - dest: $$NAME-$$VERSION-$$RELEASE.tar.gz - dir: $$NAME-$$VERSION-$$RELEASE - files: - - root - - README.md - - COPYING - - LICENSE +kind: pipeline +name: default +steps: + - name: create_targz + image: registry.libreschool.org/libreschool-automation/rpm-pack:latest + pull: always + settings: + dest: $$NAME-$$VERSION-$$RELEASE.tar.gz + dir: $$NAME-$$VERSION-$$RELEASE + files: + - root + - createlinks.pl + - README.md + - COPYING + - LICENSE + - strange\,file.txt ```