Merge pull request #2851 from wellcomecollection/e2e-pipeline-with-sc… #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Catalogue graph: Run CI pipeline" | |
on: | |
push: | |
branches: | |
- main | |
paths: 'catalogue_graph/**' | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- name: CI setup | |
run: | | |
./catalogue_graph/scripts/ci-setup.sh | |
- name: Test | |
run: | | |
./catalogue_graph/scripts/test.sh | |
build: | |
runs-on: ubuntu-latest | |
needs: test | |
if: ${{ needs.test.result == 'success' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-west-1 | |
role-to-assume: ${{ secrets.CATALOGUE_GRAPH_CI_ROLE_ARN }} | |
- name: Log in to private ECR | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Build and push artefacts | |
run: | | |
./catalogue_graph/scripts/build.sh --push | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ needs.build.result == 'success' }} | |
strategy: | |
matrix: | |
lambda_name: [ | |
catalogue-graph-bulk-loader, | |
catalogue-graph-bulk-load-poller, | |
catalogue-graph-indexer, | |
catalogue-graph-ingestor-trigger, | |
catalogue-graph-ingestor-indexer, | |
catalogue-graph-ingestor-loader, | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: eu-west-1 | |
role-to-assume: ${{ secrets.CATALOGUE_GRAPH_CI_ROLE_ARN }} | |
- name: Deploy ${{ matrix.lambda_name }} lambda | |
run: | | |
./catalogue_graph/scripts/deploy_lambda_zip.sh ${{ matrix.lambda_name }} | |