Skip to content

Commit

Permalink
Add Drone deployment and remove GH Pages 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. As deployment concerns have now moved
to Drone, this change removes the GitHub pages deployment.
  • Loading branch information
LiamMacP committed Oct 9, 2023
1 parent edae85b commit 99ae53b
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 47 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}
47 changes: 0 additions & 47 deletions .github/workflows/build-and-deploy-main.yml

This file was deleted.

0 comments on commit 99ae53b

Please sign in to comment.