Skip to content

fix: aws inferentia operator sync (#1014) #49

fix: aws inferentia operator sync (#1014)

fix: aws inferentia operator sync (#1014) #49

name: Publish inframold to S3
on:
push:
branches:
- main
paths:
- '.github/workflows/publish-app-catalogue.yaml'
- 'charts/tfy-k8s-aws-eks-inframold/**'
- 'charts/tfy-k8s-azure-aks-inframold/**'
- 'charts/tfy-k8s-civo-talos-inframold/**'
- 'charts/tfy-k8s-gcp-gke-standard-inframold/**'
- 'charts/tfy-k8s-generic-inframold/**'
env:
AWS_S3_BUCKET: 'tfy-argo-application-catalogue'
RELEASES_SERVER_URL: ${{ secrets.RELEASES_SERVER_URL }}
RELEASES_SERVER_API_KEY: ${{ secrets.RELEASES_SERVER_API_KEY }}
jobs:
publish_release_and_sync_to_s3:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/release-updater/requirements.txt
- name: Run release-updater script
run: |
python scripts/release-updater/release-updater.py --url ${{ env.RELEASES_SERVER_URL }} --api-key ${{ env.RELEASES_SERVER_API_KEY }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.APP_CATALOGUE_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.APP_CATALOGUE_S3_SECRET_KEY }}
aws-region: 'eu-west-1' # optional: defaults to us-east-1
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.9.2
- name: Set up Python 3.10 (needed for cookiecutter cli)
uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: |
echo "Installing cookiecutter"
python -m pip install --upgrade pip
pip install cookiecutter==2.1.1
cookiecutter --version
# Render and sync manifests to S3
- run: |
# AWS-EKS
bash ./scripts/publish-app-catalogue/sync-manifests-to-s3.sh tfy-k8s-aws-eks-inframold aws-eks ${{ env.AWS_S3_BUCKET }}
- run: |
# GCP Standard
bash ./scripts/publish-app-catalogue/sync-manifests-to-s3.sh tfy-k8s-gcp-gke-standard-inframold gcp-gke-standard ${{ env.AWS_S3_BUCKET }}
- run: |
# Azure-AKS
bash ./scripts/publish-app-catalogue/sync-manifests-to-s3.sh tfy-k8s-azure-aks-inframold azure-aks ${{ env.AWS_S3_BUCKET }}
- run: |
# Generic
bash ./scripts/publish-app-catalogue/sync-manifests-to-s3.sh tfy-k8s-generic-inframold generic ${{ env.AWS_S3_BUCKET }}
- run: |
# Civo-Talos
bash ./scripts/publish-app-catalogue/sync-manifests-to-s3.sh tfy-k8s-civo-talos-inframold civo-talos ${{ env.AWS_S3_BUCKET }}
- run: |
# Invalidate cloudfront
aws configure set preview.cloudfront true && aws cloudfront create-invalidation --distribution-id EYFSW3BXDVFP0 --paths '/*'
- run: echo "🍏 This job's status is ${{ job.status }}."