library/.woodpecker.yml

28 lines
835 B
YAML
Raw Normal View History

2022-04-03 00:20:34 +00:00
pipeline:
2022-04-03 19:33:23 +00:00
test:
image: golang:1.17
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:
2022-04-03 19:26:33 +00:00
- sleep 5 # wait for docker service to come up
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
2022-04-21 00:20:00 +00:00
- "curl http://yetagain:4000/api/ps -H 'Authorization: Bearer ${COMPOSE_TOKEN}' || true"
- "curl http://localhost:4000/api/ps -H 'Authorization: Bearer ${COMPOSE_TOKEN}' || true"
2022-04-03 19:19:06 +00:00
secrets: [docker_username, docker_password]
2022-04-03 19:33:23 +00:00
when:
branch: "master"
2022-04-03 19:07:38 +00:00
services:
docker:
image: docker:18.09-dind
command: ["--storage-driver=vfs"]
privileged: true
2022-04-03 19:33:23 +00:00
when:
branch: master