fix(woodpecker): fix secrets syntax - use environment with from_secret
This commit is contained in:
parent
365ffd3b62
commit
a3622de8e9
1 changed files with 3 additions and 6 deletions
|
|
@ -3,7 +3,6 @@ when:
|
||||||
event: push
|
event: push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Step 1: Detect if changes exist
|
|
||||||
- name: detect-changes
|
- name: detect-changes
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
commands:
|
commands:
|
||||||
|
|
@ -34,7 +33,6 @@ steps:
|
||||||
# Export for other steps
|
# Export for other steps
|
||||||
cat .build-marker >> ${CI_ENV}
|
cat .build-marker >> ${CI_ENV}
|
||||||
|
|
||||||
# Step 2: Build and push Docker image (only if changed)
|
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
||||||
settings:
|
settings:
|
||||||
|
|
@ -53,10 +51,11 @@ steps:
|
||||||
when:
|
when:
|
||||||
- evaluate: 'env.SHOULD_BUILD == "true"'
|
- evaluate: 'env.SHOULD_BUILD == "true"'
|
||||||
|
|
||||||
# Step 3: Deploy to Kubernetes (only if changed)
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: bitnami/kubectl:latest
|
image: bitnami/kubectl:latest
|
||||||
secrets: [kube_config]
|
environment:
|
||||||
|
KUBE_CONFIG:
|
||||||
|
from_secret: kube_config
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
@ -91,9 +90,7 @@ steps:
|
||||||
kubectl get deployment/${DEPLOYMENT_NAME} -n ${NAMESPACE}
|
kubectl get deployment/${DEPLOYMENT_NAME} -n ${NAMESPACE}
|
||||||
when:
|
when:
|
||||||
- evaluate: 'env.SHOULD_BUILD == "true"'
|
- evaluate: 'env.SHOULD_BUILD == "true"'
|
||||||
- branch: [main, high-performance]
|
|
||||||
|
|
||||||
# Step 4: Notify status
|
|
||||||
- name: notify
|
- name: notify
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
commands:
|
commands:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue