Files
demo-api/.woodpecker.yml

28 lines
813 B
YAML

when:
- event: push
branch: main
steps:
- name: build
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
- dotnet restore
- dotnet build --no-restore
- dotnet publish -c Release -o /tmp/publish --no-restore
- name: docker
image: plugins/docker
settings:
registry: registry.ci-cd.svc.cluster.local:5000
repo: registry.ci-cd.svc.cluster.local:5000/demo/demo-api
tags:
- latest
- ${CI_COMMIT_SHA:0:8}
insecure: true
- name: deploy
image: bitnami/kubectl:latest
commands:
- kubectl set image deployment/demo-api api=registry.ci-cd.svc.cluster.local:5000/demo/demo-api:${CI_COMMIT_SHA:0:8} -n apps || echo "First deploy - will create"
- kubectl rollout status deployment/demo-api -n apps --timeout=60s || true