Skip to content

Commit

Permalink
Merge pull request #2566 from eurodatacube/staging
Browse files Browse the repository at this point in the history
Production deploy RACE + eodashboard 30.4.2024
  • Loading branch information
lubojr authored May 2, 2024
2 parents 1be9d45 + cca5e0e commit e3c5ae3
Show file tree
Hide file tree
Showing 60 changed files with 1,042 additions and 294 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/feature-branch_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '!staging'
- '!gtif-demo'
- '!gtif_staging'

- '!polar'
jobs:
delete_folder:
runs-on: ubuntu-latest
Expand All @@ -24,4 +24,4 @@ jobs:
# Delete the folder from the S3 bucket
- name: Delete folder from S3
run: |
aws s3 rm s3://${{ secrets.AWS_S3_BUCKET }}/feature-branches/${{ github.event.ref }} --recursive
aws s3 rm s3://${{ secrets.AWS_S3_BUCKET }}/feature-branches/${{ github.event.ref }} --recursive
4 changes: 2 additions & 2 deletions .github/workflows/feature-branch_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Feature branch deployment

on:
push:
branches-ignore: [ master, staging, gtif-demo, gtif_staging ]
branches-ignore: [ master, staging, gtif-demo, gtif_staging, polar ]

concurrency:
group: ci-tests-${{ github.ref }}-1
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
uses: datamonsters/replace-action@v2
with:
files: 'app/dist/shConfig.js'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$MAPBOX_ACCESS_TOKEN=${{ secrets.MAPBOX_ACCESS_TOKEN }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$SH_INSTANCE_ID_POLAR=${{ secrets.SH_INSTANCE_ID_POLAR }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'

# Upload build client to S3
- name: sync client s3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gtif-demo_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: datamonsters/replace-action@v2
with:
files: 'app/dist/shConfig.js'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$MAPBOX_ACCESS_TOKEN=${{ secrets.MAPBOX_ACCESS_TOKEN }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$SH_INSTANCE_ID_POLAR=${{ secrets.SH_INSTANCE_ID_POLAR }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'

# Upload build client to S3
- name: sync client s3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gtif-staging_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: datamonsters/replace-action@v2
with:
files: 'app/dist/shConfig.js'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$MAPBOX_ACCESS_TOKEN=${{ secrets.MAPBOX_ACCESS_TOKEN }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$SH_INSTANCE_ID_POLAR=${{ secrets.SH_INSTANCE_ID_POLAR }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'

# Upload build client to S3
- name: sync client s3
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/polar_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Polar deployment

on:
push:
branches: [ polar ]

concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-22.04

steps:
# Checkout code
- uses: actions/checkout@v3

# Install node
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
cache-dependency-path: app/package-lock.json

# Build
- name: Build
run: |
cd app/
npm ci --ignore-scripts
npm run build
# Inject SH Config file
- name: replace instance ID
uses: datamonsters/replace-action@v2
with:
files: 'app/dist/shConfig.js'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$SH_INSTANCE_ID_POLAR=${{ secrets.SH_INSTANCE_ID_POLAR }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }}'

# Upload build client to S3
- name: sync client s3
uses: jakejarvis/[email protected]
with:
args: --delete --follow-symlinks --exclude 'data/*' --exclude 'eodash-data/*'
env:
SOURCE_DIR: 'app/dist'
DEST_DIR: 'polar'
AWS_REGION: 'eu-central-1'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# Upload data to S3
- name: sync data s3
uses: jakejarvis/[email protected]
with:
args: --delete --follow-symlinks
env:
SOURCE_DIR: 'app/dist/data'
DEST_DIR: 'polar/data'
AWS_REGION: 'eu-central-1'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# Upload eodashdata to S3
- name: sync eodashdata s3
uses: jakejarvis/[email protected]
with:
args: --delete --follow-symlinks
env:
SOURCE_DIR: 'app/dist/eodash-data'
DEST_DIR: 'polar/eodash-data'
AWS_REGION: 'eu-central-1'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# Invalidate Cloudfront
- name: invalidate
uses: chetan/[email protected]
env:
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID_POLAR }}
PATHS: '/*'
AWS_REGION: 'eu-central-1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

# Send notification
- name: action-slack
uses: 8398a7/[email protected]
with:
status: ${{ job.status }}
author_name: eodash_deploy
fields: repo,message,commit,author,action,eventName,ref,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always()
2 changes: 1 addition & 1 deletion .github/workflows/production_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: datamonsters/replace-action@v2
with:
files: 'app/dist/shConfig.js'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$MAPBOX_ACCESS_TOKEN=${{ secrets.MAPBOX_ACCESS_TOKEN }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$SH_INSTANCE_ID_POLAR=${{ secrets.SH_INSTANCE_ID_POLAR }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'

# Upload to S3
- name: sync s3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: datamonsters/replace-action@v2
with:
files: 'app/dist/shConfig.js'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$MAPBOX_ACCESS_TOKEN=${{ secrets.MAPBOX_ACCESS_TOKEN }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'
replacements: '$SH_INSTANCE_ID=${{ secrets.SH_INSTANCE_ID }},$SH_INSTANCE_ID_POLAR=${{ secrets.SH_INSTANCE_ID_POLAR }},$GEODB_INSTANCE_ID=${{ secrets.GEODB_INSTANCE_ID }},$LISTMONK_API_KEY=${{ secrets.LISTMONK_API_KEY }},$STAT_API_CLIENT_SECRET=${{ secrets.STAT_API_CLIENT_SECRET }},$STAT_API_CLIENT_ID=${{ secrets.STAT_API_CLIENT_ID }},$SH_INSTANCE_ID_GTIF=${{ secrets.SH_INSTANCE_ID_GTIF }}'

# Upload build client to S3
- name: sync client s3
Expand Down
50 changes: 11 additions & 39 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"luxon": "^1.28.1",
"marked": "^4.0.10",
"medium-zoom": "^1.0.6",
"ol": "^8.1.0",
"ol": "^9.1.0",
"ol-mapbox-style": "^11.0.0",
"proj4": "^2.8.0",
"regl": "^2.1.0",
Expand Down
Loading

0 comments on commit e3c5ae3

Please sign in to comment.