Add .woodpecker.yml from template
This commit is contained in:
parent
5be3f41a48
commit
34c65d1315
43
.woodpecker.yml
Normal file
43
.woodpecker.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
steps:
|
||||||
|
install:
|
||||||
|
image: node:20-alpine
|
||||||
|
commands:
|
||||||
|
- npm ci
|
||||||
|
when:
|
||||||
|
- event: [push, pull_request]
|
||||||
|
|
||||||
|
build:
|
||||||
|
image: node:20-alpine
|
||||||
|
commands:
|
||||||
|
- npm run build
|
||||||
|
when:
|
||||||
|
- event: [push, pull_request]
|
||||||
|
|
||||||
|
docker:
|
||||||
|
image: docker:24-dind
|
||||||
|
privileged: true
|
||||||
|
commands:
|
||||||
|
- docker build -t zot.orchard9.ai/landing-test6:latest .
|
||||||
|
- docker build -t zot.orchard9.ai/landing-test6:${CI_COMMIT_SHA:0:8} .
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
|
||||||
|
push:
|
||||||
|
image: docker:24-dind
|
||||||
|
privileged: true
|
||||||
|
commands:
|
||||||
|
- echo "$ZOT_PASSWORD" | docker login zot.orchard9.ai -u "$ZOT_USER" --password-stdin
|
||||||
|
- docker push zot.orchard9.ai/landing-test6:latest
|
||||||
|
- docker push zot.orchard9.ai/landing-test6:${CI_COMMIT_SHA:0:8}
|
||||||
|
secrets: [zot_user, zot_password]
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
image: bitnami/kubectl:latest
|
||||||
|
commands:
|
||||||
|
- kubectl set image deployment/landing-test6 landing-test6=zot.orchard9.ai/landing-test6:${CI_COMMIT_SHA:0:8} -n projects
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
Loading…
Reference in New Issue
Block a user