Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: onboard repository to release repository #3097

Merged
merged 11 commits into from
Aug 7, 2024
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
REACT_APP_MIGRATION_PARAMETER: ${{secrets.REACT_APP_MIGRATION_PARAMETER}}
CI: false
id: builddeploy
Expand Down
30 changes: 28 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -71,6 +74,12 @@ extends:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows

sdl:
sourceRepositoriesToScan:
exclude:
- repository: ReleasePipelines

customBuildTags:
- ES365AIMigrationTooling

Expand Down Expand Up @@ -169,7 +178,8 @@ extends:
- job: Three
displayName: "Publish artifacts"
dependsOn: One
condition: and(succeeded(), or(eq(variables['isMaster'], 'true'), eq(variables['isDev'], 'true')))
# Test deployment
# condition: and(succeeded(), or(eq(variables['isMaster'], 'true'), eq(variables['isDev'], 'true')))
steps:
- task: NodeTool@0
inputs:
Expand All @@ -190,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)
REACT_APP_MIGRATION_PARAMETER: $(REACT_APP_MIGRATION_PARAMETER)
displayName: "Build static assets for staging"

Expand All @@ -216,6 +227,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)
REACT_APP_MIGRATION_PARAMETER: $(REACT_APP_MIGRATION_PARAMETER)
displayName: "Build static assets for prod"

Expand Down Expand Up @@ -252,6 +264,14 @@ extends:
contents: node_modules
displayName: "Delete node_modules"

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.ArtifactStagingDirectory)/build'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/build/graph-explorer.zip'
replaceExistingArchive: true

templateContext:
outputs:
- output: pipelineArtifact
Expand All @@ -261,4 +281,10 @@ extends:
- output: pipelineArtifact
displayName: 'Publish Artifact: drop'
targetPath: "$(build.ArtifactStagingDirectory)/build"
artifactName: drop
artifactName: drop

- template: pipelines/templates/checkout-and-copy-1es.yml@ReleasePipelines
parameters:
directory: 'microsoft-graph-explorer-v4'
repoName: ReleasePipelines
dependsOn: ['Three']
1 change: 0 additions & 1 deletion src/app/services/graph-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
3 changes: 1 addition & 2 deletions src/app/services/reducers/devxApi-reducers.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/telemetry/filters.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ITelemetryItem } from '@microsoft/applicationinsights-web';
import {
DEVX_API_URL,
GRAPH_API_SANDBOX_URL,
GRAPH_TOOOLKIT_EXAMPLE_URL,
GRAPH_URL,
Expand Down Expand Up @@ -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,
Expand Down
Loading