capture/.woodpecker.yml

44 lines
981 B
YAML
Raw Normal View History

2023-05-26 16:41:10 +02:00
variables:
- &golang "golang:1.19"
2023-05-27 17:11:11 +02:00
- &volumes
2023-09-01 09:14:29 +02:00
- /var/www/html/artifacts/deblan/capture:/artifacts
2023-05-26 16:41:10 +02:00
2023-09-29 15:55:59 +02:00
steps:
2023-05-26 11:50:35 +02:00
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
2023-05-27 17:11:11 +02:00
volumes: *volumes
2023-05-26 11:50:35 +02:00
commands:
2023-08-03 15:09:12 +02:00
- make
2023-09-01 09:26:55 +02:00
- cp build/* /artifacts
2023-05-27 17:11:11 +02:00
2023-06-06 22:07:35 +02:00
push_release:
2023-05-27 17:11:11 +02:00
image: plugins/gitea-release
volumes: *volumes
settings:
api_key:
from_secret: gitnet_api_key
base_url: https://gitnet.fr
note: ${CI_COMMIT_MESSAGE}
2023-08-03 15:09:12 +02:00
files: build/*
2023-05-27 17:11:11 +02:00
when:
event: [tag]
2023-06-06 22:07:35 +02:00
docker_build_push:
image: docker:dind
secrets:
- registry_user
- registry_password
commands:
- echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
2023-06-06 22:15:49 +02:00
- "docker build -t deblan/capture:${CI_PIPELINE_DEPLOY_TARGET} ."
- "docker push deblan/capture:${CI_PIPELINE_DEPLOY_TARGET}"
2023-06-06 22:09:47 +02:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2023-06-06 22:07:35 +02:00
when:
event: [deployment]