Skip to content

Commit 91048f4

Browse files
authored
Merge pull request #645 from microsoftgraph/andrueasmtna/tests
security: pipeline compliance
2 parents c055a39 + 2cf339a commit 91048f4

File tree

3 files changed

+76
-105
lines changed

3 files changed

+76
-105
lines changed
Lines changed: 76 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,85 @@
1-
# Typescript Typings V1 npm build and release pipeline
1+
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
2+
# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected.
3+
# This pipeline will be extended to the OneESPT template
4+
# The pool section has been filled with placeholder values, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage
25
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
3-
46
trigger:
57
branches:
68
include:
7-
- main
9+
- main
810
paths:
911
include:
10-
- microsoft-graph.d.ts
11-
12+
- microsoft-graph.d.ts
1213
pr: none
14+
resources:
15+
repositories:
16+
- repository: 1ESPipelineTemplates
17+
type: git
18+
name: 1ESPipelineTemplates/1ESPipelineTemplates
19+
ref: refs/tags/release
20+
extends:
21+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
22+
parameters:
23+
pool:
24+
name: Azure-Pipelines-1ESPT-ExDShared
25+
image: windows-latest
26+
os: windows
27+
customBuildTags:
28+
- ES365AIMigrationTooling
29+
stages:
30+
- stage: build
31+
jobs:
32+
- job: job
33+
templateContext:
34+
outputs:
35+
- output: pipelineArtifact
36+
displayName: 'Publish Artifact drop'
37+
targetPath: '$(Build.ArtifactStagingDirectory)'
38+
artifactName: build-drop
39+
steps:
40+
- checkout: self
41+
displayName: checkout main
42+
- task: CopyFiles@2
43+
displayName: 'Copy Files to staging directory'
44+
inputs:
45+
SourceFolder: '$(System.DefaultWorkingDirectory)'
46+
Contents: |
47+
**/*
48+
!spec/**
49+
!.azure-pipelines/**
50+
!.github/**
51+
!.git/**
52+
!.vscode/**
53+
!typings-demo.gif
54+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
1355

14-
pool:
15-
vmImage: windows-latest
16-
17-
steps:
18-
19-
- checkout: self
20-
displayName: checkout main
21-
22-
- template: ./common-templates/security-pre-checks.yml
23-
- task: CopyFiles@2
24-
displayName: 'Copy Files to staging directory'
25-
inputs:
26-
SourceFolder: '$(System.DefaultWorkingDirectory)'
27-
Contents: |
28-
**/*
29-
!spec/**
30-
!.azure-pipelines/**
31-
!.github/**
32-
!.git/**
33-
!.vscode/**
34-
!typings-demo.gif
35-
TargetFolder: '$(Build.ArtifactStagingDirectory)'
36-
37-
- task: PublishBuildArtifacts@1
38-
displayName: 'Publish Artifact: drop'
3956

40-
- template: ./common-templates/security-post-checks.yml
57+
- stage: deploy
58+
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
59+
jobs:
60+
- deployment: deploy_npm
61+
pool:
62+
name: Azure-Pipelines-1ESPT-ExDShared
63+
os: windows
64+
image: windows-latest
65+
dependsOn: []
66+
environment: msgraph-npm-org
67+
strategy:
68+
runOnce:
69+
deploy:
70+
steps:
71+
- download: current
72+
artifact: build-drop
73+
- task: EsrpRelease@5
74+
inputs:
75+
ConnectedServiceName: 'MsGraph-ESRP-Publisher-Service-Connection'
76+
Intent: 'PackageDistribution'
77+
ContentType: 'npm'
78+
ContentSource: 'Folder'
79+
FolderLocation: $(Pipeline.Workspace)/build-drop/
80+
WaitForReleaseCompletion: true
81+
82+
83+
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
84+
MainPublisher: 'ESRPRELPACMAN'
85+
DomainTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2'

.azure-pipelines/common-templates/security-post-checks.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.azure-pipelines/common-templates/security-pre-checks.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)