From c2cd06da52b3cd99dd8a349be01ad8e2349bf6d4 Mon Sep 17 00:00:00 2001 From: Andrey Arapov Date: Sat, 14 Jul 2018 11:37:42 +0200 Subject: [PATCH] add .drone.yml --- .drone.yml | 47 ++++++++++++++++++++++++++++ .drone.yml.v08 | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 134 insertions(+) create mode 100644 .drone.yml create mode 100644 .drone.yml.v08 diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..58d8afb --- /dev/null +++ b/.drone.yml @@ -0,0 +1,47 @@ +--- +kind: pipeline +name: default + +platform: + os: linux + arch: amd64 + +steps: +- name: publish + pull: default + image: plugins/docker:18.09 + settings: + registry: https://registry.nixaid.com + repo: "registry.nixaid.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}" + tags: + - latest + username: + from_secret: docker_username + password: + from_secret: docker_password + # storage_path: /drone/docker + # storage_driver: aufs + # ipv6: false + # debug: true + when: + branch: + - master + event: + - push + - tag + +- name: notify + pull: default + image: drillster/drone-email:latest + settings: + from: "Drone CI " + host: mx.nixaid.com + port: 587 + subject: "NIXAID Drone Pipeline {{#success build.status}}SUCCESS{{else}}FAILURE{{/success}} Notification" + when: + event: + - push + - tag + status: + - success + - failure diff --git a/.drone.yml.v08 b/.drone.yml.v08 new file mode 100644 index 0000000..a588fda --- /dev/null +++ b/.drone.yml.v08 @@ -0,0 +1,85 @@ +# workspace: +# base: /workspace +# path: src/git.nixaid.com/arno/myapp/ +# +# branches: +# - master + +pipeline: + restore_cache: + image: drillster/drone-volume-cache:latest + restore: true + mount: + - /drone/docker + # Set the ``DRONE_VOLUME=/tmp/drone-cache:/cache`` drone-server variable, + # so you can benefit from the caching. + # Otherwise you will have to make this repository trusted in Drone and use + # the volumes as follows. + # volumes: + # - /tmp/drone-cache:/cache + + # drone repo add arno/isso + # drone secret add/update --name docker_username --value arno --event push --event tag --event deployment arno/isso + # drone secret add/update --name docker_password --value "$(pass show vps/registry.nixaid.com | head -1)" --event push --event tag --event deployment arno/isso + publish: + image: plugins/docker:17.12 + # repo: andrey01/${DRONE_REPO_NAME} + registry: registry.nixaid.com + repo: registry.nixaid.com/arno/${DRONE_REPO_NAME} + tags: + - latest + # - ${DRONE_COMMIT_SHA:0:7} + # group: docker + # dockerfile: Dockerfile + secrets: [docker_username, docker_password] + # Since we restore the docker image cache to /drone/docker + storage_path: /drone/docker + use_cache: true + when: + event: [push, tag] + branch: master + + rebuild_cache: + image: drillster/drone-volume-cache:latest + rebuild: true + mount: + - /drone/docker + # Set the ``DRONE_VOLUME=/tmp/drone-cache:/cache`` drone-server variable, + # so you can benefit from the caching. + # Otherwise you will have to make this repository trusted in Drone and use + # the volumes as follows. + # volumes: + # - /tmp/drone-cache:/cache + + # # ca_cert comes from /srv/data/registry/certs/ca.crt + # claircheck: + # # image: jmccann/drone-clair:1 + # image: andrey01/drone-clair + # url: http://clair:6060 + # secrets: [ docker_username, docker_password ] + # # ignore errors for now. This will work only in drone 0.9 https://github.com/drone/drone-runtime/commit/3e8bd99f60f4032226523320cd2b2321f9525159 + # err_ignore: true + # scan_image: registry.nixaid.com/arno/${DRONE_REPO_NAME}:latest + # ca_cert: | + # -----BEGIN CERTIFICATE----- + # MIIBOjCB4KADAgECAgkAzhpbLWXa4H0wCgYIKoZIzj0EAwIwEDEOMAwGA1UEAwwF + # bXktQ0EwHhcNMTgwNzA5MjIzMTAzWhcNMjgwNzA2MjIzMTAzWjAQMQ4wDAYDVQQD + # DAVteS1DQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFIE8bTfQ76U5qG/Xgjw + # BbQU0oRJLYlRxBIWF9MTNSJr2LoaoyrU8jrcWQGRrfKPoVuwUJWp2tp5SJy0AHH7 + # 4fijIzAhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgKkMAoGCCqGSM49 + # BAMCA0kAMEYCIQCYbTbxRD2yX4LzGjh84fKPWPQM9ps8RE2nfwZjqdRUGgIhAOHb + # USigh6FzqEPk2jiaV3t1wNtChRWRfupTKG6CD345 + # -----END CERTIFICATE----- + + notify: + image: drillster/drone-email:latest + from: Drone CI + subject: NIXAID Drone Pipeline {{#success build.status}}SUCCESS{{else}}FAILURE{{/success}} Notification + host: mx.nixaid.com + port: 587 + # username: arno + # secrets: [ email_username, email_password ] + # recipients: [ andrey.arapov@nixaid.com ] + when: + status: [success, failure] # changed + event: [push, tag] diff --git a/README.md b/README.md index 403e23e..f03ca54 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://drone.nixaid.com/api/badges/arno/isso/status.svg)](https://drone.nixaid.com/arno/isso) + Isso – a commenting server similar to Disqus ============================================