Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production deploy #3114

Merged
merged 13 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/pizza-teardown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Remove vultr resources
uses: theopensystemslab/vultr-action@v1.15
uses: theopensystemslab/vultr-action@v2.0
with:
action: destroy
api_key: ${{ secrets.VULTR_API_KEY }}
domain: ${{ env.DOMAIN }}
pullrequest_id: ${{ env.PULLREQUEST_ID }}
os_type: alpine
plan: vc2-1c-1gb
pull_request_id: ${{ env.PULLREQUEST_ID }}
region: lhr
tag: pullrequest

- uses: marocchino/sticky-pull-request-comment@v2
with:
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,14 @@ jobs:
steps:
- name: Create Pizza (if it doesn't exist)
id: create
uses: theopensystemslab/vultr-action@v1.15
uses: theopensystemslab/vultr-action@v2.0
with:
action: create
api_key: ${{ secrets.VULTR_API_KEY }}
domain: ${{ env.DOMAIN }}
os_id: 1743
os_type: alpine
plan: vc2-1c-1gb
pullrequest_id: ${{ env.PULLREQUEST_ID }}
pull_request_id: ${{ env.PULLREQUEST_ID }}
region: lhr
tag: pullrequest

Expand All @@ -324,13 +324,19 @@ jobs:
password: ${{ steps.create.outputs.default_password }}
command_timeout: 20m
script: |
apt-get update -y

apk update
apk add docker
addgroup root docker
rc-update add docker default
service docker start
apk add docker-cli-compose

apk add git
git clone "${{ secrets.AUTHENTICATED_REPO_URL }}"
cd planx-new
git fetch origin "pull/${{ env.PULLREQUEST_ID }}/head" && git checkout FETCH_HEAD

apt-get install awscli -y
apk add aws-cli
export AWS_ACCESS_KEY_ID=${{ secrets.PIZZA_AWS_ACCESS_KEY_ID }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.PIZZA_AWS_SECRET_ACCESS_KEY }}
export AWS_REGION=eu-west-2
Expand All @@ -352,15 +358,21 @@ jobs:
username: root
password: ${{ secrets.SSH_PASSWORD }}
command_timeout: 10m
# TODO: some of below script might be superfluous for server update (rather than create)
script: |
apt-get update -y
apk update
apk add docker
addgroup root docker
rc-update add docker default
service docker start
apk add docker-cli-compose

git clone "${{ secrets.AUTHENTICATED_REPO_URL }}"
cd planx-new
git add . && git stash
git fetch origin "pull/${{ env.PULLREQUEST_ID }}/head" && git checkout FETCH_HEAD

apt-get install awscli -y
apk add aws-cli
export AWS_ACCESS_KEY_ID=${{ secrets.PIZZA_AWS_ACCESS_KEY_ID }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.PIZZA_AWS_SECRET_ACCESS_KEY }}
export AWS_REGION=eu-west-2
Expand Down
1 change: 1 addition & 0 deletions api.planx.uk/modules/gis/service/digitalLand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const localAuthorityMetadata: Record<string, LocalAuthorityMetadata> = {
medway: require("./local_authorities/metadata/medway"),
newcastle: require("./local_authorities/metadata/newcastle"),
southwark: require("./local_authorities/metadata/southwark"),
"st-albans": require("./local_authorities/metadata/stAlbans"),
tewkesbury: require("./local_authorities/metadata/tewkesbury"),
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
LAD20CD: E07000240
LAD20NM: St Albans
LAD20NMW:
FID:

https://www.planning.data.gov.uk/entity/?dataset=article-4-direction-area&geometry_curie=statistical-geography%3AE07000240&entry_date_day=&entry_date_month=&entry_date_year=
https://docs.google.com/spreadsheets/d/17qaNhd7M-F90KZ34kVjyetTxfxECf1QUU8UI-aUiknU/edit#gid=0
*/

import { LocalAuthorityMetadata } from "../../digitalLand";

const planningConstraints: LocalAuthorityMetadata["planningConstraints"] = {
article4: {
// Planx granular values link to entity.reference on Planning Data
records: {
"article4.stAlbans.beesonend": "Ar4.8",
"article4.stAlbans.beesonendChildwickbury": "Ar4.8",
"article4.stAlbans.bylandsMeadow": "Ar4.15",
"article4.stAlbans.childwickburyStudBlue": "Ar4.7d",
"article4.stAlbans.childwickburyStudGreen": "Ar4.7c",
"article4.stAlbans.childwickburyStudOrange": "Ar4.7b",
"article4.stAlbans.childwickburyStudRed": "Ar4.7a",
"article4.stAlbans.childwickburyStudYellow": "Ar4.7e",
"article4.stAlbans.childwickGreen": "Ar4.1",
"article4.stAlbans.colneyHeath": "Ar4.9",
"article4.stAlbans.cunningham": "Ar4.20",
"article4.stAlbans.formerRadlettAirfield": "Ar4.5",
"article4.stAlbans.harpenden1": "Ar4.18",
"article4.stAlbans.harpenden2": "Ar4.17",
"article4.stAlbans.kimptonBottom.1": "Ar4.12",
"article4.stAlbans.kimptonBottom.2": "Ar4.13",
"article4.stAlbans.landBetweenRaggedHallAndM10": "Ar4.11",
"article4.stAlbans.lowerLutonNorth": "Ar4.30",
"article4.stAlbans.lowerLutonSouth": "Ar4.19",
"article4.stAlbans.manorRoad": "Ar4.14",
"article4.stAlbans.raggedHall": "Ar4.10",
"article4.stAlbans.sandridgebury": "Ar4.16",
"article4.stAlbans.sopwellAndAlbert": "Ar4.6",
"article4.stAlbans.theHawthornes": "Ar4.2",
"article4.stAlbans.verulamAndFishpool": "Ar4.3",
"article4.stAlbans.whitecroftEstate": "Ar4.4",
},
},
};

export { planningConstraints };
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@airbrake/node": "^2.1.8",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#722e1c7",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d8acbea",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
Loading