From 94614bd734093b9a83af5c7f40d183f7e5b3acc6 Mon Sep 17 00:00:00 2001 From: Karolina Slazyk <76835138+kslazykv@users.noreply.github.com> Date: Thu, 27 Jun 2024 10:44:39 +0200 Subject: [PATCH 01/35] pbi/104957 Move New FrontEnd toRadix (#832) * radix files * changed radixconfig * fixed syntax * removed spec --- .docker/nginx/conf.d/default.conf | 8 +- .docker/scripts/env-replace.py | 2 +- .dockerignore | 1 + Dockerfile.prod | 32 +++++ pipelines/frontend-build.yml | 153 ++++++++++++---------- pipelines/templates/radix-deploy.yml | 73 +++++++++++ pipelines/templates/radix-promote-env.yml | 94 +++++++++++++ radixconfig.yaml | 35 +++++ 8 files changed, 326 insertions(+), 72 deletions(-) create mode 100644 Dockerfile.prod create mode 100644 pipelines/templates/radix-deploy.yml create mode 100644 pipelines/templates/radix-promote-env.yml create mode 100644 radixconfig.yaml diff --git a/.docker/nginx/conf.d/default.conf b/.docker/nginx/conf.d/default.conf index 2d1e53c4a..2eb08e836 100644 --- a/.docker/nginx/conf.d/default.conf +++ b/.docker/nginx/conf.d/default.conf @@ -5,10 +5,16 @@ server { absolute_redirect off; root /usr/share/nginx/html; - index index.html; + # index.html fallback location / { + index / index.html; + try_files $uri $uri/ /index.html; + } + + location /comm { + index index.html; try_files $uri $uri/ /index.html; } diff --git a/.docker/scripts/env-replace.py b/.docker/scripts/env-replace.py index e9e164a45..af0e9f6ee 100644 --- a/.docker/scripts/env-replace.py +++ b/.docker/scripts/env-replace.py @@ -16,7 +16,7 @@ keyVaultSecrets.append((key.replace('pcs_',''),os.environ.get(key))) # Get all files -for filepath in glob.iglob('/usr/share/nginx/html/**/*.js', recursive=True): +for filepath in glob.iglob('/forntend/**/*.js', recursive=True): print("Looking for stuff to replace in: {filepath}".format(**vars())) s = "" with open(filepath) as file: diff --git a/.dockerignore b/.dockerignore index 35c96ffba..f8fe3830b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ node_modules build +pipelines junit.xml diff --git a/Dockerfile.prod b/Dockerfile.prod new file mode 100644 index 000000000..535f6d3ed --- /dev/null +++ b/Dockerfile.prod @@ -0,0 +1,32 @@ +# build environment +FROM node:22 as build +WORKDIR /app +COPY . /app +RUN yarn install +RUN yarn build --mode=production + +# production environment +FROM docker.io/nginxinc/nginx-unprivileged:alpine +user 0 +## add permissions for nginx user +RUN apk add python3 +WORKDIR /frontend + +COPY --from=build /app/build /frontend +COPY .docker/nginx/ /etc/nginx/ +COPY .docker/scripts/ /etc/scripts/ + +# Create non-root user. Set ui to 9999 to avoid conflicts with host OS just in case +RUN adduser --disabled-password --uid 9999 --gecos "" apprunner + +#Set the non-root as owner +RUN chown -R apprunner.apprunner /frontend \ + && chown -R apprunner:apprunner /etc/nginx/conf.d + +# Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) +USER 9999 + +EXPOSE 5000 +CMD ["sh","/etc/scripts/startup.sh"] + + diff --git a/pipelines/frontend-build.yml b/pipelines/frontend-build.yml index 35ab29933..527cd2fdd 100644 --- a/pipelines/frontend-build.yml +++ b/pipelines/frontend-build.yml @@ -13,7 +13,6 @@ resources: # Global variables for the pipeline variables: - - template: templates/variables/procosys-web-variables.yml@templates - template: templates/variables/procosys-global-variables.yml@templates - template: templates/variables/frontend-variables.yml@templates @@ -21,107 +20,121 @@ variables: value: procosys/frontend stages: -# build_and_test stage. Yarn test, Docker build, tag and push -- stage: build_and_test - displayName: 'Build & Test' +# Build Stage +- stage: build + displayName: 'Build' variables: - envName: 'build_and_test' - envRg: '${{ variables.envRgName }}' + envName: 'build' serviceConnection: '${{ variables.nonProdServiceConnection }}' containerRegistry: '${{ variables.containerRegistryName }}' envGroupName: '$(globalPrefix)-$(fullAppName)-${{ variables.envName }}' - dockerfilePath: '/.docker/Dockerfile' + dockerfilePath: '/Dockerfile' dockerRegistryServiceConnection: '$(dockerRegistryServiceConnectionName)' jobs: + # Docker Build + - template: /templates/pipelines/dockerbuild-frontend.yml@templates + parameters: + dependsOn: '' + deploymentName: 'docker_build' + condition: and(always(), eq(variables['Build.Reason'], 'PullRequest')) + buildCommand: build + envGroup: '${{ variables.envGroupName }}' + dockerfilePath: '${{ variables.dockerfilePath }}' + buildContext: '$(Build.SourcesDirectory)' + repository: '${{ variables.repositoryName }}' + dockerRegistryServiceConnection: '$(dockerRegistryServiceConnectionName)' + + # Docker Build and Push - template: /templates/pipelines/dockerbuild-frontend.yml@templates parameters: - deploymentName: 'docker_build_push' dependsOn: '' - env: '${{ variables.envName }}' + deploymentName: 'docker_build_push' + condition: and(always(), ne(variables['Build.Reason'], 'PullRequest')) + buildCommand: buildAndPush envGroup: '${{ variables.envGroupName }}' - dockerfilePath: ${{ variables.dockerfilePath }} + dockerfilePath: '${{ variables.dockerfilePath }}' buildContext: '$(Build.SourcesDirectory)' - repository: ${{ variables.repositoryName }} - dockerRegistryServiceConnection: $(dockerRegistryServiceConnectionName) + repository: '${{ variables.repositoryName }}' + dockerRegistryServiceConnection: '$(dockerRegistryServiceConnectionName)' # Deploy to dev environment -- stage: dev - displayName: 'Deploy to dev' - dependsOn: 'build_and_test' +- stage: DeployDev + displayName: 'Deploy to Dev' + dependsOn: 'build' condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) variables: envName: 'dev' - envRg: '${{ variables.envRgName }}' envGroupName: '$(globalPrefix)-$(fullAppName)-${{ variables.envName }}' - serviceConnection: '${{ variables.nonProdServiceConnection }}' - containerRegistry: '${{ variables.containerRegistryName }}' jobs: - - template: /templates/pipelines/kubernetes/frontend-deploy.yml@templates - parameters: - deploymentName: 'deploy_to_k8s' - dependsOn: '' - serviceConnection: '${{ variables.serviceConnection }}' - env: '${{ variables.envName }}' - envRg: 'pcs-hosting-rg' - envGroup: '${{ variables.envGroupName }}' - dockerImage: 'procosys.azurecr.io/procosys/frontend:$(Build.BuildId)' - clusterName: 'pcs-aks-test' - kvName: 'pcs-frontend-${{ variables.envName }}-kv' - kvRgName: 'pcs-frontend-${{ variables.envName }}-rg' - replicas: 2 + - deployment: Deploy + displayName: Deploy Frontend + environment: '${{ variables.envGroupName }}' + pool: + vmImage: 'windows-latest' + strategy: + runOnce: + deploy: + steps: + # Deploy to Radix + - template: templates/radix-deploy.yml + parameters: + imageTagNamesFrontend: '${{ variables.versionNumber }}$(Build.BuildId)' # deploy to test environment -- stage: test - displayName: 'Deploy to test' - dependsOn: 'build_and_test' +- stage: DeployTest + displayName: 'Deploy to Test' + dependsOn: 'DeployDev' condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + variables: envName: 'test' - envRg: '${{ variables.envRgName }}' envGroupName: '$(globalPrefix)-$(fullAppName)-${{ variables.envName }}' - serviceConnection: '${{ variables.nonProdServiceConnection }}' - containerRegistry: '${{ variables.containerRegistryName }}' + radixPromoteFromEnv: 'dev' + radixJobName: $[ stageDependencies.DeployDev.Deploy.outputs['Deploy.RADIXJOB.radixJobName'] ] # This variable must have been set by previous step jobs: - - template: /templates/pipelines/kubernetes/frontend-deploy.yml@templates - parameters: - deploymentName: 'deploy_to_k8s' - dependsOn: '' - serviceConnection: '${{ variables.serviceConnection }}' - env: '${{ variables.envName }}' - envRg: 'pcs-hosting-rg' - envGroup: '${{ variables.envGroupName }}' - dockerImage: 'procosys.azurecr.io/procosys/frontend:$(Build.BuildId)' - clusterName: 'pcs-aks-test' - kvName: 'pcs-frontend-${{ variables.envName }}-kv' - kvRgName: 'pcs-frontend-${{ variables.envName }}-rg' - replicas: 2 + - deployment: Deploy + displayName: Promote + environment: '${{ variables.envGroupName }}' + pool: + vmImage: 'windows-latest' + strategy: + runOnce: + deploy: + steps: + # Promote to test + - template: templates/radix-promote-env.yml + parameters: + fromEnvironment: $(radixPromoteFromEnv) + toEnvironment: $(envName) + deploymentName: $(radixJobName) - # deploy to test environment -- stage: production - displayName: 'Deploy to production' - dependsOn: 'build_and_test' +# deploy to prod environment +- stage: DeployProd + displayName: 'Deploy to Prod' + dependsOn: 'DeployTest' condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) variables: envName: 'prod' - envRg: '${{ variables.envRgName }}' envGroupName: '$(globalPrefix)-$(fullAppName)-${{ variables.envName }}' - serviceConnection: '${{ variables.prodServiceConnection }}' - containerRegistry: '${{ variables.containerRegistryName }}' + radixPromoteFromEnv: 'test' + radixJobName: $[ stageDependencies.DeployTest.Deploy.outputs['Deploy.RADIXJOB.radixJobName'] ] jobs: - - template: /templates/pipelines/kubernetes/frontend-deploy.yml@templates - parameters: - deploymentName: 'deploy_to_k8s' - dependsOn: '' - serviceConnection: '${{ variables.serviceConnection }}' - env: '${{ variables.envName }}' - envRg: 'pcs-hosting-rg' - envGroup: '${{ variables.envGroupName }}' - dockerImage: 'procosys.azurecr.io/procosys/frontend:$(Build.BuildId)' - clusterName: 'pcs-aks-prod' - kvName: 'pcs-frontend-${{ variables.envName }}-kv' - kvRgName: 'pcs-frontend-${{ variables.envName }}-rg' - replicas: 3 + - deployment: Deploy + displayName: Promote + environment: '${{ variables.envGroupName }}' + pool: + vmImage: 'windows-latest' + strategy: + runOnce: + deploy: + steps: + # Promote to prod + - template: templates/radix-promote-env.yml + parameters: + fromEnvironment: $(radixPromoteFromEnv) + toEnvironment: $(envName) + deploymentName: $(radixJobName) diff --git a/pipelines/templates/radix-deploy.yml b/pipelines/templates/radix-deploy.yml new file mode 100644 index 000000000..d5783d2a9 --- /dev/null +++ b/pipelines/templates/radix-deploy.yml @@ -0,0 +1,73 @@ +parameters: + - name: radixResource + default: 6dae42f8-4368-4678-94ff-3960e28e3630 # Azure Kubernetes Service AAD Server + + - name: radixApplication + default: procosys-js-frontend + + - name: radixUrl + default: https://api.radix.equinor.com/api/v1 + displayName: Host of radix api, including version + + - name: serviceConnection + default: 'procosys - non-prod' + displayName: 'Service Connection' + + - name: imageTagNamesFrontend + type: string + displayName: 'Image tag name for frontend' + +steps: +- task: AzureCLI@2 + displayName: Trigger deploy to radix + name: RADIXJOB + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + addSpnToEnvironment: true + scriptType: pscore + scriptLocation: 'inlineScript' + FailOnStandardError: true + inlineScript: | + $token = az account get-access-token --resource ${{ parameters.radixResource }} --query=accessToken -otsv + ## Get current branch + $body = ConvertTo-Json @{ + imageTagNames = @{ 'frontend'='${{ parameters.imageTagNamesFrontend }}'; } + toEnvironment = 'dev' + triggeredBy = 'Azure-Devops ($(Build.RequestedFor))' + } + Write-Host "Sending payload: $body" + $radixUrl = "${{ parameters.radixUrl }}/applications/${{ parameters.radixApplication }}/pipelines/deploy" + Write-Host "Sending POST to $radixUrl" + $resp = Invoke-RestMethod -Method Post -Uri $radixUrl -Headers @{"Authorization" = "Bearer $token"; "Content-Type" = "application/json" } -Body $body + Write-Host $resp + $jobName = $resp.name + $checkUrl = "${{ parameters.radixUrl }}/applications/${{ parameters.radixApplication }}/jobs/$jobName" + $checkStarted = Get-Date + while ($true) { + Write-Host "Checking status..." + $checkResp = Invoke-RestMethod -Uri $checkUrl -Headers @{"Authorization" = "Bearer $token" } + + Write-Host (ConvertTo-Json $checkResp -Depth 10 -Compress) + ## We want to stop when status -not Running || Waiting + if ($checkResp.status -ne "Running" -and $checkResp.status -ne "Waiting") { + break; + } + + if ( ((Get-Date) - $checkStarted).Seconds -gt 600) { + Write-Host "Timeout..." + throw "Radix job took over 600 seconds, aborting..." + } + Start-Sleep -Seconds 10 + } + ## Do a last check for status -> If failed, write ERROR using #VSO commands + Write-Host "Final status check..." + $checkResp = Invoke-RestMethod -Uri $checkUrl -Headers @{"Authorization" = "Bearer $token" } + if ($checkResp.status -ne "Succeeded") { + Write-Host "##vso[task.logissue type=error]Deployment to Radix failed." + throw "Radix deployment failed" + } + + ## The deployment in Radix will have an id (or deployment name). This id is needed later to be able to promote the deployment. We set a variable called radixJobName here, that is used later in the promote script. + $deploymentName = $checkResp.deployments | select -Property name | select -First 1 -ExpandProperty name + Write-Host "Setting deployment name: $deploymentName" + Write-Host "##vso[task.setvariable variable=radixJobName;isOutput=true;]$deploymentName" \ No newline at end of file diff --git a/pipelines/templates/radix-promote-env.yml b/pipelines/templates/radix-promote-env.yml new file mode 100644 index 000000000..36ea2af82 --- /dev/null +++ b/pipelines/templates/radix-promote-env.yml @@ -0,0 +1,94 @@ + +## +## The template wraps api calls to the radix platform to promote a deploment from one environment to another. +## As the radix jobs are async, the template will wait for a successfull or failed status by polling the api. +## A 600 second timeout has been implemented. +## +## Parameters required are the source environment, the to environment and name of the deployment job. +## +## The deployment job name changes for each environment, so the response must be emitted in the job output. +## +## This should be fetched by using `$[ stageDependencies ]' syntax. The stage and job name must be referenced. +## E.g. `$[ stageDependencies.STAGENAME.JOBNAME.outputs['JOBNAME.RADIXJOB.radixJobName'] ]` +## + +parameters: +- name: serviceConnection + default: 'procosys - non-prod' + displayName: 'Service Connection' + +- name: fromEnvironment + type: string + displayName: RADIX environment to promote artifact from + +- name: toEnvironment + type: string + displayName: RADIX environment to promote artifact to + +- name: deploymentName + type: string + displayName: The deployment job name from the previous stage + +- name: radixResource + default: 6dae42f8-4368-4678-94ff-3960e28e3630 + +- name: radixApplication + default: procosys-js-frontend + +- name: radixUrl + default: https://api.radix.equinor.com/api/v1 + + +steps: +- task: AzureCLI@2 + displayName: Trigger deploy to radix + name: RADIXJOB + inputs: + azureSubscription: ${{ parameters.serviceConnection }} + addSpnToEnvironment: true + scriptType: pscore + scriptLocation: 'inlineScript' + FailOnStandardError: true + inlineScript: | + $token = az account get-access-token --resource ${{ parameters.radixResource }} --query=accessToken -otsv + $body = ConvertTo-Json @{ + "triggeredBy" = "Azure-Devops ($(Build.RequestedFor))" + fromEnvironment = "${{ parameters.fromEnvironment }}" + toEnvironment = "${{ parameters.toEnvironment }}" + deploymentName = "${{ parameters.deploymentName }}" + } + Write-Host "Sending payload: $body" + $radixUrl = "${{ parameters.radixUrl }}/applications/${{ parameters.radixApplication }}/pipelines/promote" + Write-Host "Sending POST to $radixUrl" + $resp = Invoke-RestMethod -Method Post -Uri $radixUrl -Headers @{"Authorization" = "Bearer $token"; "Content-Type" = "application/json" } -Body $body + Write-Host $resp + $jobName = $resp.name + $checkUrl = "${{ parameters.radixUrl }}/applications/${{ parameters.radixApplication }}/jobs/$jobName" + $checkStarted = Get-Date + while ($true) { + Write-Host "Checking status..." + $checkResp = Invoke-RestMethod -Uri $checkUrl -Headers @{"Authorization" = "Bearer $token" } + + Write-Host (ConvertTo-Json $checkResp -Depth 10 -Compress) + ## We want to stop when status -not Running || Waiting + if ($checkResp.status -ne "Running" -and $checkResp.status -ne "Waiting") { + break; + } + + if ( ((Get-Date) - $checkStarted).Seconds -gt 600) { + Write-Host "Timeout..." + throw "Radix job took over 600 seconds, aborting..." + } + Start-Sleep -Seconds 10 + } + ## Do a last check for status -> If failed, write ERROR using #VSO commands + Write-Host "Final status check..." + $checkResp = Invoke-RestMethod -Uri $checkUrl -Headers @{"Authorization" = "Bearer $token" } + if ($checkResp.status -ne "Succeeded") { + Write-Host "##vso[task.logissue type=error]Deployment to Radix failed." + throw "Radix deployment failed" + } + ## The deployment in Radix will have an id (or deployment name). This id is needed later to be able to promote to the next environment. We set a variable called radixJobName here, that is used next time the promote script is called. + $deploymentName = $checkResp.deployments | select -Property name | select -First 1 -ExpandProperty name + Write-Host "Setting deployment name: $deploymentName" + Write-Host "##vso[task.setvariable variable=radixJobName;isOutput=true;]$deploymentName" \ No newline at end of file diff --git a/radixconfig.yaml b/radixconfig.yaml new file mode 100644 index 000000000..5b3f22be9 --- /dev/null +++ b/radixconfig.yaml @@ -0,0 +1,35 @@ +apiVersion: radix.equinor.com/v1 +kind: RadixApplication +metadata: + name: procosys-js-frontend + +spec: + environments: + - name: dev + build: + from: develop + - name: test + build: + from: test + - name: prod + build: + from: master + components: + - name: frontend + publicPort: http + ports: + - name: http + port: 5000 + environmentConfig: + - environment: dev + dockerfileName: Dockerfile.dev + variables: + authSettingsEndpoint: 'https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend/Auth' + - environment: test + dockerfileName: Dockerfile.test + variables: + authSettingsEndpoint: 'https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend/Auth' + - environment: prod + dockerfileName: Dockerfile.prod + variables: + authSettingsEndpoint: 'https://pcs-config-prod-func.azurewebsites.net/api/Frontend/Auth' \ No newline at end of file From 48a3b66cc0d17c8390df8302b3157acc51b50c6b Mon Sep 17 00:00:00 2001 From: kslazykv Date: Thu, 27 Jun 2024 13:36:22 +0200 Subject: [PATCH 02/35] changed path --- src/core/ProCoSysSettings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ProCoSysSettings.ts b/src/core/ProCoSysSettings.ts index be1d6a5fc..45122e979 100644 --- a/src/core/ProCoSysSettings.ts +++ b/src/core/ProCoSysSettings.ts @@ -1,7 +1,7 @@ import { IAuthService } from 'src/auth/AuthService'; import SettingsApiClient from '@procosys/http/SettingsApiClient'; -const localSettings = require('../../settings.json'); +const localSettings = require('../settings.json'); //#region types interface FeatureConfig { From c50e4d34ba8086f418e5a9528ff100b78b9e8b8f Mon Sep 17 00:00:00 2001 From: kslazykv Date: Thu, 27 Jun 2024 14:04:10 +0200 Subject: [PATCH 03/35] . --- .gitignore | 2 +- Dockerfile.prod | 2 +- src/settings.json | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 src/settings.json diff --git a/.gitignore b/.gitignore index 57eaa09cb..0738cc028 100644 --- a/.gitignore +++ b/.gitignore @@ -50,7 +50,7 @@ typings/ .next # Sensitive files -settings.json +# settings.json #VS Code folder .vscode/ diff --git a/Dockerfile.prod b/Dockerfile.prod index 535f6d3ed..2cb7e6022 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,5 +1,5 @@ # build environment -FROM node:22 as build +FROM node:20 as build WORKDIR /app COPY . /app RUN yarn install diff --git a/src/settings.json b/src/settings.json new file mode 100644 index 000000000..88d68f0e5 --- /dev/null +++ b/src/settings.json @@ -0,0 +1,3 @@ +{ + "authSettingsEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend/Auth?" +} \ No newline at end of file From 7e0e4f46c74fd113b170da688f7d6012fcd7a8d0 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Thu, 27 Jun 2024 14:25:27 +0200 Subject: [PATCH 04/35] . --- radixconfig.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/radixconfig.yaml b/radixconfig.yaml index 5b3f22be9..43b2550cb 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -3,6 +3,7 @@ kind: RadixApplication metadata: name: procosys-js-frontend + spec: environments: - name: dev From 49d61e9426bad484521fb9fe19431b973177a33b Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 13:17:31 +0200 Subject: [PATCH 05/35] . --- src/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.json b/src/settings.json index 9962f384c..fd2ecf097 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { - "configurationEndpoint": "https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend", + "configurationEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend", "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" } From 3df657f02e228a047de025fa0614861f10ca0696 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 13:22:13 +0200 Subject: [PATCH 06/35] . --- Dockerfile.dev | 36 ------------------------------------ Dockerfile.prod | 4 +++- Dockerfile.test | 37 ------------------------------------- 3 files changed, 3 insertions(+), 74 deletions(-) delete mode 100644 Dockerfile.dev delete mode 100644 Dockerfile.test diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index c5e1c8b3f..000000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,36 +0,0 @@ -# build environment -FROM node:20 as build -WORKDIR /app -COPY package*.json ./ -COPY . . -RUN yarn install - -ENV VITE_AUTH_CLIENT="30a25122-c22c-4a5c-a7b8-366d31cb2c46" -ENV VITE_AUTHORITY="https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0" -ENV VITE_CONFIG_SCOPE="api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read" -ENV VITE_BASE_URL_MAIN="https://pcs-main-api-dev-pr.azurewebsites.net/api" -ENV VITE_CONFIG_ENDPOINT="https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend/Configuration?" -ENV VITE_WEBAPI_SCOPE="api://47641c40-0135-459b-8ab4-459e68dc8d08/web_api" -ENV VITE_APP_INSIGHTS="cdb49dda-63f9-433d-99f3-c73dff5dc6a1" -ENV VITE_API_VERSION="&api-version=4.1" - -RUN yarn build --mode=production - -# production environment -FROM docker.io/nginxinc/nginx-unprivileged:alpine - -WORKDIR /app -## add permissions for nginx user -COPY --from=build /app/build /usr/share/nginx/html -COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -COPY .docker/scripts/ /etc/scripts/ - -# Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) -USER 0 -RUN chown -R nginx /usr/share/nginx/html \ - && chown -R nginx /etc/nginx/conf.d -USER 9999 - -EXPOSE 5000 - -CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file diff --git a/Dockerfile.prod b/Dockerfile.prod index 7ea62cea6..a812c9379 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,7 +1,9 @@ # build environment FROM node:20 as build WORKDIR /app -RUN yarn build --mode=production +COPY package*.json ./ +COPY . . +RUN yarn install # production environment FROM docker.io/nginxinc/nginx-unprivileged:alpine diff --git a/Dockerfile.test b/Dockerfile.test deleted file mode 100644 index 1bde8b1bb..000000000 --- a/Dockerfile.test +++ /dev/null @@ -1,37 +0,0 @@ -# build environment -FROM node:20 as build -WORKDIR /app -COPY package*.json ./ -COPY . . -RUN yarn install - -ENV VITE_AUTH_CLIENT="23d8e04c-9362-4870-bda2-dade6f9d0ffb" -ENV VITE_AUTHORITY="https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0" -ENV VITE_CONFIG_SCOPE="api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read" -ENV VITE_BASE_URL_MAIN="https://pcs-main-api-test.azurewebsites.net/api" -ENV VITE_CONFIG_ENDPOINT="https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend/Configuration?" -ENV VITE_WEBAPI_SCOPE="api://47641c40-0135-459b-8ab4-459e68dc8d08/web_api" -ENV VITE_APP_INSIGHTS="2e63710e-308d-45c2-99b0-95a959a3de5a" -ENV VITE_API_VERSION="&api-version=4.1" - -RUN yarn build --mode=production - - -# production environment -FROM docker.io/nginxinc/nginx-unprivileged:alpine - -WORKDIR /app -## add permissions for nginx user -COPY --from=build /app/build /usr/share/nginx/html -COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf -COPY .docker/scripts/ /etc/scripts/ - -# Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) -USER 0 -RUN chown -R nginx /usr/share/nginx/html \ - && chown -R nginx /etc/nginx/conf.d -USER 9999 - -EXPOSE 5000 - -CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file From 36cde5e520b84db982b01b8c94552b182c8cff40 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 13:30:37 +0200 Subject: [PATCH 07/35] . --- .docker/nginx/conf.d/default.conf | 1 - src/settings.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.docker/nginx/conf.d/default.conf b/.docker/nginx/conf.d/default.conf index f5f706f50..fa7dacbc9 100644 --- a/.docker/nginx/conf.d/default.conf +++ b/.docker/nginx/conf.d/default.conf @@ -6,7 +6,6 @@ server { root /usr/share/nginx/html; - # index.html fallback location / { index / index.html; diff --git a/src/settings.json b/src/settings.json index fd2ecf097..9962f384c 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { - "configurationEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend", + "configurationEndpoint": "https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend", "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" } From a6946102fde54951b91db1405597d8833ffb4782 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 13:49:25 +0200 Subject: [PATCH 08/35] . --- Dockerfile.prod | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index a812c9379..dec010fb2 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,10 +1,9 @@ # build environment FROM node:20 as build WORKDIR /app -COPY package*.json ./ -COPY . . +COPY . /app RUN yarn install - +RUN yarn build --mode=production # production environment FROM docker.io/nginxinc/nginx-unprivileged:alpine @@ -13,7 +12,6 @@ WORKDIR /app COPY --from=build /app/build /usr/share/nginx/html COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf COPY .docker/scripts/ /etc/scripts/ - # Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) USER 0 RUN chown -R nginx /usr/share/nginx/html \ @@ -21,6 +19,4 @@ RUN chown -R nginx /usr/share/nginx/html \ USER 9999 EXPOSE 5000 - -CMD ["sh","/etc/scripts/startup.sh"] - +CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file From a1716bfa10ddeae72e444a72defe3122d3b0f2b4 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 14:11:40 +0200 Subject: [PATCH 09/35] . --- .docker/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index afdc2a7dc..d700813b8 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,3 @@ -# build environment FROM node:20.2.0 as build WORKDIR /app COPY . /app @@ -13,4 +12,4 @@ COPY --from=build /app/build /usr/share/nginx/html COPY .docker/nginx/ /etc/nginx/ COPY .docker/scripts/ /etc/scripts/ EXPOSE 5000 -CMD ["sh","/etc/scripts/startup.sh"] +CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file From 321b1e723099a082083b828ff1fa1a5097c0cfe4 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 14:20:08 +0200 Subject: [PATCH 10/35] . --- Dockerfile.prod | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index dec010fb2..2559aac77 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,9 +1,9 @@ # build environment FROM node:20 as build WORKDIR /app -COPY . /app -RUN yarn install + RUN yarn build --mode=production + # production environment FROM docker.io/nginxinc/nginx-unprivileged:alpine @@ -12,6 +12,7 @@ WORKDIR /app COPY --from=build /app/build /usr/share/nginx/html COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf COPY .docker/scripts/ /etc/scripts/ + # Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) USER 0 RUN chown -R nginx /usr/share/nginx/html \ @@ -19,4 +20,5 @@ RUN chown -R nginx /usr/share/nginx/html \ USER 9999 EXPOSE 5000 + CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file From 5d5a51eb30f3bc440edd0b52273c29b902dac76b Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 14:22:07 +0200 Subject: [PATCH 11/35] . --- Dockerfile.prod | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index 2559aac77..dec010fb2 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,9 +1,9 @@ # build environment FROM node:20 as build WORKDIR /app - +COPY . /app +RUN yarn install RUN yarn build --mode=production - # production environment FROM docker.io/nginxinc/nginx-unprivileged:alpine @@ -12,7 +12,6 @@ WORKDIR /app COPY --from=build /app/build /usr/share/nginx/html COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf COPY .docker/scripts/ /etc/scripts/ - # Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) USER 0 RUN chown -R nginx /usr/share/nginx/html \ @@ -20,5 +19,4 @@ RUN chown -R nginx /usr/share/nginx/html \ USER 9999 EXPOSE 5000 - CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file From db52e9ad5c9a83d0997ba261288e8616df116cfa Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 14:32:25 +0200 Subject: [PATCH 12/35] . --- .docker/Dockerfile | 1 + .docker/nginx/conf.d/default.conf | 1 + .dockerignore | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index d700813b8..de1c089d3 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,3 +1,4 @@ +# build environment FROM node:20.2.0 as build WORKDIR /app COPY . /app diff --git a/.docker/nginx/conf.d/default.conf b/.docker/nginx/conf.d/default.conf index fa7dacbc9..f5f706f50 100644 --- a/.docker/nginx/conf.d/default.conf +++ b/.docker/nginx/conf.d/default.conf @@ -6,6 +6,7 @@ server { root /usr/share/nginx/html; + # index.html fallback location / { index / index.html; diff --git a/.dockerignore b/.dockerignore index f8fe3830b..41c5f5479 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,2 @@ node_modules -build pipelines -junit.xml From a083073ba254afe8c46ae86cdb392bc3bc38be5b Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 14:44:17 +0200 Subject: [PATCH 13/35] . --- src/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.json b/src/settings.json index 9962f384c..fd2ecf097 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { - "configurationEndpoint": "https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend", + "configurationEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend", "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" } From 63aa8bdf98ade2e2c4d003a092e56509c0bb55d4 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Fri, 28 Jun 2024 14:52:58 +0200 Subject: [PATCH 14/35] . --- src/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.json b/src/settings.json index fd2ecf097..9962f384c 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { - "configurationEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend", + "configurationEndpoint": "https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend", "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" } From 195e305259bf064da3896d4ee3c099cf63fc8f2a Mon Sep 17 00:00:00 2001 From: kslazykv Date: Mon, 1 Jul 2024 07:46:26 +0200 Subject: [PATCH 15/35] . --- Dockerfile.prod | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index dec010fb2..2b882320d 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,9 +1,21 @@ # build environment FROM node:20 as build WORKDIR /app -COPY . /app +COPY package*.json ./ +COPY . . RUN yarn install + +ENV VITE_AUTH_CLIENT="50b15344-28c9-45b5-9616-41da16fc9dcc" +ENV VITE_AUTHORITY="https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0" +ENV VITE_CONFIG_SCOPE="api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read" +ENV VITE_BASE_URL_MAIN="https://pcs-main-prod.azurewebsites.net/api" +ENV VITE_CONFIG_ENDPOINT="https://pcs-config-prod-func.azurewebsites.net/api/Frontend/Configuration?" +ENV VITE_WEBAPI_SCOPE="api://47641c40-0135-459b-8ab4-459e68dc8d08/web_api" +ENV VITE_APP_INSIGHTS="ed1e9f1c-5b68-44ca-afec-76ece1f08f80" +ENV VITE_API_VERSION="&api-version=4.1" + RUN yarn build --mode=production + # production environment FROM docker.io/nginxinc/nginx-unprivileged:alpine @@ -12,6 +24,7 @@ WORKDIR /app COPY --from=build /app/build /usr/share/nginx/html COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf COPY .docker/scripts/ /etc/scripts/ + # Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) USER 0 RUN chown -R nginx /usr/share/nginx/html \ @@ -19,4 +32,5 @@ RUN chown -R nginx /usr/share/nginx/html \ USER 9999 EXPOSE 5000 + CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file From 0c80abb239af846ad3b6284f32fef2aeadffdde6 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Mon, 1 Jul 2024 07:55:53 +0200 Subject: [PATCH 16/35] . --- .eslintignore | 2 +- .gitignore | 3 +-- Dockerfile.dev | 36 +++++++++++++++++++++++++++++++++++ Dockerfile.test | 37 ++++++++++++++++++++++++++++++++++++ pipelines/frontend-build.yml | 2 +- radixconfig.yaml | 3 +-- src/settings.json | 2 +- 7 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 Dockerfile.dev create mode 100644 Dockerfile.test diff --git a/.eslintignore b/.eslintignore index 0ca596a61..139e61738 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,4 +2,4 @@ /*.js # Ignore storybook build -storybook-static/ +storybook-static/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 24bd67e78..733975b55 100644 --- a/.gitignore +++ b/.gitignore @@ -52,7 +52,6 @@ typings/ # Sensitive files #settings.json - #VS Code folder .vscode/ -.vs/slnx.sqlite +.vs/slnx.sqlite \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 000000000..c5e1c8b3f --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,36 @@ +# build environment +FROM node:20 as build +WORKDIR /app +COPY package*.json ./ +COPY . . +RUN yarn install + +ENV VITE_AUTH_CLIENT="30a25122-c22c-4a5c-a7b8-366d31cb2c46" +ENV VITE_AUTHORITY="https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0" +ENV VITE_CONFIG_SCOPE="api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read" +ENV VITE_BASE_URL_MAIN="https://pcs-main-api-dev-pr.azurewebsites.net/api" +ENV VITE_CONFIG_ENDPOINT="https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend/Configuration?" +ENV VITE_WEBAPI_SCOPE="api://47641c40-0135-459b-8ab4-459e68dc8d08/web_api" +ENV VITE_APP_INSIGHTS="cdb49dda-63f9-433d-99f3-c73dff5dc6a1" +ENV VITE_API_VERSION="&api-version=4.1" + +RUN yarn build --mode=production + +# production environment +FROM docker.io/nginxinc/nginx-unprivileged:alpine + +WORKDIR /app +## add permissions for nginx user +COPY --from=build /app/build /usr/share/nginx/html +COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf +COPY .docker/scripts/ /etc/scripts/ + +# Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) +USER 0 +RUN chown -R nginx /usr/share/nginx/html \ + && chown -R nginx /etc/nginx/conf.d +USER 9999 + +EXPOSE 5000 + +CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file diff --git a/Dockerfile.test b/Dockerfile.test new file mode 100644 index 000000000..1bde8b1bb --- /dev/null +++ b/Dockerfile.test @@ -0,0 +1,37 @@ +# build environment +FROM node:20 as build +WORKDIR /app +COPY package*.json ./ +COPY . . +RUN yarn install + +ENV VITE_AUTH_CLIENT="23d8e04c-9362-4870-bda2-dade6f9d0ffb" +ENV VITE_AUTHORITY="https://login.microsoftonline.com/3aa4a235-b6e2-48d5-9195-7fcf05b459b0" +ENV VITE_CONFIG_SCOPE="api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read" +ENV VITE_BASE_URL_MAIN="https://pcs-main-api-test.azurewebsites.net/api" +ENV VITE_CONFIG_ENDPOINT="https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend/Configuration?" +ENV VITE_WEBAPI_SCOPE="api://47641c40-0135-459b-8ab4-459e68dc8d08/web_api" +ENV VITE_APP_INSIGHTS="2e63710e-308d-45c2-99b0-95a959a3de5a" +ENV VITE_API_VERSION="&api-version=4.1" + +RUN yarn build --mode=production + + +# production environment +FROM docker.io/nginxinc/nginx-unprivileged:alpine + +WORKDIR /app +## add permissions for nginx user +COPY --from=build /app/build /usr/share/nginx/html +COPY .docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf +COPY .docker/scripts/ /etc/scripts/ + +# Change the user from root to non-root- From now on, all Docker commands are run as non-root user (except for COPY) +USER 0 +RUN chown -R nginx /usr/share/nginx/html \ + && chown -R nginx /etc/nginx/conf.d +USER 9999 + +EXPOSE 5000 + +CMD ["sh","/etc/scripts/startup.sh"] \ No newline at end of file diff --git a/pipelines/frontend-build.yml b/pipelines/frontend-build.yml index 527cd2fdd..4aaa177a4 100644 --- a/pipelines/frontend-build.yml +++ b/pipelines/frontend-build.yml @@ -137,4 +137,4 @@ stages: parameters: fromEnvironment: $(radixPromoteFromEnv) toEnvironment: $(envName) - deploymentName: $(radixJobName) + deploymentName: $(radixJobName) \ No newline at end of file diff --git a/radixconfig.yaml b/radixconfig.yaml index fe430f732..133779c14 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -1,8 +1,8 @@ + apiVersion: radix.equinor.com/v1 kind: RadixApplication metadata: name: procosys-js-frontend - spec: environments: - name: dev @@ -36,4 +36,3 @@ spec: variables: configurationEndpoint: 'https://pcs-config-prod-func.azurewebsites.net/api/Frontend' configurationScope: 'api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read' - diff --git a/src/settings.json b/src/settings.json index 9962f384c..1b95f6ae3 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { "configurationEndpoint": "https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend", "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" -} +} \ No newline at end of file From 2d0caba971d3707291dda3fa5e7635dc7911d34d Mon Sep 17 00:00:00 2001 From: kslazykv Date: Mon, 1 Jul 2024 08:05:42 +0200 Subject: [PATCH 17/35] . --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 41c5f5479..a95d544f4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,3 @@ node_modules -pipelines +build +junit.xml \ No newline at end of file From 8ec000fe26ea038d146abd84a1c63b57c3e6a583 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Mon, 1 Jul 2024 08:38:43 +0200 Subject: [PATCH 18/35] . --- src/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.json b/src/settings.json index 1b95f6ae3..18129caf5 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { - "configurationEndpoint": "https://pcs-config-non-prod-func.azurewebsites.net/api/Frontend", + "configurationEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend", "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" } \ No newline at end of file From 2676db00fbe5fedfe1228e8698bc0f7a04e00503 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Mon, 1 Jul 2024 11:37:48 +0200 Subject: [PATCH 19/35] . --- src/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.json b/src/settings.json index 18129caf5..06a819241 100644 --- a/src/settings.json +++ b/src/settings.json @@ -1,4 +1,4 @@ { "configurationEndpoint": "https://pcs-config-prod-func.azurewebsites.net/api/Frontend", - "configurationScope": "api://0708e202-b5ad-4d95-9735-a631c715d6a9/Read" + "configurationScope": "api://756f2a23-f54d-4643-bb49-62c0db4802ae/Read" } \ No newline at end of file From 7da3f8cf25f577cfa954b56ff621ff877981cb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Petter=20Gj=C3=B8se?= Date: Mon, 8 Jul 2024 11:50:38 +0200 Subject: [PATCH 20/35] fix: update ingress (#833) --- radixconfig.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/radixconfig.yaml b/radixconfig.yaml index 133779c14..582534283 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -4,6 +4,15 @@ kind: RadixApplication metadata: name: procosys-js-frontend spec: + dnsExternalAlias: + - alias: procosystest.equinor.com + component: frontend + environment: test + useCertificateAutomation: true + - alias: procosys.equinor.com + component: frontend + environment: prod + useCertificateAutomation: true environments: - name: dev build: From a06cbbf8f643502ffde5c5c94f8be7c4b0987003 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Thu, 11 Jul 2024 11:58:34 +0200 Subject: [PATCH 21/35] rename --- radixconfig.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radixconfig.yaml b/radixconfig.yaml index 582534283..1cffb2926 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -2,7 +2,7 @@ apiVersion: radix.equinor.com/v1 kind: RadixApplication metadata: - name: procosys-js-frontend + name: procosys-preservation-ipo spec: dnsExternalAlias: - alias: procosystest.equinor.com From 45e8ec73517c7e85eb82d9ed5632f19d497ea3d0 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Thu, 11 Jul 2024 12:32:09 +0200 Subject: [PATCH 22/35] deleted dnsExternalAlias --- radixconfig.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/radixconfig.yaml b/radixconfig.yaml index 1cffb2926..35e1af1f0 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -4,15 +4,6 @@ kind: RadixApplication metadata: name: procosys-preservation-ipo spec: - dnsExternalAlias: - - alias: procosystest.equinor.com - component: frontend - environment: test - useCertificateAutomation: true - - alias: procosys.equinor.com - component: frontend - environment: prod - useCertificateAutomation: true environments: - name: dev build: From 8891e58c67a409bd2935dd54486c879193bd2f3a Mon Sep 17 00:00:00 2001 From: kslazykv Date: Mon, 15 Jul 2024 08:40:11 +0200 Subject: [PATCH 23/35] rename --- radixconfig.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radixconfig.yaml b/radixconfig.yaml index 35e1af1f0..788318538 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -2,7 +2,7 @@ apiVersion: radix.equinor.com/v1 kind: RadixApplication metadata: - name: procosys-preservation-ipo + name: procosys-frontend spec: environments: - name: dev From f8090914e31c6b3bae26a8ec3b8b1bb3320e3912 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Tue, 16 Jul 2024 09:43:10 +0200 Subject: [PATCH 24/35] added packages --- yarn.lock | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6a13dec51..ad4fdcdaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14141,14 +14141,10 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== -loader-utils@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.3.tgz#d4b15b8504c63d1fc3f2ade52d41bc8459d6ede1" - integrity sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" +loader-utils@3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.1.tgz#4fb104b599daafd82ef3e1a41fb9265f87e1f576" + integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== loader-utils@^1.2.3: version "1.4.0" @@ -16249,10 +16245,10 @@ pretty-hrtime@^1.0.3: resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= -prismjs@1.25.0: - version "1.25.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756" - integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg== +prismjs@1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" + integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== prismjs@^1.8.4: version "1.23.0" @@ -16463,6 +16459,13 @@ pure-rand@^6.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== +qs@6.10.3: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + qs@6.11.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -16475,11 +16478,6 @@ qs@6.7.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -qs@6.9.7: - version "6.9.7" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" - integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== - qs@^6.10.0, qs@^6.6.0: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" From d4b79b151c5c616c0185a1f8111b386f9364b904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Petter=20Gj=C3=B8se?= Date: Wed, 31 Jul 2024 10:32:56 +0200 Subject: [PATCH 25/35] Update radixconfig.yaml added dnsExternalAlias --- radixconfig.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/radixconfig.yaml b/radixconfig.yaml index 788318538..ec260211d 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -4,6 +4,19 @@ kind: RadixApplication metadata: name: procosys-frontend spec: + dnsExternalAlias: + - alias: procosystest.equinor.com + component: frontend + environment: test + useCertificateAutomation: true + - alias: procosys.equinor.com + component: frontend + environment: prod + useCertificateAutomation: true + - alias: tasktop.equinor.com + component: frontend + environment: prod + useCertificateAutomation: true environments: - name: dev build: From d35ec48c4a41ca139145ec096a67eb4f8f00e2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Petter=20Gj=C3=B8se?= Date: Wed, 31 Jul 2024 10:44:26 +0200 Subject: [PATCH 26/35] removing testing ingress --- radixconfig.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/radixconfig.yaml b/radixconfig.yaml index ec260211d..4772334a6 100644 --- a/radixconfig.yaml +++ b/radixconfig.yaml @@ -13,10 +13,6 @@ spec: component: frontend environment: prod useCertificateAutomation: true - - alias: tasktop.equinor.com - component: frontend - environment: prod - useCertificateAutomation: true environments: - name: dev build: From f10d55af7d8c620e93cbc618899ef2416e3ec8c5 Mon Sep 17 00:00:00 2001 From: kslazykv Date: Thu, 21 Nov 2024 08:26:57 +0100 Subject: [PATCH 27/35] fixed colors --- src/modules/Header/index.tsx | 2 +- src/modules/Header/style.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/Header/index.tsx b/src/modules/Header/index.tsx index e9dbd0231..8910c4ff0 100644 --- a/src/modules/Header/index.tsx +++ b/src/modules/Header/index.tsx @@ -278,7 +278,7 @@ const Header: React.FC = (): JSX.Element => { let counter = 0; return ( -
+