mirror of
https://github.com/thegeeklab/wp-ansible.git
synced 2024-11-09 17:10:41 +00:00
333 lines
5.7 KiB
YAML
333 lines
5.7 KiB
YAML
---
|
|
kind: pipeline
|
|
name: testing
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: vet
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- go vet ./...
|
|
environment:
|
|
GO111MODULE: on
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
|
|
- name: test
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- go test -cover ./...
|
|
environment:
|
|
GO111MODULE: on
|
|
volumes:
|
|
- name: gopath
|
|
path: /go
|
|
|
|
volumes:
|
|
- name: gopath
|
|
temp: {}
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- "refs/tags/**"
|
|
- "refs/pull/**"
|
|
|
|
---
|
|
kind: pipeline
|
|
name: linux-amd64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: build-push
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-ansible"
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GO111MODULE: on
|
|
when:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
- name: build-tag
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ansible"
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GO111MODULE: on
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: executable
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- ./release/linux/amd64/drone-ansible --help
|
|
|
|
- name: dryrun
|
|
pull: always
|
|
image: plugins/docker:linux-amd64
|
|
settings:
|
|
daemon_off: false
|
|
dockerfile: docker/Dockerfile.linux.amd64
|
|
dry_run: true
|
|
password:
|
|
from_secret: docker_password
|
|
repo: plugins/ansible
|
|
tags: linux-amd64
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: publish
|
|
pull: always
|
|
image: plugins/docker:linux-amd64
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-amd64
|
|
daemon_off: false
|
|
dockerfile: docker/Dockerfile.linux.amd64
|
|
password:
|
|
from_secret: docker_password
|
|
repo: plugins/ansible
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
event:
|
|
exclude:
|
|
- pull_request
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- "refs/tags/**"
|
|
- "refs/pull/**"
|
|
|
|
depends_on:
|
|
- testing
|
|
|
|
---
|
|
kind: pipeline
|
|
name: linux-arm64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
steps:
|
|
- name: build-push
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-ansible"
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GO111MODULE: on
|
|
when:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
- name: build-tag
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ansible"
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GO111MODULE: on
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: executable
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- ./release/linux/arm64/drone-ansible --help
|
|
|
|
- name: dryrun
|
|
pull: always
|
|
image: plugins/docker:linux-arm64
|
|
settings:
|
|
daemon_off: false
|
|
dockerfile: docker/Dockerfile.linux.arm64
|
|
dry_run: true
|
|
password:
|
|
from_secret: docker_password
|
|
repo: plugins/ansible
|
|
tags: linux-arm64
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: publish
|
|
pull: always
|
|
image: plugins/docker:linux-arm64
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm64
|
|
daemon_off: false
|
|
dockerfile: docker/Dockerfile.linux.arm64
|
|
password:
|
|
from_secret: docker_password
|
|
repo: plugins/ansible
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
event:
|
|
exclude:
|
|
- pull_request
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- "refs/tags/**"
|
|
- "refs/pull/**"
|
|
|
|
depends_on:
|
|
- testing
|
|
|
|
---
|
|
kind: pipeline
|
|
name: linux-arm
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm
|
|
|
|
steps:
|
|
- name: build-push
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ansible"
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GO111MODULE: on
|
|
when:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
- name: build-tag
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ansible"
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
GO111MODULE: on
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: executable
|
|
pull: always
|
|
image: golang:1.11
|
|
commands:
|
|
- ./release/linux/arm/drone-ansible --help
|
|
|
|
- name: dryrun
|
|
pull: always
|
|
image: plugins/docker:linux-arm
|
|
settings:
|
|
daemon_off: false
|
|
dockerfile: docker/Dockerfile.linux.arm
|
|
dry_run: true
|
|
password:
|
|
from_secret: docker_password
|
|
repo: plugins/ansible
|
|
tags: linux-arm
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
event:
|
|
- pull_request
|
|
|
|
- name: publish
|
|
pull: always
|
|
image: plugins/docker:linux-arm
|
|
settings:
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm
|
|
daemon_off: false
|
|
dockerfile: docker/Dockerfile.linux.arm
|
|
password:
|
|
from_secret: docker_password
|
|
repo: plugins/ansible
|
|
username:
|
|
from_secret: docker_username
|
|
when:
|
|
event:
|
|
exclude:
|
|
- pull_request
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- "refs/tags/**"
|
|
- "refs/pull/**"
|
|
|
|
depends_on:
|
|
- testing
|
|
|
|
---
|
|
kind: pipeline
|
|
name: notifications
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: manifest
|
|
pull: always
|
|
image: plugins/manifest
|
|
settings:
|
|
auto_tag: true
|
|
ignore_missing: true
|
|
password:
|
|
from_secret: docker_password
|
|
spec: docker/manifest.tmpl
|
|
username:
|
|
from_secret: docker_username
|
|
|
|
- name: microbadger
|
|
pull: always
|
|
image: plugins/webhook
|
|
settings:
|
|
urls:
|
|
from_secret: microbadger_url
|
|
|
|
trigger:
|
|
ref:
|
|
- refs/heads/master
|
|
- "refs/tags/**"
|
|
|
|
depends_on:
|
|
- linux-amd64
|
|
- linux-arm64
|
|
- linux-arm
|
|
|
|
...
|