Merge pull request 'feat: Add a new step to the deploy pipeline to update Kubernetes manifests with the latest image tag.' (#3) from build/add-push-drone-pipeleine into main
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
+20
@@ -1,6 +1,7 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: pr-check
|
name: pr-check
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
@@ -16,6 +17,7 @@ steps:
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
@@ -40,3 +42,21 @@ steps:
|
|||||||
from_secret: gitea_username
|
from_secret: gitea_username
|
||||||
password:
|
password:
|
||||||
from_secret: gitea_password
|
from_secret: gitea_password
|
||||||
|
|
||||||
|
- name: update-manifests
|
||||||
|
image: alpine:3.20
|
||||||
|
environment:
|
||||||
|
GITEA_USERNAME:
|
||||||
|
from_secret: gitea_username
|
||||||
|
GITEA_PASSWORD:
|
||||||
|
from_secret: gitea_password
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache git sed
|
||||||
|
- git clone https://gitea.mnky-code.de/mnky/k8s-manifests.git
|
||||||
|
- cd k8s-manifests
|
||||||
|
- 'sed -i "s|image: gitea.mnky-code.de/mnky/ngrx-playground:.*|image: gitea.mnky-code.de/mnky/ngrx-playground:${DRONE_COMMIT_SHA}|" ngrx-playground/deployment.yaml'
|
||||||
|
- git config user.name "drone"
|
||||||
|
- git config user.email "drone@mnky-code.de"
|
||||||
|
- git add ngrx-playground/deployment.yaml
|
||||||
|
- 'git commit -m "Deploy ngrx-playground ${DRONE_COMMIT_SHA}" || exit 0'
|
||||||
|
- 'git push https://${GITEA_USERNAME}:${GITEA_PASSWORD}@gitea.mnky-code.de/mnky/k8s-manifests.git HEAD:main'
|
||||||
|
|||||||
Reference in New Issue
Block a user