Skip to content

Commit

Permalink
CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Jan 21, 2025
1 parent 49ca923 commit d35996d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
Expand All @@ -19,7 +19,7 @@ jobs:
needs: qa
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy

env:
AZURE_CONTAINER_REGISTRY: MY_REGISTRY_NAME # set this to the name of your container registry
PROJECT_NAME: MY_PROJECT_NAME # set this to your project's name
RESOURCE_GROUP: invenio-dev # the resource group containing your AKS cluster
CLUSTER_NAME: InvenioRDM-Dev # the name of your AKS cluster
CHART_PATH: "~/helm-invenio/charts/invenio/Chart.yml" # set this to the path to your helm file
CHART_OVERRIDE_PATH: "~/helm-invenio/charts/invenio/values-overrides-imperial.yaml" # array of override file paths

on:
workflow_run:
workflows: [Build and Publish] # Only run this once Build and Publish has succeeded (image is available)
types: [completed]
branches: [develop, feature/actions_deploy] # Only deploy develop branch to our CI dev instance

permissions:
id-token: write # for Azure OIDC, see https://github.com/Azure/login
contents: read

jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: checkout the Helm charts to deploy our published instance
uses: actions/checkout@v4
with:
repository: ImperialCollegeLondon/helm-invenio # Currently public, need to add a token if set to private
token: ${{ secrets.TOKEN_TO_PULL_HELM_REPO }}
fetch-depth: 0

- name: Login to Azure to deploy our chart
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Gets K8s context
uses: azure/aks-set-context@v4
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
resource-group: ${{ env.RESOURCE_GROUP }}
cluster-name: ${{ env.CLUSTER_NAME }}
id: login

- name: Configure deployment
uses: azure/k8s-bake@61041e8c2f75c1f01186c8f05fb8b24e1fc507d8
with:
renderEngine: 'helm'
helmChart: ${{ env.CHART_PATH }}
overrideFiles: ${{ env.CHART_OVERRIDE_PATH }}
helm-version: 'latest'
id: bake

0 comments on commit d35996d

Please sign in to comment.