Skip to content

Commit

Permalink
Add Drone deployment
Browse files Browse the repository at this point in the history
This change adds Drone configuration to trigger a new deployment to the
appropriate Kubernetes namespace.
  • Loading branch information
LiamMacP committed Oct 18, 2023
1 parent 07a6755 commit b73c0a4
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---

kind: pipeline
type: kubernetes
name: helm lint

platform:
os: linux
arch: amd64

trigger:
event:
- pull_request
branch:
- main

steps:
- name: lint-helm-chart
image: pelotech/drone-helm3
settings:
mode: lint
chart: helm
values_files: helm/values.yaml
values:
- app.image.version=$${DRONE_COMMIT_SHA}

---
kind: pipeline
type: kubernetes
name: deployment

platform:
os: linux
arch: amd64

trigger:
event:
- push
branch:
- main

steps:
- name: Wait for image tag
image: alpine/curl:8.2.1
commands:
- |
while ! curl -s -L 'https://quay.io/api/v1/repository/ukhomeofficedigital/engineering-guidance-and-standards/tag?specificTag=${DRONE_COMMIT_SHA}' | grep -q '${DRONE_COMMIT_SHA}' ; do
echo "Tag not present, waiting 10 seconds"
sleep 10
done
- name: Deployment
image: pelotech/drone-helm3
settings:
chart: helm
mode: upgrade
namespace: sas-prod
release: engineering-guidance-and-standards
kube_certificate:
from_secret: kube_cert_acp_prod
kube_api_server: https://kube-api-prod.prod.acp.homeoffice.gov.uk
kube_token:
from_secret: kube_token_acp_prod
values_files: helm/values.yaml
wait_for_upgrade: true
timeout: 10m
history_max: 3
values:
- app.image.version=$${DRONE_COMMIT_SHA}

0 comments on commit b73c0a4

Please sign in to comment.