Skip to content

Commit

Permalink
Added Github Action to deploy Helm Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreenwood committed Mar 29, 2024
1 parent f01d565 commit e200cf6
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/deploy_helm_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,18 @@ jobs:
id-token: 'write'

steps:
- name: Checkout code
- name: Checkout Fairspace repository
uses: actions/checkout@v4

- name: Checkout code
- name: Checkout FNS model and values files
uses: actions/checkout@v4
with:
repository: 'thehyve/fnscloud-demonstrator'
path: './fns'
token: ${{ secrets.FNS_PAT }}

- name: Prepare model and k8s values files
- name: Set environment
run: |
ls ./fns
if [ -n "${{ github.event.inputs.environment }}" ]; then
ENVIRONMENT="${{ github.event.inputs.environment }}"
else
Expand All @@ -54,13 +53,13 @@ jobs:
echo "ENVIRONMENT=$ENVIRONMENT" >> $GITHUB_ENV
echo "Starting deployment to the $ENVIRONMENT environment"
- name: Define the version
- name: Define Helm Chart version (taken from input or latest snapshot)
run: |
VERSION=$(cat ./VERSION)-SNAPSHOT
if [ -n "${{ github.event.inputs.version }}" ]; then
VERSION=${{ github.event.inputs.version }}
fi
echo "Helm charms version: $VERSION"
echo "Helm charts version to be deployed: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Auth GCP
Expand All @@ -74,9 +73,9 @@ jobs:
cluster_name: fns-cloud-f01
location: europe-west1

- name: Configure docker to authenticate
run: |
gcloud auth configure-docker
# - name: Configure docker to authenticate
# run: |
# gcloud auth configure-docker

- name: Setup Helm
uses: azure/setup-helm@v4.1.0
Expand All @@ -99,11 +98,6 @@ jobs:
- name: Deploy Helm chart
run: |
echo "--------"
pwd
echo "--------"
ls ./fns/
echo "--------"
helm upgrade --install fairspace oci://${{ env.HELM_REGISTRY }}/fairspace \
--version ${{ env.VERSION }} \
--namespace=fairspace-${{ env.ENVIRONMENT }} \
Expand Down

0 comments on commit e200cf6

Please sign in to comment.