talos/.drone.yml
Andrew Rynhard 86e24601b1
chore: publish AMIs on tags (#633)
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
2019-05-09 13:04:41 -07:00

207 lines
3.4 KiB
YAML

---
kind: pipeline
name: default
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: tmp
path: /tmp
steps:
- name: fetch
image: docker:git
commands:
- git fetch --tags
when:
event: tag
- name: conform
image: autonomy/conform:c539351
depends_on:
- fetch
- name: lint
image: autonomy/build-container:latest
pull: always
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
BINDIR: /usr/local/bin
commands:
- make lint
volumes:
- name: dockersock
path: /var/run
depends_on:
- fetch
- name: build
image: autonomy/build-container:latest
pull: always
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
BINDIR: /usr/local/bin
commands:
- make drone
volumes:
- name: dockersock
path: /var/run
depends_on:
- fetch
- name: test
image: autonomy/build-container:latest
pull: always
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
BINDIR: /usr/local/bin
commands:
- make test
volumes:
- name: dockersock
path: /var/run
depends_on:
- build
- name: coverage
image: plugins/codecov
settings:
token:
from_secret: codecov_token
files:
- coverage.txt
depends_on:
- test
- name: basic-integration
image: autonomy/build-container:latest
pull: always
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
BINDIR: /usr/local/bin
commands:
- make integration
volumes:
- name: dockersock
path: /var/run
- name: tmp
path: /tmp
depends_on:
- build
when:
event: pull_request
- name: iso
image: autonomy/build-container:latest
pull: always
environment:
BUILDKIT_HOST: tcp://buildkitd.ci.svc:1234
BINDIR: /usr/local/bin
commands:
- make talos-iso
volumes:
- name: dockersock
path: /var/run
when:
event: tag
depends_on:
- basic-integration
- name: push
image: autonomy/build-container:latest
pull: always
environment:
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- make login
- make push
volumes:
- name: dockersock
path: /var/run
when:
event:
exclude:
- pull_request
depends_on:
- basic-integration
- name: ami
image: autonomy/build-container:latest
pull: always
environment:
AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id
AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key
AWS_DEFAULT_REGION: us-west-2
AWS_PUBLISH_REGIONS: us-west-1,us-west-2,us-east-1,us-east-2,eu-central-1
commands:
- make talos-aws
volumes:
- name: dockersock
path: /var/run
when:
event:
exclude:
- pull_request
depends_on:
- push
- name: release
image: plugins/github-release
settings:
api_key:
from_secret: github_token
draft: true
files:
- build/*
checksum:
- sha256
- sha512
when:
event: tag
depends_on:
- basic-integration
- iso
- ami
volumes:
- name: dockersock
temp: {}
- name: tmp
temp: {}
---
kind: pipeline
name: notify
clone:
disable: true
steps:
- name: slack
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel: proj-talos-maint
when:
status:
- success
- failure
trigger:
status:
- success
- failure
depends_on:
- default