Skip to content

Commit

Permalink
Get files using sync (#9)
Browse files Browse the repository at this point in the history
Use aws sync rather than CDN to get the files to build the package.
  • Loading branch information
cjohns-scottlogic authored Jun 26, 2024
1 parent 9ca7323 commit 737e155
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ jobs:
- name: Install dependencies
run: make init

- name: Configure Production AWS Credentials
if: always()
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{secrets.PROD_AWS_ACCESS_KEY_ID}}
aws-secret-access-key: ${{secrets.PROD_AWS_ACCESS_SECRET}}
aws-region: eu-west-2

- name: Create the package
run: make package

Expand All @@ -68,12 +76,6 @@ jobs:
HOISTED_COLLECTION_DATASET_BUCKET_NAME: ${{secrets.DEVELOPMENT_DATA_S3_BUCKET}}
run: make save-dataset

- name: Save expectations to Development S3
if: always()
env:
COLLECTION_DATASET_BUCKET_NAME: ${{secrets.DEVELOPMENT_DATA_S3_BUCKET}}
run: make save-expectations

- name: Configure Staging AWS Credentials
if: always()
uses: aws-actions/configure-aws-credentials@v1-node16
Expand All @@ -88,12 +90,6 @@ jobs:
HOISTED_COLLECTION_DATASET_BUCKET_NAME: ${{secrets.STAGING_DATA_S3_BUCKET}}
run: make save-dataset

- name: Save expectations to Staging S3
if: always()
env:
COLLECTION_DATASET_BUCKET_NAME: ${{secrets.STAGING_DATA_S3_BUCKET}}
run: make save-expectations

- name: Configure Production AWS Credentials
if: always()
uses: aws-actions/configure-aws-credentials@v1-node16
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ include makerules/development.mk
include makerules/collection.mk
include makerules/pipeline.mk

all:: package

package:: dataset/organisation.csv dataset/organisation-check.csv

dataset/organisation.csv:
digital-land organisation-create --download-url="https://files.planning.data.gov.uk/organisation-collection/dataset" --output-path $@
aws s3 sync s3://$(ENVIRONMENT)-collection-data/organisation-collection/dataset $(DATASET_DIR) --no-progress
digital-land organisation-create --dataset-dir=$(DATASET_DIR) --output-path $@

# check organisation datapackage
dataset/organisation-check.csv: dataset/organisation.csv var/cache/local-planning-authority.csv
digital-land organisation-check --output-path $@

Expand Down

0 comments on commit 737e155

Please sign in to comment.