refactor: move pipeline to .woodpecker/ directory
Some checks failed
ci/woodpecker/push/build Pipeline failed
Some checks failed
ci/woodpecker/push/build Pipeline failed
Use Woodpecker's default directory-based pipeline discovery. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0cf1307b08
commit
cb4bebb42c
1 changed files with 0 additions and 0 deletions
43
.woodpecker/build.yaml
Normal file
43
.woodpecker/build.yaml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
when:
|
||||
branch: [main, dev]
|
||||
event: push
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:1.24-alpine
|
||||
commands:
|
||||
- go test ./...
|
||||
|
||||
- name: build
|
||||
image: docker:27-cli
|
||||
environment:
|
||||
DOCKER_HOST: unix:///var/run/docker.sock
|
||||
commands:
|
||||
- docker build -t 10.0.0.3:5000/writekit:${CI_COMMIT_BRANCH} .
|
||||
- docker push 10.0.0.3:5000/writekit:${CI_COMMIT_BRANCH}
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
- name: deploy-staging
|
||||
image: alpine
|
||||
when:
|
||||
branch: dev
|
||||
commands:
|
||||
- apk add --no-cache openssh-client
|
||||
- mkdir -p ~/.ssh
|
||||
- cp /mnt/ssh/deploy_key ~/.ssh/id_ed25519
|
||||
- cp /mnt/ssh/known_hosts ~/.ssh/known_hosts
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
- ssh deploy@10.0.0.2 "cd /opt/writekit && docker compose pull writekit-staging && docker compose up -d writekit-staging"
|
||||
|
||||
- name: deploy-prod
|
||||
image: alpine
|
||||
when:
|
||||
branch: main
|
||||
commands:
|
||||
- apk add --no-cache openssh-client
|
||||
- mkdir -p ~/.ssh
|
||||
- cp /mnt/ssh/deploy_key ~/.ssh/id_ed25519
|
||||
- cp /mnt/ssh/known_hosts ~/.ssh/known_hosts
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
- ssh deploy@10.0.0.2 "cd /opt/writekit && docker compose pull writekit-prod && docker compose up -d writekit-prod"
|
||||
Loading…
Add table
Add a link
Reference in a new issue