swarmpit/.woodpecker.yml

44 lines
1.5 KiB
YAML

# woodpecker.yml
labels:
hostname: "macmini7"
clone:
git:
image: woodpeckerci/plugin-git
settings:
partial: false
depth: 1
steps:
run-smoke-tests:
name: run-playwright-tests
image: git.nixc.us/colin/playwright:latest
secrets: [REGISTRY_USER, REGISTRY_PASSWORD, SWARM_USERNAME, SWARM_PASSWORD]
when:
- branch: main
- path:
include: [ 'stack.yml', 'docker-compose.yml', 'Dockerfile', '.woodpecker.yml', '*.tests.ts' ]
deploy-config:
name: deploy-config
when:
- path:
include: [ 'README.md', 'stack.yml', 'docker-compose.yml', 'Dockerfile', '.woodpecker.yml', '*.tests.ts' ]
image: woodpeckerci/plugin-docker-buildx
secrets: [REGISTRY_USER, REGISTRY_PASSWORD]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
# - echo "$${REGISTRY_PASSWORD}" | docker login -u "$${REGISTRY_USER}" --password-stdin git.nixc.us
- docker stack deploy --with-registry-auth -c ./stack.yml $${CI_REPO_NAME}
wait:
# image: alpine
image: woodpeckerci/plugin-git
commands:
- echo "Waiting for five minutes"
- sleep 300 # Waits for five minutes
run-post-deploy-smoke-tests:
name: run-post-deploy-smoke-tests
image: git.nixc.us/colin/playwright:latest
secrets: [REGISTRY_USER, REGISTRY_PASSWORD, SWARM_USERNAME, SWARM_PASSWORD]
when:
- branch: main
- path:
include: [ 'stack.yml', 'docker-compose.yml', 'Dockerfile', '.woodpecker.yml', '*.tests.ts' ]