Skip to content

Commit

Permalink
Merge branch 'main' into padms/1816
Browse files Browse the repository at this point in the history
  • Loading branch information
padms committed Sep 28, 2023
2 parents 9c370c8 + 727da12 commit 9623f35
Show file tree
Hide file tree
Showing 141 changed files with 802 additions and 1,167 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ legacy/js/dist
legacy/css
web/public/legacy/legacy.minified.js
legacy
sanityv3
6 changes: 3 additions & 3 deletions .github/workflows/PREPROD-studios-v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue

- name: Modify radixconfig tag for preprod on main branch 🗒️
if: github.ref == 'refs/heads/main'
Expand All @@ -46,8 +46,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/upgradeEnvironment.py studio ${{ env.IMAGE_TAG_SHA }} ${{ secrets.ENV }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy studios to preprod for tag ${{ env.IMAGE_TAG_SHA }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/PREPROD-studios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue

- name: Modify radixconfig tag for preprod on main branch 🗒️
if: github.ref == 'refs/heads/main'
Expand All @@ -46,8 +46,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/upgradeEnvironment.py studio ${{ env.IMAGE_TAG_SHA }} ${{ secrets.ENV }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy studios to preprod for tag ${{ env.IMAGE_TAG_SHA }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/PREPROD-webs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue

- name: Modify radixconfig tag for preprod on main branch 🗒️
if: github.ref == 'refs/heads/main'
Expand All @@ -50,8 +50,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/upgradeEnvironment.py web ${{ env.IMAGE_TAG_SHA }} ${{ secrets.ENV }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy webs to preprod with tag ${{ env.IMAGE_TAG_SHA }}" --allow-empty
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/PROD-all-studios-v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Get preprod sha 🏷️
id: get-preprod-sha
shell: bash
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Get preprod sha 🏷️
id: get-preprod-sha
shell: bash
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Promote preprod tag to prod 🗒️
if: github.ref == 'refs/heads/main'
shell: bash
Expand All @@ -189,8 +189,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/promoteAllToProduction.py studio
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy all studios to production"
Expand Down Expand Up @@ -248,11 +248,11 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Or any version you prefer
node-version: '14' # Or any version you prefer

- name: Install dependencies
run: |
Expand All @@ -264,8 +264,8 @@ jobs:
- name: Commit and push changes
run: |
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
git add latest-prod-tags.json
git commit -m "Update latest-prod-tags.json with new tags" || echo "No changes to commit"
git push
10 changes: 5 additions & 5 deletions .github/workflows/PROD-all-studios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Get preprod sha 🏷️
id: get-preprod-sha
shell: bash
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Get preprod sha 🏷️
id: get-preprod-sha
shell: bash
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Promote preprod tag to prod 🗒️
if: github.ref == 'refs/heads/main'
shell: bash
Expand All @@ -189,8 +189,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/promoteAllToProduction.py studio
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy all studios to production"
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/PROD-all-webs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Promote preprod tag to prod 🗒️
if: github.ref == 'refs/heads/main'
shell: bash
Expand All @@ -25,8 +25,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/promoteAllToProduction.py web
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy all web sites to production"
Expand Down Expand Up @@ -85,11 +85,11 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # Or any version you prefer
node-version: '14' # Or any version you prefer

- name: Install dependencies
run: |
Expand All @@ -101,8 +101,8 @@ jobs:
- name: Commit and push changes
run: |
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
git add latest-prod-tags.json
git commit -m "Update latest-prod-tags.json with new tags" || echo "No changes to commit"
git push
8 changes: 4 additions & 4 deletions .github/workflows/PROD-studios-rollback.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
set -u
set -o pipefail
set -x
TOKEN=$(curl -u nilsml:${{ secrets.GHCR_PAT }} https://ghcr.io/token\?scope\="repository:equinor/energyvision>:pull" | jq -r .token)
TOKEN=$(curl -u padms:${{ secrets.PADMS_PAT }} https://ghcr.io/token\?scope\="repository:equinor/energyvision>:pull" | jq -r .token)
statusCode=$(curl --head --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Bearer $TOKEN" https://ghcr.io/v2/equinor/energyvision/studio-global/manifests/${{ github.event.inputs.image-sha }})
if [[ $statusCode -eq 200 ]]
then
Expand Down Expand Up @@ -206,16 +206,16 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Write to console 🗒️
shell: bash
run: |
# Install pre-requisite
python -m pip install --user ruamel.yaml
python ci/upgradeEnvironment.py studio ${{ github.event.inputs.image-sha }} ${{ secrets.ENV }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🔙 Rolling back satellite studios in production to version ${{ github.event.inputs.image-sha }}"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/PROD-studios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Get preprod sha 🏷️
id: get-preprod-sha
shell: bash
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }}
token: ${{ secrets.PADMS_PAT }}
- name: Get preprod sha 🏷️
id: get-preprod-sha
shell: bash
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Promote preprod tag to prod 🗒️
if: github.ref == 'refs/heads/main'
shell: bash
Expand All @@ -208,8 +208,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/promoteToProduction.py studio ${{ github.event.inputs.site }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy studio for ${{ github.event.inputs.site }} to production"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/PROD-webs-rollback.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
set -u
set -o pipefail
set -x
TOKEN=$(curl -u nilsml:${{ secrets.GHCR_PAT }} https://ghcr.io/token\?scope\="repository:equinor/energyvision>:pull" | jq -r .token)
TOKEN=$(curl -u padms:${{ secrets.PADMS_PAT }} https://ghcr.io/token\?scope\="repository:equinor/energyvision>:pull" | jq -r .token)
statusCode=$(curl --head --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Bearer $TOKEN" https://ghcr.io/v2/equinor/energyvision/web-global/manifests/${{ github.event.inputs.image-sha }})
if [[ $statusCode -eq 200 ]]
then
Expand Down Expand Up @@ -72,16 +72,16 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Write to console 🗒️
shell: bash
run: |
# Install pre-requisite
python -m pip install --user ruamel.yaml
python ci/upgradeEnvironment.py web ${{ github.event.inputs.image-sha }} ${{ secrets.ENV }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🔙 Rolling back all websites in production to version ${{ github.event.inputs.image-sha }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/PROD-webs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Promote preprod tag to prod 🗒️
if: github.ref == 'refs/heads/main'
shell: bash
Expand All @@ -42,8 +42,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/promoteToProduction.py web ${{ github.event.inputs.site }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy web for ${{ github.event.inputs.site }} to production"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/TEST-studio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
with:
repository: 'equinor/energyvision-internal'
ref: main
token: ${{ secrets.PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
token: ${{ secrets.PADMS_PAT }} # Replace with ssh as per https://stackoverflow.com/questions/60222741/github-actions-and-git-clone-issue
- name: Modify radixconfig tag for TEST on staging branch 🗒️
if: github.ref == 'refs/heads/staging'
shell: bash
Expand All @@ -81,8 +81,8 @@ jobs:
python -m pip install --user ruamel.yaml
python ci/upgradeEnvironment.py studio ${{ env.IMAGE_TAG_SHA }} ${{ secrets.ENV }}
git config --global user.name 'github'
git config --global user.email 'nilsml@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/equinor/energyvision-internal
git config --global user.email 'padms@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PADMS_PAT }}@github.com/equinor/energyvision-internal
if [[ `git status --porcelain` ]]
then
git commit -am "🚀 Deploy studio to test for tag ${{ env.IMAGE_TAG_SHA }}"
Expand Down
Loading

0 comments on commit 9623f35

Please sign in to comment.