From c3c114601db272cd112711c520bdb0a437253e21 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 13:22:19 -0700 Subject: [PATCH 01/16] /deploy sit --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34c0f791..5e1f9f07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,8 +160,9 @@ jobs: git push origin "${{ env.THE_VERSION }}" --force - name: Publish UMM-T with new version - uses: podaac/cmr-umm-updater@0.4.0 + uses: podaac/cmr-umm-updater@feature/optional_association if: | + github.event.head_commit.message == '/deploy sit' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') with: @@ -172,6 +173,7 @@ jobs: timeout: 60 disable_removal: 'true' umm_type: 'umm-t' + use_associations: 'false' env: LAUNCHPAD_TOKEN_SIT: ${{secrets.LAUNCHPAD_TOKEN_SIT}} LAUNCHPAD_TOKEN_UAT: ${{secrets.LAUNCHPAD_TOKEN_UAT}} From 1b83519b8c75b3ae481debf1a1e29eeffab2216b Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 13:29:45 -0700 Subject: [PATCH 02/16] /deploy uat From 2fbc8ea0c077bf577c2b4c9a22aaa7b54459533c Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 13:33:19 -0700 Subject: [PATCH 03/16] /deploy uat --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e1f9f07..1290e2cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -163,6 +163,7 @@ jobs: uses: podaac/cmr-umm-updater@feature/optional_association if: | github.event.head_commit.message == '/deploy sit' || + github.event.head_commit.message == '/deploy uat' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') with: From 4278e7aee793cd3a6be56f16223fb1f604600162 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 13:37:57 -0700 Subject: [PATCH 04/16] /deploy uat --- .github/workflows/build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1290e2cf..1ba4d3eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -159,6 +159,19 @@ jobs: git tag -f -a "${{ env.THE_VERSION }}" -m "Version ${{ env.THE_VERSION }}" git push origin "${{ env.THE_VERSION }}" --force + ## Deployment + - name: Deploy Env Override + if: | + github.event.head_commit.message == '/deploy sit' || + github.event.head_commit.message == '/deploy uat' + run: | + message="${{ github.event.head_commit.message }}" + trimmed_message=${message:1} # Remove leading slash + override_env=$(echo "$trimmed_message" | grep -oE '[^[:space:]]+$') + override_env_upper=$(echo "$trimmed_message" | awk '{print toupper($NF)}') + echo "THE_ENV=${override_env}" >> $GITHUB_ENV + echo "TARGET_ENV_UPPERCASE=${override_env_upper}" >> $GITHUB_ENV + - name: Publish UMM-T with new version uses: podaac/cmr-umm-updater@feature/optional_association if: | @@ -195,19 +208,6 @@ jobs: run: | cat ./configs/hitideConfig-${{ env.THE_ENV }}.js > ./dist/hitideConfig.js - ## Deployment - - name: Deploy Env Override - if: | - github.event.head_commit.message == '/deploy sit' || - github.event.head_commit.message == '/deploy uat' - run: | - message="${{ github.event.head_commit.message }}" - trimmed_message=${message:1} # Remove leading slash - override_env=$(echo "$trimmed_message" | grep -oE '[^[:space:]]+$') - override_env_upper=$(echo "$trimmed_message" | awk '{print toupper($NF)}') - echo "THE_ENV=${override_env}" >> $GITHUB_ENV - echo "TARGET_ENV_UPPERCASE=${override_env_upper}" >> $GITHUB_ENV - - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: From 4ef6b45c188aa4e897b5817a6c709ca368cd4687 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 15:49:54 -0700 Subject: [PATCH 05/16] /deploy uat From 564edbb256d278b8d4df05c6a47af540a1f9bbc3 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 16:04:54 -0700 Subject: [PATCH 06/16] /deploy uat From 63903406030ae739610902a0b98ba7f28cdb8d66 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 16:12:32 -0700 Subject: [PATCH 07/16] /deploy uat From ad850de4c2bd28cc117fa8bc70fddd2af51e5644 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 16:15:08 -0700 Subject: [PATCH 08/16] /deploy uat From 5edd9cfe050b9445f26a84570b1e33bcd574452c Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 16:17:58 -0700 Subject: [PATCH 09/16] /deploy uat From 687afe54f88942a3223203d49744dde03430b375 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 16:26:07 -0700 Subject: [PATCH 10/16] /deploy uat From fee8a9c6969187d31df3cd2f37c0785cbf92c73b Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 5 Jul 2023 16:28:34 -0700 Subject: [PATCH 11/16] /deploy uat --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ba4d3eb..19892064 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,10 @@ jobs: filename: 'package.json' prefix: project + - name: Get short commit SHA + id: short_sha + run: echo "::set-output name=sha_short::${{ github.sha }}" | cut -c 1-7 + ## Set environment variables - name: Configure Initial YAML file and environment variables run: | @@ -62,7 +66,7 @@ jobs: run: | echo "THE_ENV=sit" >> $GITHUB_ENV echo "TARGET_ENV_UPPERCASE=SIT" >> $GITHUB_ENV - echo "THE_VERSION=$(npm --no-git-tag-version --allow-same-version version ${{ env.THE_VERSION }}-${GITHUB_SHA})" >> $GITHUB_ENV + echo "THE_VERSION=$(npm --no-git-tag-version --allow-same-version version ${{ env.THE_VERSION }}-${{ steps.short_sha.outputs.sha_short }})" >> $GITHUB_ENV ## Set Alpha variables - name: Alpha From abfa17c4e9183a5aca1fec03728537eab7acc148 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 12 Jul 2023 15:51:52 -0700 Subject: [PATCH 12/16] add code to handle multi groups --- src/jpl/dijit/LegendsAndOpacity.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/jpl/dijit/LegendsAndOpacity.js b/src/jpl/dijit/LegendsAndOpacity.js index e38845b9..21700396 100644 --- a/src/jpl/dijit/LegendsAndOpacity.js +++ b/src/jpl/dijit/LegendsAndOpacity.js @@ -159,8 +159,27 @@ define([ this.open = false; }, handleVariablesFetched: function(message) { - if (this.datasets[message.datasetId]) { - this.datasets[message.datasetId].updateVariables(message.imgVariables); + + // code to modify imgVariables when there are mutli groups + if('multi_lon_lat' in message){ + var new_variables = []; + for(var i = 0; i < message.multi_groups.length; i++){ + var group_name = message.multi_groups[i]; + for(var j = 0; j < message.imgVariables.length; j++){ + var image_variable = { ...message.imgVariables[j] }; + image_variable['id'] = group_name + '/' + image_variable['id']; + new_variables.push(image_variable); + } + } + if (this.datasets[message.datasetId]) { + this.datasets[message.datasetId].updateVariables(new_variables); + } + } + + else{ + if (this.datasets[message.datasetId]) { + this.datasets[message.datasetId].updateVariables(message.imgVariables); + } } }, handleAddGranuleFootprint: function(message) { From 6fac052ea8d5aa911d2dea7c7892665e385c09c9 Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Wed, 12 Jul 2023 15:53:29 -0700 Subject: [PATCH 13/16] update umm updater --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19892064..87be9147 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,7 +177,7 @@ jobs: echo "TARGET_ENV_UPPERCASE=${override_env_upper}" >> $GITHUB_ENV - name: Publish UMM-T with new version - uses: podaac/cmr-umm-updater@feature/optional_association + uses: podaac/cmr-umm-updater@0.5.0 if: | github.event.head_commit.message == '/deploy sit' || github.event.head_commit.message == '/deploy uat' || From 3ee5cf961b4668d576f28e6e5331995c26506c8e Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Mon, 17 Jul 2023 15:18:48 -0700 Subject: [PATCH 14/16] update workflow --- .github/workflows/build.yml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87be9147..4adf698f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,10 +45,6 @@ jobs: filename: 'package.json' prefix: project - - name: Get short commit SHA - id: short_sha - run: echo "::set-output name=sha_short::${{ github.sha }}" | cut -c 1-7 - ## Set environment variables - name: Configure Initial YAML file and environment variables run: | @@ -66,7 +62,7 @@ jobs: run: | echo "THE_ENV=sit" >> $GITHUB_ENV echo "TARGET_ENV_UPPERCASE=SIT" >> $GITHUB_ENV - echo "THE_VERSION=$(npm --no-git-tag-version --allow-same-version version ${{ env.THE_VERSION }}-${{ steps.short_sha.outputs.sha_short }})" >> $GITHUB_ENV + echo "THE_VERSION=$(npm --no-git-tag-version --allow-same-version version ${{ env.THE_VERSION }}-${GITHUB_SHA})" >> $GITHUB_ENV ## Set Alpha variables - name: Alpha @@ -163,24 +159,9 @@ jobs: git tag -f -a "${{ env.THE_VERSION }}" -m "Version ${{ env.THE_VERSION }}" git push origin "${{ env.THE_VERSION }}" --force - ## Deployment - - name: Deploy Env Override - if: | - github.event.head_commit.message == '/deploy sit' || - github.event.head_commit.message == '/deploy uat' - run: | - message="${{ github.event.head_commit.message }}" - trimmed_message=${message:1} # Remove leading slash - override_env=$(echo "$trimmed_message" | grep -oE '[^[:space:]]+$') - override_env_upper=$(echo "$trimmed_message" | awk '{print toupper($NF)}') - echo "THE_ENV=${override_env}" >> $GITHUB_ENV - echo "TARGET_ENV_UPPERCASE=${override_env_upper}" >> $GITHUB_ENV - - name: Publish UMM-T with new version uses: podaac/cmr-umm-updater@0.5.0 if: | - github.event.head_commit.message == '/deploy sit' || - github.event.head_commit.message == '/deploy uat' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release') with: @@ -212,6 +193,8 @@ jobs: run: | cat ./configs/hitideConfig-${{ env.THE_ENV }}.js > ./dist/hitideConfig.js + ## Deployment + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: @@ -224,8 +207,6 @@ jobs: if: | github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || - startsWith(github.ref, 'refs/heads/release') || - github.event.head_commit.message == '/deploy sit' || - github.event.head_commit.message == '/deploy uat' + startsWith(github.ref, 'refs/heads/release') run: - aws s3 sync ./dist s3://podaac-services-${{ env.THE_ENV }}-hitide --exclude dataset-configs/* --exclude palettes/* --delete + aws s3 sync ./dist s3://podaac-services-${{ env.THE_ENV}}-hitide --exclude dataset-configs/* --exclude palettes/* --delete \ No newline at end of file From 88b8d07dcf6192d045217f69ae7fb4a9e9ded20a Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Mon, 17 Jul 2023 15:20:08 -0700 Subject: [PATCH 15/16] udpate workflow --- .github/workflows/build.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4adf698f..8210e078 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -194,6 +194,17 @@ jobs: cat ./configs/hitideConfig-${{ env.THE_ENV }}.js > ./dist/hitideConfig.js ## Deployment + - name: Deploy Env Override + if: | + github.event.head_commit.message == '/deploy sit' || + github.event.head_commit.message == '/deploy uat' + run: | + message="${{ github.event.head_commit.message }}" + trimmed_message=${message:1} # Remove leading slash + override_env=$(echo "$trimmed_message" | grep -oE '[^[:space:]]+$') + override_env_upper=$(echo "$trimmed_message" | awk '{print toupper($NF)}') + echo "THE_ENV=${override_env}" >> $GITHUB_ENV + echo "TARGET_ENV_UPPERCASE=${override_env_upper}" >> $GITHUB_ENV - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 @@ -207,6 +218,8 @@ jobs: if: | github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || - startsWith(github.ref, 'refs/heads/release') + startsWith(github.ref, 'refs/heads/release') || + github.event.head_commit.message == '/deploy sit' || + github.event.head_commit.message == '/deploy uat' run: - aws s3 sync ./dist s3://podaac-services-${{ env.THE_ENV}}-hitide --exclude dataset-configs/* --exclude palettes/* --delete \ No newline at end of file + aws s3 sync ./dist s3://podaac-services-${{ env.THE_ENV }}-hitide --exclude dataset-configs/* --exclude palettes/* --delete \ No newline at end of file From 298cb13872ef7a44348e84b6a0c7c6dace3fb65a Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Mon, 17 Jul 2023 15:27:30 -0700 Subject: [PATCH 16/16] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0173f462..aedec983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add in commit message triggers - PODAAC-5326: Fixed 'Add matching granules to download' button. +- issue-17: Add way to read config files to allow for multiple lat lon for variables images. ### Changed ### Removed ### Fixed