Update .woodpecker.yml
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
colin 2025-02-01 09:40:28 -05:00
parent 714ad2c390
commit 68ac45cf36
1 changed files with 40 additions and 21 deletions

View File

@ -1,44 +1,63 @@
# woodpecker.yml
labels: labels:
hostname: "macmini7" location: manager
clone: clone:
git: git:
image: woodpeckerci/plugin-git image: woodpeckerci/plugin-git
settings: settings:
partial: false partial: false
depth: 1 depth: 1
steps: steps:
# run-smoke-tests: # Deploy Config if there are relevant changes
# 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: deploy-config:
name: 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 image: woodpeckerci/plugin-docker-buildx
secrets: [REGISTRY_USER, REGISTRY_PASSWORD] environment:
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
DOCKER_REGISTRY_USER:
from_secret: DOCKER_REGISTRY_USER
DOCKER_REGISTRY_PASSWORD:
from_secret: DOCKER_REGISTRY_PASSWORD
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
commands: commands:
# - echo "$${REGISTRY_PASSWORD}" | docker login -u "$${REGISTRY_USER}" --password-stdin git.nixc.us - echo "Logging into registries"
- echo "$${DOCKER_REGISTRY_PASSWORD}" | docker login -u "$${DOCKER_REGISTRY_USER}" --password-stdin
- echo "$${REGISTRY_PASSWORD}" | docker login -u "$${REGISTRY_USER}" --password-stdin git.nixc.us
- echo "Deploying updated stack configuration"
- docker stack deploy --with-registry-auth -c ./stack.yml $${CI_REPO_NAME} - docker stack deploy --with-registry-auth -c ./stack.yml $${CI_REPO_NAME}
when:
branch: main
event: push
# Wait step to allow the deployment to stabilize before testing
wait: wait:
# image: alpine name: wait-for-deploy
image: woodpeckerci/plugin-git image: woodpeckerci/plugin-git
commands: commands:
- echo "Waiting for five minutes" - echo "Waiting for five minutes before running tests"
- sleep 300 # Waits for five minutes - sleep 300 # Waits for five minutes
when:
branch: main
event: push
# Run Post-Deployment Smoke Tests
run-post-deploy-smoke-tests: run-post-deploy-smoke-tests:
name: run-post-deploy-smoke-tests name: run-post-deploy-smoke-tests
image: git.nixc.us/colin/playwright:latest image: git.nixc.us/colin/playwright:latest
secrets: [REGISTRY_USER, REGISTRY_PASSWORD, SWARM_USERNAME, SWARM_PASSWORD] environment:
REGISTRY_USER:
from_secret: REGISTRY_USER
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
SWARM_USERNAME:
from_secret: SWARM_USERNAME
SWARM_PASSWORD:
from_secret: SWARM_PASSWORD
when: when:
- branch: main branch: main
- path: event: push
include: [ 'stack.yml', 'docker-compose.yml', 'Dockerfile', '.woodpecker.yml', '*.tests.ts' ]