1
0
Fork 0
woodpecker-pipeline-transform/drone/testdata/.drone.yml

81 lines
1.1 KiB
YAML
Raw Normal View History

2022-07-26 23:16:28 +02:00
---
kind: pipeline
type: docker
name: build
2022-07-29 23:30:24 +02:00
platform:
os: linux
arch: amd64
2022-07-30 00:06:51 +02:00
node:
location: europe
2022-07-26 23:16:28 +02:00
steps:
- name: test
image: golang:1.18
2022-07-27 16:56:40 +02:00
pull: always
2022-07-27 18:29:52 +02:00
environment:
- CGO=0
2022-07-26 23:16:28 +02:00
commands:
2022-07-26 23:20:25 +02:00
- go test ./...
when:
event:
- push
branch:
exclude:
- main
- release/*
2022-07-26 23:16:28 +02:00
- name: build
image: golang:1.18
2022-07-27 16:56:40 +02:00
pull: never
2022-07-27 18:29:52 +02:00
environment:
CGO: 0
GOOS: linux
GOARCH: amd64
2022-07-26 23:16:28 +02:00
commands:
- go build
2022-07-29 01:11:24 +02:00
- name: docker
image: plugin/docker
settings:
repo: org/simple
username:
from_secret: docker_username
password:
from_secret: docker_password
2022-07-26 23:16:28 +02:00
---
kind: pipeline
type: docker
name: deploy
depends_on:
- build
trigger:
status:
- success
steps:
- name: deploy
image: alpine:latest
2022-07-27 16:56:40 +02:00
pull: if-not-exists
2022-07-29 23:11:11 +02:00
detach: true
2022-07-29 23:16:05 +02:00
privileged: true
2022-07-29 01:11:24 +02:00
environment:
PASSWORD:
from_secret: password
2022-07-26 23:16:28 +02:00
commands:
- echo "Deploy"
when:
status: [ success, failure ]
instance:
- stage.woodpecker.company.com
target:
- staging
event: tag
refs:
- refs/tags/v*
- refs/tags/RELEASE-*