init
This commit is contained in:
commit
d69342b2e9
160 changed files with 28681 additions and 0 deletions
43
.woodpecker.yml
Normal file
43
.woodpecker.yml
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