82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
# CI/CD Pipeline for diag-test
|
|
# Components will add their build steps below the marker
|
|
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
depth: 1
|
|
|
|
steps:
|
|
# COMPONENT_STEPS_BELOW
|
|
|
|
# Woodpecker CI step for web React app
|
|
# Add this step to your .woodpecker.yml
|
|
|
|
build-web:
|
|
image: woodpeckerci/plugin-kaniko
|
|
settings:
|
|
registry: registry.threesix.ai
|
|
repo: diag-test/web
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA:0:8}
|
|
context: .
|
|
dockerfile: apps/web/Dockerfile
|
|
cache: true
|
|
skip-tls-verify: true
|
|
when:
|
|
branch: main
|
|
event: push
|
|
|
|
deploy-web:
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- kubectl set image deployment/diag-test-web
|
|
web=registry.threesix.ai/diag-test/web:${CI_COMMIT_SHA:0:8}
|
|
-n projects
|
|
|| echo "No deployment found for web, skipping"
|
|
when:
|
|
branch: main
|
|
event: push
|
|
|
|
# Woodpecker CI step for api service
|
|
# Add this step to your .woodpecker.yml
|
|
|
|
build-api:
|
|
image: woodpeckerci/plugin-kaniko
|
|
settings:
|
|
registry: registry.threesix.ai
|
|
repo: diag-test/api
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA:0:8}
|
|
context: .
|
|
dockerfile: services/api/Dockerfile
|
|
cache: true
|
|
skip-tls-verify: true
|
|
when:
|
|
branch: main
|
|
event: push
|
|
|
|
deploy-api:
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- kubectl set image deployment/diag-test-api
|
|
api=registry.threesix.ai/diag-test/api:${CI_COMMIT_SHA:0:8}
|
|
-n projects
|
|
|| echo "No deployment found for api, skipping"
|
|
when:
|
|
branch: main
|
|
event: push
|
|
# Do not remove the marker above - component steps are inserted here
|
|
|
|
verify:
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- echo "Pipeline complete for diag-test"
|
|
- kubectl get deployments -n projects -l app=diag-test --no-headers || true
|
|
when:
|
|
branch: main
|
|
event: push
|