migration #10

Merged
khwezi merged 2 commits from migration into master 2026-05-10 09:04:22 +02:00
2 changed files with 24 additions and 7 deletions
Showing only changes of commit 6757eb342e - Show all commits
+23 -6
View File
@@ -31,20 +31,37 @@ steps:
registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/litecharms-shop
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
custom_labels:
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/scheduler
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
- org.opencontainers.image.revision=${DRONE_COMMIT_SHA}
username: { from_secret: docker_username }
password: { from_secret: docker_password }
- name: gitea-tag
- name: gitea-tag-release
image: alpine/git
environment:
GITEA_TOKEN: { from_secret: git_token }
GITEA_USER: { from_secret: git_username }
GITEA_PASS: { from_secret: git_password }
commands:
- git config --global user.email "drone@litecharms.co.za"
- git config --global user.name "Drone CI"
- git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/litecharmsshop.git
- echo "169.255.58.144 gitea.khongisa.co.za" >> /etc/hosts
- apk add --no-cache curl
- git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git
- git tag 1.${DRONE_BUILD_NUMBER}
- git push origin 1.${DRONE_BUILD_NUMBER}
- |
curl -X POST "https://gitea.khongisa.co.za/api/v1/repos/litecharms/scheduler/releases" \
-H "Authorization: token $${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"1.${DRONE_BUILD_NUMBER}\",
\"target_commitish\": \"${DRONE_COMMIT_SHA}\",
\"name\": \"Release 1.${DRONE_BUILD_NUMBER}\",
\"body\": \"### Artifacts\n* **Docker Image:** nexus.khongisa.co.za/litecharms-scheduler:1.${DRONE_BUILD_NUMBER}\n* **NuGet:** [View on Nexus](https://nexus.khongisa.co.za/repository/nuget-group/)\",
\"draft\": false,
\"prerelease\": false
}"
depends_on:
- build
@@ -66,7 +83,7 @@ steps:
- mkdir -p $HOME/.kube
- echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f litecharms-shop-uat.yml
- kubectl rollout restart deployment/litecharms-shop-uat -n litecharms-shop-uat
- kubectl set image deployment/litecharms-shop-uat shop=nexus.khongisa.co.za/litecharms-shop:1.${DRONE_BUILD_NUMBER} -n litecharms-shop-uat
depends_on:
- package
@@ -88,7 +105,7 @@ steps:
- mkdir -p $HOME/.kube
- echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f litecharms-shop.yml
- kubectl rollout restart shop/deployment/litecharms-shop -n litecharms-shop
- kubectl set image deployment/litecharms-shop shop=nexus.khongisa.co.za/litecharms-shop:1.${DRONE_BUILD_NUMBER} -n litecharms-shop
depends_on:
- uat
+1 -1
View File
@@ -44,7 +44,7 @@ metadata:
name: litecharms-shop
namespace: litecharms-shop-uat
spec:
replicas: 1
replicas: 2
selector:
matchLabels:
app: shop