2018-07-04 09:14:41 +00:00
|
|
|
# workspace:
|
|
|
|
# base: /workspace
|
|
|
|
# path: src/git.nixaid.com/arno/myapp/
|
2018-07-04 09:22:13 +00:00
|
|
|
#
|
2018-07-04 09:14:41 +00:00
|
|
|
# branches:
|
|
|
|
# - master
|
|
|
|
|
|
|
|
pipeline:
|
2018-07-06 17:33:08 +00:00
|
|
|
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
|
|
|
|
|
2018-07-11 09:06:54 +00:00
|
|
|
# drone secret update --name docker_username --value arno --event push --event tag --event deployment arno/hipchat
|
|
|
|
# drone secret update --name docker_password --value "$(pass show vps/registry.nixaid.com | head -1)" --event push --event tag --event deployment arno/hipchat
|
2018-07-04 09:14:41 +00:00
|
|
|
publish:
|
|
|
|
image: plugins/docker:17.12
|
2018-07-11 09:06:54 +00:00
|
|
|
# repo: andrey01/${DRONE_REPO_NAME}
|
|
|
|
registry: registry.nixaid.com
|
|
|
|
repo: registry.nixaid.com/andrey01/${DRONE_REPO_NAME}
|
2018-07-06 17:33:08 +00:00
|
|
|
tags:
|
|
|
|
- latest
|
2018-07-11 09:06:54 +00:00
|
|
|
# - ${DRONE_COMMIT_SHA:0:7}
|
2018-07-04 09:14:41 +00:00
|
|
|
# group: docker
|
|
|
|
# dockerfile: Dockerfile
|
2018-07-06 17:33:08 +00:00
|
|
|
secrets: [docker_username, docker_password]
|
|
|
|
# Since we restore the docker image cache to /drone/docker
|
|
|
|
storage_path: /drone/docker
|
|
|
|
use_cache: true
|
2018-07-04 09:14:41 +00:00
|
|
|
when:
|
|
|
|
event: [push, tag]
|
|
|
|
branch: master
|
|
|
|
|
2018-07-11 09:11:53 +00:00
|
|
|
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
|
|
|
|
|
2018-07-11 09:06:54 +00:00
|
|
|
# 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 ]
|
|
|
|
scan_image: registry.nixaid.com/andrey01/${DRONE_REPO_NAME}:latest
|
|
|
|
ca_cert: |
|
|
|
|
-----BEGIN CERTIFICATE-----
|
|
|
|
MIIBOjCB4KADAgECAgkAzhpbLWXa4H0wCgYIKoZIzj0EAwIwEDEOMAwGA1UEAwwF
|
|
|
|
bXktQ0EwHhcNMTgwNzA5MjIzMTAzWhcNMjgwNzA2MjIzMTAzWjAQMQ4wDAYDVQQD
|
|
|
|
DAVteS1DQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFIE8bTfQ76U5qG/Xgjw
|
|
|
|
BbQU0oRJLYlRxBIWF9MTNSJr2LoaoyrU8jrcWQGRrfKPoVuwUJWp2tp5SJy0AHH7
|
|
|
|
4fijIzAhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgKkMAoGCCqGSM49
|
|
|
|
BAMCA0kAMEYCIQCYbTbxRD2yX4LzGjh84fKPWPQM9ps8RE2nfwZjqdRUGgIhAOHb
|
|
|
|
USigh6FzqEPk2jiaV3t1wNtChRWRfupTKG6CD345
|
|
|
|
-----END CERTIFICATE-----
|
|
|
|
|
2018-07-04 09:14:41 +00:00
|
|
|
notify:
|
|
|
|
image: drillster/drone-email:latest
|
|
|
|
from: Drone CI <noreply@nixaid.com>
|
2018-07-06 17:33:08 +00:00
|
|
|
subject: NIXAID Drone Pipeline {{#success build.status}}SUCCESS{{else}}FAILURE{{/success}} Notification
|
2018-07-04 09:14:41 +00:00
|
|
|
host: mail.nixaid.com
|
|
|
|
port: 587
|
|
|
|
# username: arno
|
2018-07-06 17:33:08 +00:00
|
|
|
# secrets: [ email_username, email_password ]
|
2018-07-04 09:14:41 +00:00
|
|
|
# recipients: [ andrey.arapov@nixaid.com ]
|
|
|
|
when:
|
|
|
|
status: [success, failure] # changed
|
|
|
|
event: [push, tag]
|