Add .woodpecker.yml from template
This commit is contained in:
parent
e8d146b74d
commit
37d5e037d4
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-test5:latest .
|
||||
- docker build -t zot.orchard9.ai/landing-test5:${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-test5:latest
|
||||
- docker push zot.orchard9.ai/landing-test5:${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-test5 landing-test5=zot.orchard9.ai/landing-test5:${CI_COMMIT_SHA:0:8} -n projects
|
||||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
Loading…
Reference in New Issue
Block a user