mirror of
https://github.com/thegeeklab/wp-github-comment.git
synced 2024-11-13 23:10:40 +00:00
379 lines
6.9 KiB
YAML
379 lines
6.9 KiB
YAML
---
|
|
kind: pipeline
|
|
name: test
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: staticcheck
|
|
image: golang:1.14
|
|
commands:
|
|
- go run honnef.co/go/tools/cmd/staticcheck ./...
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
|
|
- name: lint
|
|
image: golang:1.14
|
|
commands:
|
|
- go run golang.org/x/lint/golint -set_exit_status ./...
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
|
|
- name: vet
|
|
image: golang:1.14
|
|
commands:
|
|
- go vet ./...
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
|
|
- name: test
|
|
image: golang:1.14
|
|
commands:
|
|
- go test -cover ./...
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
|
|
volumes:
|
|
- name: gopath
|
|
temp: {}
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
- refs/pull/**
|
|
|
|
---
|
|
kind: pipeline
|
|
name: build-container-amd64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.14
|
|
commands:
|
|
- go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/drone-github-comment ./cmd/drone-github-comment
|
|
|
|
- name: dryrun
|
|
image: plugins/docker:18-linux-amd64
|
|
settings:
|
|
dockerfile: docker/Dockerfile
|
|
dry_run: true
|
|
password:
|
|
from_secret: docker_password
|
|
repo: xoxys/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
ref:
|
|
- refs/pull/**
|
|
depends_on:
|
|
- build
|
|
|
|
- name: publish-dockerhub
|
|
image: plugins/docker:18-linux-amd64
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: amd64
|
|
dockerfile: docker/Dockerfile
|
|
password:
|
|
from_secret: docker_password
|
|
repo: xoxys/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
depends_on:
|
|
- dryrun
|
|
|
|
- name: publish-quay
|
|
image: plugins/docker:18-linux-amd64
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: amd64
|
|
dockerfile: docker/Dockerfile
|
|
password:
|
|
from_secret: quay_password
|
|
registry: quay.io
|
|
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: quay_username
|
|
when:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
depends_on:
|
|
- dryrun
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
- refs/pull/**
|
|
|
|
depends_on:
|
|
- test
|
|
|
|
---
|
|
kind: pipeline
|
|
name: build-container-arm64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.14
|
|
commands:
|
|
- go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/drone-github-comment ./cmd/drone-github-comment
|
|
|
|
- name: dryrun
|
|
image: plugins/docker:18-linux-arm64
|
|
settings:
|
|
dockerfile: docker/Dockerfile
|
|
dry_run: true
|
|
password:
|
|
from_secret: docker_password
|
|
repo: xoxys/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
ref:
|
|
- refs/pull/**
|
|
depends_on:
|
|
- build
|
|
|
|
- name: publish-dockerhub
|
|
image: plugins/docker:18-linux-arm64
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: arm64
|
|
dockerfile: docker/Dockerfile
|
|
password:
|
|
from_secret: docker_password
|
|
repo: xoxys/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
depends_on:
|
|
- dryrun
|
|
|
|
- name: publish-quay
|
|
image: plugins/docker:18-linux-arm64
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: arm64
|
|
dockerfile: docker/Dockerfile
|
|
password:
|
|
from_secret: quay_password
|
|
registry: quay.io
|
|
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: quay_username
|
|
when:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
depends_on:
|
|
- dryrun
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
- refs/pull/**
|
|
|
|
depends_on:
|
|
- test
|
|
|
|
---
|
|
kind: pipeline
|
|
name: build-container-arm
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm
|
|
|
|
steps:
|
|
- name: build
|
|
image: golang:1.14
|
|
commands:
|
|
- go build -v -ldflags "-X main.version=${DRONE_TAG:-latest}" -a -tags netgo -o release/drone-github-comment ./cmd/drone-github-comment
|
|
|
|
- name: dryrun
|
|
image: plugins/docker:18-linux-arm
|
|
settings:
|
|
dockerfile: docker/Dockerfile
|
|
dry_run: true
|
|
password:
|
|
from_secret: docker_password
|
|
repo: xoxys/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
ref:
|
|
- refs/pull/**
|
|
depends_on:
|
|
- build
|
|
|
|
- name: publish-dockerhub
|
|
image: plugins/docker:18-linux-arm
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: arm
|
|
dockerfile: docker/Dockerfile
|
|
password:
|
|
from_secret: docker_password
|
|
repo: xoxys/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
depends_on:
|
|
- dryrun
|
|
|
|
- name: publish-quay
|
|
image: plugins/docker:18-linux-arm
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: arm
|
|
dockerfile: docker/Dockerfile
|
|
password:
|
|
from_secret: quay_password
|
|
registry: quay.io
|
|
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
|
username:
|
|
from_secret: quay_username
|
|
when:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
depends_on:
|
|
- dryrun
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
- refs/pull/**
|
|
|
|
depends_on:
|
|
- test
|
|
|
|
---
|
|
kind: pipeline
|
|
name: notifications
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: manifest-dockerhub
|
|
image: plugins/manifest
|
|
settings:
|
|
auto_tag: true
|
|
ignore_missing: true
|
|
password:
|
|
from_secret: docker_password
|
|
spec: docker/manifest.tmpl
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
status:
|
|
- success
|
|
|
|
- name: manifest-quay
|
|
image: plugins/manifest
|
|
settings:
|
|
auto_tag: true
|
|
ignore_missing: true
|
|
password:
|
|
from_secret: quay_password
|
|
spec: docker/manifest-quay.tmpl
|
|
username:
|
|
from_secret: quay_username
|
|
when:
|
|
status:
|
|
- success
|
|
|
|
- name: pushrm-dockerhub
|
|
pull: always
|
|
image: chko/docker-pushrm:1
|
|
environment:
|
|
DOCKER_PASS:
|
|
from_secret: docker_password
|
|
DOCKER_USER:
|
|
from_secret: docker_username
|
|
PUSHRM_FILE: README.md
|
|
PUSHRM_SHORT: Drone CI - Plugin to add comments to GitHub Issues/PRs
|
|
PUSHRM_TARGET: xoxys/${DRONE_REPO_NAME}
|
|
when:
|
|
status:
|
|
- success
|
|
|
|
- name: pushrm-quay
|
|
pull: always
|
|
image: chko/docker-pushrm:1
|
|
environment:
|
|
APIKEY__QUAY_IO:
|
|
from_secret: quay_token
|
|
PUSHRM_FILE: README.md
|
|
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
|
when:
|
|
status:
|
|
- success
|
|
|
|
- name: matrix
|
|
image: plugins/matrix
|
|
settings:
|
|
homeserver:
|
|
from_secret: matrix_homeserver
|
|
password:
|
|
from_secret: matrix_password
|
|
roomid:
|
|
from_secret: matrix_roomid
|
|
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
|
username:
|
|
from_secret: matrix_username
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- refs/tags/**
|
|
status:
|
|
- success
|
|
- failure
|
|
|
|
depends_on:
|
|
- build-container-amd64
|
|
- build-container-arm
|
|
- build-container-arm64
|
|
|
|
---
|
|
kind: signature
|
|
hmac: a082ae36a906ec50e97966c07586d881c0430d4f48d2a14642dc388817e5533f
|
|
|
|
...
|