Skip to content

Commit

Permalink
Merge branch 'main' into snyk-upgrade-9efc152836b940a0ac52f636fe99af96
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggling committed Sep 20, 2024
2 parents a42edf7 + d641261 commit 537fe61
Show file tree
Hide file tree
Showing 638 changed files with 51,231 additions and 26,072 deletions.
3 changes: 0 additions & 3 deletions .changeset/pr-547-1695721472.md

This file was deleted.

9 changes: 9 additions & 0 deletions .changeset/pr-704-2022804484.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

---
"fusion-project-portal": patch
---
Order and IsLegacy is removed from Onboarded apps. Order is removed from Portal.


> [!IMPORTANT]
> This change requires database migration.
5 changes: 5 additions & 0 deletions .changeset/pr-710-2025280865.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": minor
---
Portal administration application. for managing portal configurations
5 changes: 5 additions & 0 deletions .changeset/pr-712-2027113298.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": patch
---
ContextTypes are returned as array of string
5 changes: 5 additions & 0 deletions .changeset/pr-713-2027570183.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": patch
---
Added endpoint to delete a portal
File renamed without changes.
21 changes: 21 additions & 0 deletions .changeset/pr-723.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"fusion-project-portal": minor
---

feat: add Configuration to Portal domain

To enable the configuration of pages such as the project page, facility page, and root page, it should be possible to add a route configuration to the portal.

A configuration model as been added, currently only with a router property (but designed to be exteded if needed in the future)

The following endpoints has been added:

- GET /portal/ID/configuration
- PUT /portal/ID/configuration

In addition the data is now included in the following endpoint:

- GET /portal/ID

> [!IMPORTANT]
> This change requires database migration.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions .changeset/pr-744-2069530352.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

---
"fusion-project-portal": patch
---
Endpoint for Apps activated on portal combined with available apps for portal.
Endpoint for Portal-app with reference to contextIds.
5 changes: 5 additions & 0 deletions .changeset/pr-746-2073331715.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": patch
---
Added Fusion cli on build
5 changes: 5 additions & 0 deletions .changeset/pr-747-2073460455.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": patch
---
apps are now on separate build pipeline
5 changes: 5 additions & 0 deletions .changeset/pr-751-2076327141.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

---
"fusion-project-portal": patch
---
Delete app now removes an app from a portal even if the app is contextual or global
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/actions/es-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
report-json: "eslint-report.log.json"

- name: Upload ESLint report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: eslint-report.log.json
Expand Down
32 changes: 32 additions & 0 deletions .github/actions/get-fusion-token/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Get Fusion token
description: "Runs a composite step action"
inputs:
client-id:
description: "SP client id"
required: true
tenant-id:
description: "Equinor tenant id"
required: true
resource-id:
description: "Resource id"
required: true

outputs:
token:
description: "Fusion token"
value: ${{ steps.token.outputs.token }}

runs:
using: "composite"
steps:
- name: "Login to Azure"
uses: azure/login@v1
with:
client-id: ${{inputs.client-id}}
tenant-id: ${{ inputs.tenant-id }}
allow-no-subscriptions: true

- name: "Obtain token for upload"
id: token
shell: bash
run: echo "token=$(az account get-access-token --resource '${{ inputs.resource-id }}' | jq '.accessToken')" >> $GITHUB_OUTPUT
11 changes: 11 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ runs:
cd client
yarn install --frozen-lockfile
shell: bash

- name: Install Fusion CLI
run: |
npm i -g @equinor/fusion-framework-cli
shell: bash

- name: Install App Deps
run: |
cd client/apps/portal-administration
yarn install
shell: bash
13 changes: 10 additions & 3 deletions .github/workflows/backend-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ on:
jobs:
echo:
name: Backend pr job
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Write your own steps here
run: echo "----- Need Implementation ----"
- name: Checkout
uses: actions/checkout@v4

- name: Dotnet build
shell: bash
run: dotnet build ./backend/src/Equinor.ProjectExecutionPortal.sln

- name: Dotnet test
shell: bash
run: dotnet test ./backend/src/Equinor.ProjectExecutionPortal.sln
2 changes: 1 addition & 1 deletion .github/workflows/client-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Open Pull Request
strategy:
matrix:
version: [18.x]
version: [21.x]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/common-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,46 @@ jobs:
--from-environment test
--to-environment prod
--deployment ${{ steps.get_active_deployments.outputs.activeDeploymentApi }}
releas-admin:
name: Production Release Portal Administartion Application
needs: changesets
environment: production
runs-on: ubuntu-latest
if: needs.changesets.outputs.published == 'true'
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Get fusion token
id: "get-fusion-token"
uses: ./.github/actions/get-fusion-token
with:
client-id: ${{secrets.AZURE_SP_FUSION}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
resource-id: ${{secrets.AZURE_FUSION_SCOPE}}

- name: Install
run: |
cd client
yarn install
npm i -g @equinor/fusion-framework-cli
cd apps/portal-administration
yarn install
- name: Build
run: |
cd client
yarn build:apps
- name: Deploy
run: |
cd client/apps/portal-administration
yarn bundle
curl -T "app-bundle.zip" -H "Authorization: bearer ${{steps.get-fusion-token.outputs.token}}" -H "Content-Disposition: attachment; filename=app-bundle.zip" -H "Content-Type: application/zip" -X POST --show-error -i --url https://fusion-s-portal-fprd.azurewebsites.net/api/apps/portal-administration/versions
- name: Publish
run: |
curl -H "Authorization: bearer ${{steps.get-fusion-token.outputs.token}}" -X POST --show-error -i --url https://fusion-s-portal-fprd.azurewebsites.net/api/apps/portal-administration/publish
58 changes: 58 additions & 0 deletions .github/workflows/deploy-apps-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy apps CI

on:
push:
branches: ["main"]
paths:
- "client/apps/portal-administration/**"

permissions:
actions: read
checks: write
contents: read
deployments: write
id-token: write

jobs:
build:
environment: non-prod
name: Deploy
timeout-minutes: 15
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Get fusion token
id: "get-fusion-token"
uses: ./.github/actions/get-fusion-token
with:
client-id: ${{secrets.AZURE_SP_FUSION}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
resource-id: ${{secrets.AZURE_FUSION_SCOPE}}

- name: Install
run: |
cd client
yarn install
npm i -g @equinor/fusion-framework-cli
cd apps/portal-administration
yarn install
- name: Build
run: |
cd client
yarn build:apps
- name: Deploy
run: |
cd client/apps/portal-administration
yarn bundle
curl -T "app-bundle.zip" -H "Authorization: bearer ${{steps.get-fusion-token.outputs.token}}" -H "Content-Disposition: attachment; filename=app-bundle.zip" -H "Content-Type: application/zip" -X POST --show-error -i --url https://fusion-s-portal-ci.azurewebsites.net/api/apps/portal-administration/versions
- name: Publish
run: |
curl -H "Authorization: bearer ${{steps.get-fusion-token.outputs.token}}" -X POST --show-error -i --url https://fusion-s-portal-ci.azurewebsites.net/api/apps/portal-administration/publish
2 changes: 1 addition & 1 deletion .github/workflows/push-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [16.x]
version: [21.x]
env:
commit-author: bot
author-email: [email protected]
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/update-lockfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Update lockfile
run: yarn install
run: |
cd client
yarn install
- name: Commit and push changes
- name: Check for changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add yarn.lock
git commit -n -m "chore(snyk): update lockfile"
git push
if ! git diff --quiet client/yarn.lock; then
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add client/yarn.lock
git commit -n -m "chore(snyk): update lockfile"
git push
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules
coverage
# Visual Studio cache/options directory

.vs/
.vs/
todo.md
Loading

0 comments on commit 537fe61

Please sign in to comment.