Skip to content

Commit 2b068ab

Browse files
Nightly build refinements (#649)
* Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Builds validation disabled * Some more refactoring * Bug fixes * fix * fix * some clean-up * Some more teplate clean-up * Reset the test configuration * Refreshing trigger details
1 parent 82269fa commit 2b068ab

4 files changed

+151
-88
lines changed

azure-pipelines-functional.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# A pipeline with no CI trigger
2+
trigger: none
3+
14
pr:
25
branches:
36
include:

azure-pipelines-nightly.yml

+67-21
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,75 @@
1+
# A pipeline with no CI trigger
2+
trigger: none
3+
4+
pr: none
5+
6+
schedules:
7+
- cron: "0 0 * * *" # cron syntax https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#scheduled-triggers
8+
displayName: Cosmos Nightly
9+
branches:
10+
include: master
11+
always: boolean # whether to always run the pipeline or only if there have been source code changes since the last run. The default is false
12+
13+
114
variables:
215
ReleaseArguments: ' --filter "TestCategory!=Quarantine" --verbosity normal '
316
VmImage: vs2017-win2016 # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
417
BuildConfiguration: Release
18+
IsNightly: true
19+
520

21+
stages:
22+
- stage:
23+
displayName: Gate
24+
jobs:
25+
- template: templates/static-tools.yml
26+
parameters:
27+
BuildConfiguration: $(BuildConfiguration)
28+
VmImage: $(VmImage)
629

7-
jobs:
8-
#- template: templates/build-test.yml
9-
# parameters:
10-
# BuildConfiguration: $(BuildConfiguration)
11-
# Arguments: $(ReleaseArguments)
12-
# VmImage: $(VmImage)
1330

14-
- task: DotNetCoreCLI@2
15-
displayName: Microsoft.Azure.Cosmos
16-
inputs:
17-
command: build
18-
configuration: $(BuildConfiguration)
19-
projects: 'Microsoft.Azure.Cosmos/src/*.csproj'
20-
arguments: ${{ parameters.ReleaseArguments }} --configuration $(BuildConfiguration) /p:IsNightly=true /p:GeneratePackageOnBuild=true
31+
- template: templates/build-test.yml
32+
parameters:
33+
BuildConfiguration: $(BuildConfiguration)
34+
Arguments: $(ReleaseArguments) /p:IsNightly=true /p:GeneratePackageOnBuild=true
35+
VmImage: $(VmImage)
36+
37+
38+
- stage:
39+
displayName: Publish
40+
jobs:
41+
- job:
42+
pool:
43+
vmImage: $(VmImage)
2144

22-
steps:
23-
- task: NuGetCommand@2
24-
displayName: 'NuGet push'
25-
inputs:
26-
command: push
27-
configuration: '$(BuildConfiguration)'
28-
publishVstsFeed: '4000bd49-81c3-47f2-94d8-d1392b95c228/04efb628-f46d-4b48-ac4d-5af5b1c75043' #azure-cosmos-dotnet
29-
45+
steps:
46+
- task: DotNetCoreCLI@2
47+
displayName: Build Microsoft.Azure.Cosmos
48+
inputs:
49+
command: build
50+
configuration: $(BuildConfiguration)
51+
nugetConfigPath: NuGet.config
52+
projects: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj
53+
arguments: --configuration $(BuildConfiguration)
54+
versioningScheme: OFF
55+
56+
- task: DotNetCoreCLI@2
57+
displayName: Pack Microsoft.Azure.Cosmos
58+
inputs:
59+
command: pack
60+
configuration: $(BuildConfiguration)
61+
searchPatternPack: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj
62+
arguments: --configuration $(BuildConfiguration)
63+
versioningScheme: OFF
64+
65+
- task: DotNetCoreCLI@2
66+
displayName: Push Microsoft.Azure.Cosmos
67+
inputs:
68+
command: push
69+
configuration: $(BuildConfiguration)
70+
searchPatternPack: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj
71+
arguments: --configuration $(BuildConfiguration)
72+
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
73+
nuGetFeedType: 'internal'
74+
publishVstsFeed: '4000bd49-81c3-47f2-94d8-d1392b95c228/04efb628-f46d-4b48-ac4d-5af5b1c75043' #azure-cosmos-dotnet
75+
versioningScheme: OFF

azure-pipelines.yml

+8-67
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# A pipeline with no CI trigger
2+
trigger: none
3+
14
pr:
25
branches:
36
include:
@@ -14,73 +17,11 @@ variables:
1417
VmImage: vs2017-win2016 # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
1518

1619

17-
jobs:
18-
- job:
19-
displayName: Static Analysis
20-
pool:
21-
vmImage: '$(VmImage)' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
22-
23-
steps:
24-
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
25-
clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
26-
lfs: true # whether to download Git-LFS files; defaults to false
27-
28-
#Analyze source code for type of content and target types to help determine which tools to run
29-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-autoapplicability.AutoApplicability@1
30-
displayName: 'AutoApplicability'
31-
inputs:
32-
VerboseWriter: true
33-
ExternalRelease: true
34-
InternalRelease: true
35-
IsService: true
36-
IsSoftware: true
37-
38-
# Analyze source and build output text files for credentials
39-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
40-
displayName: 'CredScan'
41-
inputs:
42-
scanFolder: $(Build.SourcesDirectory)
43-
suppressionsFile: CredScanSuppressions.json
44-
debugMode: true
45-
46-
# Scan text elements including code, code comments, and content/web pages, for sensitive terms based on legal, cultural, or geopolitical reasons
47-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
48-
displayName: 'PoliCheck'
49-
inputs:
50-
targetType: F
51-
52-
# AntiMalware scan
53-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3
54-
displayName: 'AntiMalware'
55-
inputs:
56-
EnableServices: true
57-
58-
# Run checks for recently discovered vulnerabilities which are not yet incorporated to another tool
59-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-vulnerabilityassessment.VulnerabilityAssessment@0
60-
displayName: 'Vulnerability Assessment'
61-
62-
- task: DotNetCoreCLI@2
63-
displayName: Build Microsoft.Azure.Cosmos.sln
64-
inputs:
65-
command: build
66-
projects: 'Microsoft.Azure.Cosmos.sln'
67-
configuration: '$(BuildConfiguration)'
68-
publishTestResults: true
69-
70-
# - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
71-
# displayName: 'BinSkim'
72-
# inputs:
73-
# InputType: Basic
74-
75-
# Publish Analysis Results (position after all tools ran)
76-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
77-
displayName: 'Publish Security Analysis Logs'
78-
79-
# The Post-Analysis build task will analyze the log files produced by the tools, and introduce a build break
80-
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
81-
displayName: 'Post Analysis'
82-
inputs:
83-
AllTools: true
20+
jobs:
21+
- template: templates/static-tools.yml
22+
parameters:
23+
BuildConfiguration: Release
24+
VmImage: $(VmImage)
8425

8526

8627
#- template: templates/build-test.yml

templates/static-tools.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# File: templates\static-tools.yml
2+
3+
parameters:
4+
BuildConfiguration: ''
5+
VmImage: ''
6+
7+
jobs:
8+
- job:
9+
displayName: Static Analysis
10+
pool:
11+
vmImage: '${{ parameters.VmImage }}'
12+
13+
steps:
14+
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
15+
clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
16+
lfs: true # whether to download Git-LFS files; defaults to false
17+
18+
#Analyze source code for type of content and target types to help determine which tools to run
19+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-autoapplicability.AutoApplicability@1
20+
displayName: 'AutoApplicability'
21+
inputs:
22+
VerboseWriter: true
23+
ExternalRelease: true
24+
InternalRelease: true
25+
IsService: true
26+
IsSoftware: true
27+
28+
# Analyze source and build output text files for credentials
29+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
30+
displayName: 'CredScan'
31+
inputs:
32+
scanFolder: $(Build.SourcesDirectory)
33+
suppressionsFile: CredScanSuppressions.json
34+
debugMode: true
35+
36+
# Scan text elements including code, code comments, and content/web pages, for sensitive terms based on legal, cultural, or geopolitical reasons
37+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1
38+
displayName: 'PoliCheck'
39+
inputs:
40+
targetType: F
41+
42+
# AntiMalware scan
43+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3
44+
displayName: 'AntiMalware'
45+
inputs:
46+
EnableServices: true
47+
48+
# Run checks for recently discovered vulnerabilities which are not yet incorporated to another tool
49+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-vulnerabilityassessment.VulnerabilityAssessment@0
50+
displayName: 'Vulnerability Assessment'
51+
52+
- task: DotNetCoreCLI@2
53+
displayName: Build Microsoft.Azure.Cosmos.sln
54+
inputs:
55+
command: build
56+
projects: 'Microsoft.Azure.Cosmos.sln'
57+
configuration: '${{ parameters.BuildConfiguration }}'
58+
publishTestResults: true
59+
60+
# - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3
61+
# displayName: 'BinSkim'
62+
# inputs:
63+
# InputType: Basic
64+
65+
# Publish Analysis Results (position after all tools ran)
66+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
67+
displayName: 'Publish Security Analysis Logs'
68+
69+
# The Post-Analysis build task will analyze the log files produced by the tools, and introduce a build break
70+
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
71+
displayName: 'Post Analysis'
72+
inputs:
73+
AllTools: true

0 commit comments

Comments
 (0)