capture/.woodpecker.yml

22 lines
444 B
YAML
Raw Normal View History

2023-05-26 16:41:10 +02:00
variables:
- &golang "golang:1.19"
2023-05-26 11:50:35 +02:00
pipeline:
test:
2023-05-26 16:41:10 +02:00
image: *golang
2023-05-26 11:50:35 +02:00
commands:
- go test -v
2023-05-26 14:19:19 +02:00
2023-05-26 11:50:35 +02:00
build:
2023-05-26 16:41:10 +02:00
image: *golang
environment:
2023-05-26 16:50:37 +02:00
TAG: ${CI_COMMIT_TAG:-}
2023-05-26 11:50:35 +02:00
commands:
- go build
2023-05-26 14:19:19 +02:00
- ART=/artifacts/deblan/capture
- test -d $ART || mkdir $ART
2023-05-26 16:41:10 +02:00
- cp capture $ART/capture-latest
2023-05-26 16:49:01 +02:00
- test -z $TAG && cp capture $ART/capture-$TAG || true
2023-05-26 14:19:19 +02:00
volumes:
- /var/www/html/artifacts:/artifacts