Compare commits

..

7 Commits

Author SHA1 Message Date
khwezi a7b9e945a3 Merge pull request 'Added host entry to my gitea instance to git tag and release commands' (#10) from migration into master
Reviewed-on: #10
2026-05-10 08:54:39 +02:00
Khwezi Mngoma 4a20c5ea5f Added host entry to my gitea instance to git tag and release commands
continuous-integration/drone/pr Build is passing
2026-05-10 08:54:14 +02:00
khwezi 6f5892c228 Merge pull request 'migration' (#9) from migration into master
Reviewed-on: #9
2026-05-10 08:47:01 +02:00
Khwezi Mngoma 23d992704e Removed image specification on uat deploy
continuous-integration/drone/pr Build is failing
2026-05-10 08:46:40 +02:00
Khwezi Mngoma 581cd2084a Added step to install curl on tag and release step 2026-05-10 08:45:54 +02:00
khwezi 87bfc65b34 Merge pull request 'Added git tag and release step to package' (#8) from migration into master
Reviewed-on: #8
2026-05-10 08:38:40 +02:00
Khwezi Mngoma aef2884e8e Added git tag and release step to package
continuous-integration/drone/pr Build is failing
2026-05-10 08:38:10 +02:00
+20 -5
View File
@@ -31,20 +31,37 @@ steps:
registry: nexus.khongisa.co.za registry: nexus.khongisa.co.za
repo: nexus.khongisa.co.za/litecharms-scheduler repo: nexus.khongisa.co.za/litecharms-scheduler
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ] 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 } username: { from_secret: docker_username }
password: { from_secret: docker_password } password: { from_secret: docker_password }
- name: gitea-tag - name: gitea-tag-release
image: alpine/git image: alpine/git
environment: environment:
GITEA_TOKEN: { from_secret: git_token }
GITEA_USER: { from_secret: git_username } GITEA_USER: { from_secret: git_username }
GITEA_PASS: { from_secret: git_password } GITEA_PASS: { from_secret: git_password }
commands: commands:
- git config --global user.email "drone@litecharms.co.za" - echo "169.255.58.144 gitea.khongisa.co.za" >> /etc/hosts
- git config --global user.name "Drone CI" - apk add --no-cache curl
- git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git - git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git
- git tag 1.${DRONE_BUILD_NUMBER} - git tag 1.${DRONE_BUILD_NUMBER}
- git push origin 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: depends_on:
- build - build
@@ -66,7 +83,6 @@ steps:
- mkdir -p $HOME/.kube - mkdir -p $HOME/.kube
- echo "$KUBE_CONFIG" > $HOME/.kube/config - echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f litecharms-scheduler-uat.yml - kubectl apply -f litecharms-scheduler-uat.yml
- kubectl set image statefulset/litecharms-scheduler-uat scheduler=nexus.khongisa.co.za/litecharms-scheduler:1.${DRONE_BUILD_NUMBER} -n litecharms-scheduler-uat
depends_on: depends_on:
- package - package
@@ -89,7 +105,6 @@ steps:
- echo "$KUBE_CONFIG" > $HOME/.kube/config - echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f litecharms-scheduler.yml - kubectl apply -f litecharms-scheduler.yml
- kubectl rollout restart statefulset/litecharms-scheduler -n litecharms-scheduler - kubectl rollout restart statefulset/litecharms-scheduler -n litecharms-scheduler
- kubectl set image statefulset/litecharms-scheduler scheduler=nexus.khongisa.co.za/litecharms-scheduler:1.${DRONE_BUILD_NUMBER} -n litecharms-scheduler
depends_on: depends_on:
- uat - uat