Skip to content

Commit 35a4b7b

Browse files
Build pipeline for main branch. (#350)
* build pipeline with component governance * Apply suggestions from code review Co-authored-by: Michael Mainer <MIchaelMainer@users.noreply.github.com> * path of file [skip ci] --------- Co-authored-by: Michael Mainer <MIchaelMainer@users.noreply.github.com>
1 parent e332803 commit 35a4b7b

File tree

4 files changed

+116
-4
lines changed

4 files changed

+116
-4
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Typescript Typings V1 npm build and release pipeline
2+
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
3+
4+
trigger:
5+
branches:
6+
include:
7+
- main
8+
paths:
9+
include:
10+
- microsoft-graph.d.ts
11+
12+
pr: none
13+
14+
pool:
15+
vmImage: windows-latest
16+
17+
steps:
18+
19+
- script: git checkout main
20+
- template: ./common-templates/security-pre-checks.yml
21+
- task: CopyFiles@2
22+
displayName: 'Copy Files to staging directory'
23+
inputs:
24+
SourceFolder: '$(System.DefaultWorkingDirectory)'
25+
Contents: |
26+
**/*
27+
!spec/**
28+
!.azure-pipelines/**
29+
!.github/**
30+
!.git/**
31+
!.vscode/**
32+
!typings-demo.gif
33+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
34+
35+
- task: PublishBuildArtifacts@1
36+
displayName: 'Publish Artifact: drop'
37+
38+
- template: ./common-templates/security-post-checks.yml
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
steps:
4+
- task: CodesignValidation@0
5+
6+
- task: SdtReport@1
7+
displayName: "Security Analysis Report"
8+
continueOnError: true
9+
condition: succeededOrFailed()
10+
inputs:
11+
AllTools: false
12+
APIScan: false
13+
BinSkim: false
14+
BinSkimBreakOn: "WarningAbove"
15+
CodesignValidation: false
16+
CodesignValidationBreakOn: "WarningAbove"
17+
CredScan: true
18+
FortifySCA: false
19+
FxCop: false
20+
ModernCop: false
21+
MSRD: false
22+
PoliCheck: true
23+
PoliCheckBreakOn: "Severity1"
24+
RoslynAnalyzers: false
25+
RoslynAnalyzersBreakOn: "WarningAbove"
26+
SDLNativeRules: false
27+
Semmle: false
28+
TSLint: false
29+
TSLintBreakOn: "WarningAbove"
30+
ToolLogsNotFoundAction: "Standard"
31+
32+
- task: PublishSecurityAnalysisLogs@3
33+
displayName: "Publish Security Analysis Logs"
34+
inputs:
35+
ArtifactName: "CodeAnalysisLogs"
36+
ArtifactType: "Container"
37+
AllTools: false
38+
AntiMalware: false
39+
APIScan: false
40+
BinSkim: false
41+
CodesignValidation: false
42+
CredScan: true
43+
FortifySCA: false
44+
FxCop: false
45+
ModernCop: true
46+
MSRD: false
47+
PoliCheck: true
48+
RoslynAnalyzers: false
49+
SDLNativeRules: false
50+
Semmle: false
51+
TSLint: true
52+
WebScout: false
53+
ToolLogsNotFoundAction: "Standard"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
steps:
4+
- task: CredScan@2
5+
displayName: "Run CredScan"
6+
inputs:
7+
debugMode: false
8+
batchSize: 20
9+
toolMajorVersion: "V2"
10+
searchersFileType: "Skype"
11+
12+
- task: PoliCheck@1
13+
displayName: "Run PoliCheck"
14+
condition: and(succeeded(), eq(eq(variables['Build.SourceBranch'], 'refs/heads/main'), false))
15+
inputs:
16+
targetType: F
17+
SOMEnabled: true
18+
optionsFC: 0
19+
optionsXS: 0
20+
optionsHMENABLE: 0
21+
continueOnError: true

.github/workflows/create-v1.0-pull-request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
# This action will automatically create a pull request against master if the pushed branch
4+
# This action will automatically create a pull request against main if the pushed branch
55
# has a branch path spec like 1.0/pipelinebuild/*. Configure this action by updating the
6-
# environment variable values[0].
6+
# environment variable values[0].
77

88
name: "create pull request"
99

@@ -36,11 +36,11 @@ jobs:
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
MESSAGE_TITLE: Generated v1.0 typings using Typewriter
39-
MESSAGE_BODY: "This pull request was automatically created by the GitHub Action, **${{github.workflow}}**. \n\n The commit hash is _${{github.sha}}_. \n\n **Important** Check for unexpected deletions or changes in this PR. Make sure to bump the version. Create a GitHub release after releasing on npm and [DefinitelyTyped](http://definitelytyped.org/guides/contributing.html). \n\n cc: @darrelmiller"
39+
MESSAGE_BODY: "This pull request was automatically created by the GitHub Action, **${{github.workflow}}**. \n\n The commit hash is _${{github.sha}}_. \n\n **Important** Check for unexpected deletions or changes in this PR. Make sure to bump the version. Create a GitHub release after releasing on npm and [DefinitelyTyped](http://definitelytyped.org/guides/contributing.html). \n\n"
4040
REVIEWERS: peombwa,ddyett,zengin,MIchaelMainer
4141
ASSIGNEDTO: nikithauc
4242
LABELS: generated
43-
BASE: master
43+
BASE: main
4444
run: |
4545
curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1
4646
bin/hub pull-request -b "$BASE" -h "$GITHUB_REF" -m "$MESSAGE_TITLE" -m "$MESSAGE_BODY" -r "$REVIEWERS" -a "$ASSIGNEDTO" -l "$LABELS"

0 commit comments

Comments
 (0)