From e469c91357f7c5482e115a8e034fb1481b168d08 Mon Sep 17 00:00:00 2001 From: Frank Greguska Date: Tue, 2 Jul 2024 18:19:41 -0700 Subject: [PATCH 1/3] bump action versions --- .github/workflows/build.yml | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d842d02..46deeca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: github_sha: ${{ steps.update-sha.outputs.github_sha }} software_version: ${{ steps.update-sha.outputs.software_version }} steps: - - uses: getsentry/action-github-app-token@v2 + - uses: getsentry/action-github-app-token@v3 name: my-app-install token id: podaac-cicd with: @@ -125,7 +125,7 @@ jobs: VENUE=$(echo "${{ env.TARGET_ENV }}" | tr '[:upper:]' '[:lower:]') echo "deploy_env_lower=$VENUE" >> $GITHUB_OUTPUT ## Build - - uses: hashicorp/setup-terraform@v2 + - uses: hashicorp/setup-terraform@v3 with: terraform_version: ${{ env.TERRAFORM_VERSION }} terraform_wrapper: false @@ -155,7 +155,7 @@ jobs: --org=${{ secrets.SNYK_ORG_ID }} --project-name=${{ github.repository }} - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: NPM install & NPM Lint @@ -166,16 +166,10 @@ jobs: npm install npm run build - name: Upload package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: build path: build/* - - name: Generate GitHub App Token - id: generate_token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.GH_APP_ID }} - private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Commit Version Bump # If building an alpha, release candidate, or release then we commit the version bump back to the repo if: | @@ -183,13 +177,10 @@ jobs: steps.rc.conclusion == 'success' || steps.release.conclusion == 'success' run: | - git config user.name "PODAAC-CICD" + git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - echo "machine github.com login x-access-token password ${{ steps.generate_token.outputs.token }}" > ~/.netrc git commit -am "/version ${{ env.software_version }}" git push - env: - GH_APP_TOKEN: ${{ steps.generate_token.outputs.token }} - name: Push Tag if: | steps.alpha.conclusion == 'success' || @@ -198,9 +189,8 @@ jobs: run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - git tag -a "${{ env.software_version }}" -m "Version ${{ env.software_version }}" --force - git push origin "${{ env.software_version }}" --force + git tag -a "${{ env.software_version }}" -m "Version ${{ env.software_version }}" + git push origin "${{ env.software_version }}" - name: Create GH release if: | steps.alpha.conclusion == 'success' || @@ -240,7 +230,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ needs.build.outputs.github_sha }} - - uses: hashicorp/setup-terraform@v2 + - uses: hashicorp/setup-terraform@v3 with: terraform_version: ${{ env.TERRAFORM_VERSION }} terraform_wrapper: false @@ -263,7 +253,7 @@ jobs: export TF_VAR_cloudfront_allow_vpcs=${{ secrets.EDC_INTERNET_SERVICES_VPCS }} ./bin/deploy.sh --app-version ${{ needs.build.outputs.software_version }} --tf-venue $VENUE echo "SWODLR_UI_BUCKET=$(terraform output -raw swodlr-bucket-name)" >> $GITHUB_ENV - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 id: download with: name: build @@ -295,7 +285,7 @@ jobs: VERSION=${{ needs.build.outputs.software_version }} echo "SUBMODULE_VERSION=$VERSION">>$GITHUB_ENV - name: Send notifications to slack - uses: slackapi/slack-github-action@v1.25.0 + uses: slackapi/slack-github-action@v1.26.0 env: SLACK_WEBHOOK_URL: ${{ secrets.NOTIFICATION_WEBHOOK_SWODLR }} with: @@ -305,7 +295,7 @@ jobs: } - name: Send failure notifications to slack if: failure() - uses: slackapi/slack-github-action@v1.25.0 + uses: slackapi/slack-github-action@v1.26.0 env: SLACK_WEBHOOK_URL: ${{ secrets.NOTIFICATION_WEBHOOK_SWODLR }} with: From 65fd18dfa48c67cc07a9f0fe8aef7222e432ac6e Mon Sep 17 00:00:00 2001 From: frankinspace Date: Wed, 3 Jul 2024 01:21:41 +0000 Subject: [PATCH 2/3] /version v1.2.0-rc.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0a8e8ec..c29c2ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "swodlr-ui", - "version": "1.2.0-4", + "version": "1.2.0-rc.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "swodlr-ui", - "version": "1.2.0-4", + "version": "1.2.0-rc.1", "dependencies": { "@hexagon/base64": "^1.1.28", "@reduxjs/toolkit": "^1.9.5", diff --git a/package.json b/package.json index 459c654..d6d08a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swodlr-ui", - "version": "1.2.0-4", + "version": "1.2.0-rc.1", "private": true, "engines": { "node": ">=18.0.0" From 89076bfd1a8795c5445f432f774dd324725f2bc2 Mon Sep 17 00:00:00 2001 From: jbyrne Date: Wed, 3 Jul 2024 09:38:08 -0700 Subject: [PATCH 3/3] issue/swodlr-ui-124: switch from create react app to Vite --- .env.sample | 8 +- public/index.html => index.html | 11 +- package-lock.json | 19102 +++++-------------------- package.json | 17 +- src/authentication/edl.ts | 6 +- src/authentication/session.ts | 4 +- src/components/about/About.tsx | 2 +- src/components/navbar/MainNavbar.tsx | 2 +- src/user/userData.ts | 2 +- terraform/environments/ops.env | 8 +- terraform/environments/sit.env | 8 +- terraform/environments/uat.env | 8 +- tsconfig.json | 3 +- vite.config.js | 15 + vite/client.d.ts | 1 + 15 files changed, 3462 insertions(+), 15735 deletions(-) rename public/index.html => index.html (83%) create mode 100644 vite.config.js create mode 100644 vite/client.d.ts diff --git a/.env.sample b/.env.sample index 625d8b8..c7e6e40 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -REACT_APP_SWODLR_API_BASE_URI = https://www.example.com -REACT_APP_BASE_REDIRECT_URI = http://localhost:3000/ -REACT_APP_EDL_CLIENT_ID = example_client_id -REACT_APP_EDL_BASE_URI = http://thisisa.test/ +VITE_SWODLR_API_BASE_URI = https://www.example.com +VITE_BASE_REDIRECT_URI = http://localhost:3000/ +VITE_EDL_CLIENT_ID = example_client_id +VITE_EDL_BASE_URI = http://thisisa.test/ diff --git a/public/index.html b/index.html similarity index 83% rename from public/index.html rename to index.html index 5acbdea..2fc4154 100644 --- a/public/index.html +++ b/index.html @@ -2,28 +2,28 @@ - + - + - + @@ -32,6 +32,7 @@
+