1
0
Fork 0
woodpecker-pipeline-transform/drone/testdata/simple.yml
2022-07-29 02:11:24 +03:00

76 lines
1.0 KiB
YAML

---
kind: pipeline
type: docker
name: build
steps:
- name: test
image: golang:1.18
pull: always
environment:
- CGO=0
commands:
- go test ./...
when:
event:
- push
branch:
exclude:
- main
- release/*
- name: build
image: golang:1.18
pull: never
environment:
CGO: 0
GOOS: linux
GOARCH: amd64
commands:
- go build
depends_on:
- test
- name: docker
image: plugin/docker
settings:
repo: org/simple
username:
from_secret: docker_username
password:
from_secret: docker_password
depends_on:
- build
---
kind: pipeline
type: docker
name: deploy
depends_on:
- build
trigger:
status:
- success
steps:
- name: deploy
image: alpine:latest
pull: if-not-exists
environment:
PASSWORD:
from_secret: password
commands:
- echo "Deploy"
when:
status: [ success, failure ]
instance:
- stage.woodpecker.company.com
target:
- staging
event: tag
refs:
- refs/tags/v*
- refs/tags/RELEASE-*