Skip to content

Commit 72e4374

Browse files
committed
feat: add deploy-dev job to CI workflow
Triggers k8s-apps-config pipeline to update dev environment manifests after successful build on the metaspace branch.
1 parent 1920fb8 commit 72e4374

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/landcare-ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,48 @@ jobs:
2626
secrets:
2727
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
2828
REGISTRY_CA_CERT: ${{ secrets.REGISTRY_CA_CERT }}
29+
30+
deploy-dev:
31+
needs: build
32+
if: github.ref == 'refs/heads/metaspace'
33+
runs-on: ubuntu-latest
34+
environment: k8s-dev
35+
steps:
36+
- name: Checkout for action
37+
uses: actions/checkout@v4
38+
with:
39+
repository: manaakiwhenua/github-workflows
40+
sparse-checkout: actions/k8s-deploy
41+
path: .github-workflows
42+
43+
- name: Deploy to dev
44+
uses: ./.github-workflows/actions/k8s-deploy
45+
with:
46+
app_name: metaspace
47+
environment: dev
48+
cluster: tak-k8s-nonprod
49+
build_key: ${{ needs.build.outputs.build_id }}
50+
bitbucket_token: ${{ secrets.K8S_APPS_CONFIG_TRIGGER_TOKEN }}
51+
52+
- name: Deployment Summary
53+
run: |
54+
cat << SUMMARY >> $GITHUB_STEP_SUMMARY
55+
## ✅ Deployment Triggered
56+
57+
| Property | Value |
58+
|----------|-------|
59+
| Build ID | \`${{ needs.build.outputs.build_id }}\` |
60+
| Environment | dev |
61+
| Cluster | tak-k8s-nonprod |
62+
63+
The k8s-apps-config pipeline has updated the manifests and ArgoCD will sync shortly.
64+
65+
### Prod Promotion
66+
67+
To promote to production:
68+
1. Go to [k8s-apps-config](https://bitbucket.org/landcareresearch/k8s-apps-config)
69+
2. Update the prod deployment manifests with build ID: \`${{ needs.build.outputs.build_id }}\`
70+
3. Create a Pull Request for review
71+
4. After merge, ArgoCD will sync to production
72+
SUMMARY
73+

0 commit comments

Comments
 (0)