From 01a5a152d4c6c664cdc69d49736d3b8faef0ec89 Mon Sep 17 00:00:00 2001 From: Mnickii Date: Wed, 27 Mar 2024 17:19:51 +0300 Subject: [PATCH 1/7] onboard release repository --- azure-pipelines.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 76089c13c6..d33869f824 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -63,6 +63,9 @@ resources: type: git name: 1ESPipelineTemplates/1ESPipelineTemplates ref: refs/tags/release + - repository: ReleasePipelines + type: git + name: "Graph Developer Experiences/release-pipelines" extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates @@ -71,6 +74,12 @@ extends: name: Azure-Pipelines-1ESPT-ExDShared image: windows-latest os: windows + + sdl: + sourceRepositoriesToScan: + exclude: + - repository: ReleasePipelines + customBuildTags: - ES365AIMigrationTooling @@ -259,4 +268,9 @@ extends: - output: pipelineArtifact displayName: 'Publish Artifact: drop' targetPath: "$(build.ArtifactStagingDirectory)/build" - artifactName: drop \ No newline at end of file + artifactName: drop + + - template: pipelines/templates/checkout-and-copy-1es.yml@ReleasePipelines + parameters: + directory: 'microsoft-graph-explorer' + repoName: ReleasePipelines From 352e7b00a3d7cd654f4b4a7204dddef93ca3acc2 Mon Sep 17 00:00:00 2001 From: Mnickii Date: Mon, 8 Apr 2024 11:28:56 +0300 Subject: [PATCH 2/7] change dfolder name --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d33869f824..de04c5e127 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -272,5 +272,5 @@ extends: - template: pipelines/templates/checkout-and-copy-1es.yml@ReleasePipelines parameters: - directory: 'microsoft-graph-explorer' + directory: 'microsoft-graph-explorer-v4' repoName: ReleasePipelines From e65011ad17befe8a03de7a0a0343e85a60ce80a0 Mon Sep 17 00:00:00 2001 From: Mnickii Date: Tue, 16 Apr 2024 12:30:04 +0300 Subject: [PATCH 3/7] update azure-pipelines --- azure-pipelines.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index de04c5e127..316a0277e3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -178,7 +178,7 @@ extends: - job: Three displayName: "Publish artifacts" dependsOn: One - condition: and(succeeded(), or(eq(variables['isMaster'], 'true'), eq(variables['isDev'], 'true'))) + # condition: and(succeeded(), or(eq(variables['isMaster'], 'true'), eq(variables['isDev'], 'true'))) steps: - task: NodeTool@0 inputs: @@ -259,6 +259,14 @@ extends: contents: node_modules displayName: "Delete node_modules" + - task: ArchiveFiles@2 + inputs: + rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/build' + includeRootFolder: true + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/build/graph-explorer.zip' + replaceExistingArchive: true + templateContext: outputs: - output: pipelineArtifact @@ -274,3 +282,4 @@ extends: parameters: directory: 'microsoft-graph-explorer-v4' repoName: ReleasePipelines + dependsOn: ['Three'] From 635226606667ef7b3ebc7dd4a552a7f4cfbc0b8f Mon Sep 17 00:00:00 2001 From: Mnickii Date: Wed, 17 Apr 2024 16:13:02 +0300 Subject: [PATCH 4/7] update azure-pipelines --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 316a0277e3..832c3ad15e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -178,6 +178,7 @@ extends: - job: Three displayName: "Publish artifacts" dependsOn: One + # Test deployment # condition: and(succeeded(), or(eq(variables['isMaster'], 'true'), eq(variables['isDev'], 'true'))) steps: - task: NodeTool@0 From e8e21c3dd20c3de1c7e4bd82d7504642420b8dda Mon Sep 17 00:00:00 2001 From: thewahome Date: Fri, 3 May 2024 15:16:47 +0300 Subject: [PATCH 5/7] set REACT_APP_DEVX_API_URL environment variable --- .github/workflows/linter.yml | 1 + azure-pipelines.yml | 1 + src/app/services/graph-constants.ts | 1 - src/app/services/reducers/devxApi-reducers.ts | 3 +-- src/telemetry/filters.ts | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 9d916999df..16d3addadb 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -185,6 +185,7 @@ jobs: REACT_APP_NOMINATION_PERIOD: ${{secrets.REACT_APP_NOMINATION_PERIOD}} REACT_APP_COOLDOWN_PERIOD: ${{secrets.REACT_APP_COOLDOWN_PERIOD}} REACT_APP_USAGE_TIME: ${{secrets.REACT_APP_USAGE_TIME}} + REACT_APP_DEVX_API_URL: ${{secrets.REACT_APP_DEVX_API_URL}} CI: false id: builddeploy uses: Azure/static-web-apps-deploy@v0.0.1-preview diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 832c3ad15e..248968d118 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -162,6 +162,7 @@ extends: REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD) REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD) REACT_APP_USAGE_TIME: $(REACT_APP_USAGE_TIME) + REACT_APP_DEVX_API_URL: $(REACT_APP_DEVX_API_URL) PLAYWRIGHT_TESTS_BASE_URL: $(PLAYWRIGHT_TESTS_BASE_URL) PLAYWRIGHT_TESTS_USERNAME: $(PLAYWRIGHT_TESTS_USERNAME) PLAYWRIGHT_TESTS_PASSWORD: $(PLAYWRIGHT_TESTS_PASSWORD) diff --git a/src/app/services/graph-constants.ts b/src/app/services/graph-constants.ts index c1ff4ad76b..bdc5315221 100644 --- a/src/app/services/graph-constants.ts +++ b/src/app/services/graph-constants.ts @@ -5,7 +5,6 @@ export const BETA_USER_INFO_URL = `${GRAPH_URL}/beta/me/profile`; export const USER_PICTURE_URL = `${GRAPH_URL}/beta/me/photo/$value`; export const AUTH_URL = 'https://login.microsoftonline.com'; export const DEFAULT_USER_SCOPES = 'openid profile User.Read'; -export const DEVX_API_URL = 'https://graphexplorerapi.azurewebsites.net'; export const GRAPH_API_SANDBOX_URL = 'https://proxy.apisandbox.msdn.microsoft.com/svc'; export const GRAPH_API_SANDBOX_ENDPOINT_URL = diff --git a/src/app/services/reducers/devxApi-reducers.ts b/src/app/services/reducers/devxApi-reducers.ts index 227ad1a3c6..f58be799c7 100644 --- a/src/app/services/reducers/devxApi-reducers.ts +++ b/src/app/services/reducers/devxApi-reducers.ts @@ -1,10 +1,9 @@ import { AppAction } from '../../../types/action'; import { IDevxAPI } from '../../../types/devx-api'; -import { DEVX_API_URL } from '../graph-constants'; import { SET_DEVX_API_URL_SUCCESS } from '../redux-constants'; const initialState: IDevxAPI = { - baseUrl: DEVX_API_URL, + baseUrl: process.env.REACT_APP_DEVX_API_URL || '', parameters: '' }; export function devxApi(state: IDevxAPI = initialState, action: AppAction): any { diff --git a/src/telemetry/filters.ts b/src/telemetry/filters.ts index d7893c4a11..1b4670e395 100644 --- a/src/telemetry/filters.ts +++ b/src/telemetry/filters.ts @@ -1,6 +1,5 @@ import { ITelemetryItem } from '@microsoft/applicationinsights-web'; import { - DEVX_API_URL, GRAPH_API_SANDBOX_URL, GRAPH_TOOOLKIT_EXAMPLE_URL, GRAPH_URL, @@ -32,10 +31,11 @@ export function filterRemoteDependencyData(envelope: ITelemetryItem): boolean { const urlObject = new URL(baseData.target || ''); const graphProxyUrl = store.getState()?.proxyUrl; + const devxApiUrl = process.env.REACT_APP_DEVX_API_URL || ''; const targetsToInclude = [ GRAPH_URL, - DEVX_API_URL, + new URL(devxApiUrl).origin, GRAPH_API_SANDBOX_URL, new URL(graphProxyUrl).origin, new URL(GRAPH_TOOOLKIT_EXAMPLE_URL).origin, From 5b20155953297b7593ca8ffeeca96958d4525fd4 Mon Sep 17 00:00:00 2001 From: thewahome Date: Fri, 3 May 2024 15:19:34 +0300 Subject: [PATCH 6/7] set devx api parameter during publish instead of build --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 248968d118..f656cd6edb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -162,7 +162,6 @@ extends: REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD) REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD) REACT_APP_USAGE_TIME: $(REACT_APP_USAGE_TIME) - REACT_APP_DEVX_API_URL: $(REACT_APP_DEVX_API_URL) PLAYWRIGHT_TESTS_BASE_URL: $(PLAYWRIGHT_TESTS_BASE_URL) PLAYWRIGHT_TESTS_USERNAME: $(PLAYWRIGHT_TESTS_USERNAME) PLAYWRIGHT_TESTS_PASSWORD: $(PLAYWRIGHT_TESTS_PASSWORD) @@ -201,6 +200,7 @@ extends: REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD) REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD) REACT_APP_USAGE_TIME: $(REACT_APP_USAGE_TIME) + REACT_APP_DEVX_API_URL: $(REACT_APP_DEVX_API_URL) displayName: "Build static assets for staging" - task: PowerShell@2 @@ -226,6 +226,7 @@ extends: REACT_APP_NOMINATION_PERIOD: $(REACT_APP_NOMINATION_PERIOD) REACT_APP_COOLDOWN_PERIOD: $(REACT_APP_COOLDOWN_PERIOD) REACT_APP_USAGE_TIME: $(REACT_APP_USAGE_TIME) + REACT_APP_DEVX_API_URL: $(REACT_APP_DEVX_API_URL) displayName: "Build static assets for prod" - task: PowerShell@2 From 4fa41543a9356204de748911a9e282b9272c2ed6 Mon Sep 17 00:00:00 2001 From: thewahome Date: Mon, 6 May 2024 10:22:47 +0300 Subject: [PATCH 7/7] exclude root folder: resolves permission error --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f656cd6edb..1b0c1c4399 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -265,7 +265,7 @@ extends: - task: ArchiveFiles@2 inputs: rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/build' - includeRootFolder: true + includeRootFolder: false archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/build/graph-explorer.zip' replaceExistingArchive: true