library/.woodpecker.yml

29 lines
811 B
YAML
Raw Normal View History

2022-04-03 00:20:34 +00:00
pipeline:
2022-04-03 19:33:23 +00:00
test:
2022-05-07 19:50:14 +00:00
image: golang:1.18
2022-04-03 19:33:23 +00:00
commands:
- go test ./...
2022-04-03 00:20:34 +00:00
build:
image: docker
environment:
2022-04-03 19:07:38 +00:00
- DOCKER_HOST=tcp://docker:2375
2022-04-03 00:20:34 +00:00
commands:
- apk add curl
2022-04-03 19:19:06 +00:00
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD registry.yetaga.in
2022-04-03 19:07:38 +00:00
- docker build -t registry.yetaga.in/library:latest .
- docker push registry.yetaga.in/library:latest
- 'curl http://172.17.0.1:4000/api/fetch -H "Authorization: Bearer $COMPOSE_TOKEN"'
- 'curl http://172.17.0.1:4000/api/update -H "Authorization: Bearer $COMPOSE_TOKEN"'
2022-04-21 00:54:01 +00:00
secrets: [docker_username, docker_password, compose_token]
2022-04-03 19:33:23 +00:00
when:
branch: "master"
2022-04-03 19:07:38 +00:00
services:
docker:
image: docker:dind
2022-10-31 00:18:21 +00:00
environment:
- DOCKER_TLS_CERTDIR=""
2022-04-03 19:07:38 +00:00
privileged: true
2022-04-03 19:33:23 +00:00
when:
branch: master