library/.woodpecker.yml

28 lines
835 B
YAML

pipeline:
test:
image: golang:1.17
commands:
- go test ./...
build:
image: docker
environment:
- DOCKER_HOST=tcp://docker:2375
commands:
- sleep 5 # wait for docker service to come up
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD registry.yetaga.in
- docker build -t registry.yetaga.in/library:latest .
- docker push registry.yetaga.in/library:latest
- "curl http://yetagain:4000/api/ps -H 'Authorization: Bearer ${COMPOSE_TOKEN}' || true"
- "curl http://localhost:4000/api/ps -H 'Authorization: Bearer ${COMPOSE_TOKEN}' || true"
secrets: [docker_username, docker_password]
when:
branch: "master"
services:
docker:
image: docker:18.09-dind
command: ["--storage-driver=vfs"]
privileged: true
when:
branch: master