-
Notifications
You must be signed in to change notification settings - Fork 643
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
Add new basic ci pipeline #10215
base: main
Are you sure you want to change the base?
Add new basic ci pipeline #10215
Changes from all commits
d00471c
d91aa1e
50267c0
d402fcf
28ff88c
227d84f
e752bf9
ae47c5f
2f014a1
b988f96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
name: NuGetGallery CI $(Build.BuildId) | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- "*" | ||
pr: | ||
branches: | ||
include: | ||
- "*" | ||
|
||
variables: | ||
DOTNET_NOLOGO: true | ||
BuildConfiguration: Release | ||
nugetMultiFeedWarnLevel: none | ||
CommonPackageVersion: $(CommonAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) | ||
CommonAssemblyVersion: 5.0.0 | ||
GalleryPackageVersion: $(GalleryAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) | ||
GalleryAssemblyVersion: 5.0.0 | ||
JobsPackageVersion: $(JobsAssemblyVersion)-$(NuGetGalleryBranch)-$(Build.BuildId) | ||
JobsAssemblyVersion: 5.0.0 | ||
NuGetGalleryBranch: $(Build.SourceBranchName) | ||
|
||
pool: | ||
vmImage: 'windows-latest' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is using different pool than existing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The existing pool isn't meant for public builds |
||
|
||
stages: | ||
- stage: common | ||
displayName: NuGet.Server.Common.sln | ||
dependsOn: [] | ||
jobs: | ||
- job: build_and_test | ||
displayName: common build and test | ||
cancelTimeoutInMinutes: 1 | ||
steps: | ||
- task: PowerShell@1 | ||
name: build | ||
displayName: Build | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\build.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipGallery -SkipJobs -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) | ||
workingFolder: $(Agent.BuildDirectory) | ||
- task: PowerShell@1 | ||
name: test | ||
displayName: Run tests | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\test.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipGallery -SkipJobs | ||
workingFolder: $(Agent.BuildDirectory) | ||
- task: PublishTestResults@2 | ||
name: publish_test_results | ||
displayName: Publish test results | ||
condition: succeededOrFailed() | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: $(Agent.BuildDirectory)\Results.*.xml | ||
failTaskOnFailedTests: true | ||
|
||
- stage: gallery | ||
displayName: NuGetGallery.sln | ||
dependsOn: [] | ||
jobs: | ||
- job: build_and_test | ||
displayName: gallery build and test | ||
cancelTimeoutInMinutes: 1 | ||
steps: | ||
- task: PowerShell@1 | ||
name: build | ||
displayName: Build | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\build.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipCommon -SkipJobs -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) | ||
workingFolder: $(Agent.BuildDirectory) | ||
- task: PowerShell@1 | ||
name: test | ||
displayName: Run tests | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\test.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipCommon -SkipJobs | ||
workingFolder: $(Agent.BuildDirectory) | ||
- task: PublishTestResults@2 | ||
name: publish_test_results | ||
displayName: Publish test results | ||
condition: succeededOrFailed() | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: $(Agent.BuildDirectory)\Results.*.xml | ||
failTaskOnFailedTests: true | ||
|
||
- stage: statslogparser | ||
displayName: StatsLogPasrser | ||
dependsOn: [] | ||
jobs: | ||
- job: build_and_test | ||
displayName: statslogparser build and test | ||
cancelTimeoutInMinutes: 1 | ||
variables: | ||
PIPX_HOME: $(Agent.ToolsDirectory)\pipx | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.10' | ||
- script: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --user pipx | ||
pipx ensurepath | ||
displayName: 'Install tools' | ||
- script: | | ||
pipx install poetry | ||
poetry install | ||
poetry build | ||
poetry run pytest tests/ --cov loginterpretation --cov-report html | ||
workingDirectory: $(Agent.BuildDirectory)\python\StatsLogParser | ||
|
||
- stage: jobs | ||
displayName: NuGet.Jobs.sln | ||
dependsOn: [] | ||
jobs: | ||
- job: build_and_test | ||
displayName: jobs build and test | ||
cancelTimeoutInMinutes: 1 | ||
steps: | ||
- task: PowerShell@1 | ||
name: build | ||
displayName: Build | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\build.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipArtifacts -SkipCommon -SkipGallery -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) | ||
workingFolder: $(Agent.BuildDirectory) | ||
- task: PowerShell@1 | ||
name: test | ||
displayName: Run tests | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\test.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -SkipCommon -SkipGallery | ||
workingFolder: $(Agent.BuildDirectory) | ||
- task: PublishTestResults@2 | ||
name: publish_test_results | ||
displayName: Publish test results | ||
condition: succeededOrFailed() | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: $(Agent.BuildDirectory)\Results.*.xml | ||
failTaskOnFailedTests: true | ||
|
||
- stage: artifacts | ||
displayName: Artifacts | ||
dependsOn: [] | ||
jobs: | ||
- job: build_artifacts | ||
displayName: build | ||
cancelTimeoutInMinutes: 1 | ||
steps: | ||
- task: PowerShell@1 | ||
name: build_artifacts | ||
displayName: Build | ||
inputs: | ||
scriptName: $(Agent.BuildDirectory)\build.ps1 | ||
arguments: -Configuration $(BuildConfiguration) -BuildNumber $(Build.BuildId) -CommonAssemblyVersion $(CommonAssemblyVersion) -CommonPackageVersion $(CommonPackageVersion) -GalleryAssemblyVersion $(GalleryAssemblyVersion) -GalleryPackageVersion $(GalleryPackageVersion) -JobsAssemblyVersion $(JobsAssemblyVersion) -JobsPackageVersion $(JobsPackageVersion) -Branch $(NuGetGalleryBranch) -CommitSHA $(Build.SourceVersion) | ||
workingFolder: $(Agent.BuildDirectory) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use 1ES template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for the public build as it's going to in dceng-public