From 6f950f2f33913d5197d13a993f2f9499eeab3d2e Mon Sep 17 00:00:00 2001 From: Calum Barnett Date: Sat, 29 Apr 2023 00:16:12 +0100 Subject: [PATCH 1/3] Add preview workflow --- .github/workflows/pulumi_preview.yaml | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/pulumi_preview.yaml diff --git a/.github/workflows/pulumi_preview.yaml b/.github/workflows/pulumi_preview.yaml new file mode 100644 index 0000000..d5fc007 --- /dev/null +++ b/.github/workflows/pulumi_preview.yaml @@ -0,0 +1,40 @@ +name: Pulumi Preview +on: + pull_request: + branches: + - main +permissions: + id-token: write + contents: read +jobs: + preview: + name: Pulumi Preview + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: arn:aws:iam::593291632749:role/data-engineering-ga-exports + role-session-name: githubaction + role-skip-session-tagging: true + role-duration-seconds: 3600 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Pulumi Preview + uses: pulumi/actions@v4 + env: + PULUMI_CONFIG_PASSPHRASE: "" + with: + command: preview + stack-name: "data-engineering-exports" From 262d5074033c58ebf28fd1a62f9de3ab6e1251c2 Mon Sep 17 00:00:00 2001 From: Calum Barnett Date: Sat, 29 Apr 2023 00:20:06 +0100 Subject: [PATCH 2/3] Add up workflow --- .github/workflows/pulumi_up.yaml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/pulumi_up.yaml diff --git a/.github/workflows/pulumi_up.yaml b/.github/workflows/pulumi_up.yaml new file mode 100644 index 0000000..e44d716 --- /dev/null +++ b/.github/workflows/pulumi_up.yaml @@ -0,0 +1,40 @@ +name: Pulumi Up +on: + push: + branches: + - main +permissions: + id-token: write + contents: read +jobs: + up: + name: Pulumi Up + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 1 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: arn:aws:iam::593291632749:role/data-engineering-ga-exports + role-session-name: githubaction + role-skip-session-tagging: true + role-duration-seconds: 3600 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Pulumi Up + uses: pulumi/actions@v4 + env: + PULUMI_CONFIG_PASSPHRASE: "" + with: + command: up + stack-name: "data-engineering-exports" From 7bbade186d097ed65d6a1ed5e114a1170e3f52b2 Mon Sep 17 00:00:00 2001 From: Calum Barnett Date: Tue, 2 May 2023 16:03:15 +0100 Subject: [PATCH 3/3] Set cloud URL explicitly --- .github/workflows/pulumi_preview.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pulumi_preview.yaml b/.github/workflows/pulumi_preview.yaml index d5fc007..3924fb0 100644 --- a/.github/workflows/pulumi_preview.yaml +++ b/.github/workflows/pulumi_preview.yaml @@ -38,3 +38,4 @@ jobs: with: command: preview stack-name: "data-engineering-exports" + cloud-url: s3://data-engineering-pulumi.analytics.justice.gov.uk