-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93efd2d
commit 322be66
Showing
4 changed files
with
150 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
paths: | ||
exclude: | ||
- README.md | ||
- CODE-OF-CONDUCT.md | ||
- LICENSE | ||
- .github/ | ||
- docs/ | ||
|
||
pr: | ||
branches: | ||
include: | ||
- main | ||
paths: | ||
exclude: | ||
- README.md | ||
- CODE-OF-CONDUCT.md | ||
- LICENSE | ||
- .github/ | ||
- docs/ | ||
- images/ | ||
|
||
variables: | ||
- template: /scripts/azure-pipelines-variables.yml@self | ||
|
||
pool: | ||
vmImage: windows-latest | ||
|
||
jobs: | ||
- job: build | ||
displayName: Build | ||
steps: | ||
- template: /scripts/azure-pipelines-steps-prepare.yml@self | ||
- pwsh: dotnet cake | ||
displayName: Build everything | ||
env: | ||
JavaSdkDirectory: $(JAVA_HOME) | ||
- task: PublishTestResults@2 | ||
condition: always() | ||
inputs: | ||
testResultsFormat: VSTest | ||
testResultsFiles: output/test-results/*.trx | ||
- publish: output | ||
artifact: windows | ||
condition: always() | ||
displayName: Upload Logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
steps: | ||
|
||
- pwsh: | | ||
$pr = "pr." + $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER | ||
Write-Host "Preview label: $pr" | ||
Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$pr" | ||
displayName: Use a special preview label for PRs | ||
condition: eq(variables['Build.Reason'], 'PullRequest') | ||
- pwsh: | | ||
$label = "" | ||
if ($env:BUILD_REASON -ne "PullRequest") { | ||
$label = "+" + $env:BUILD_SOURCEBRANCHNAME | ||
} | ||
$label = "$env:BASE_VERSION-$env:PREVIEW_LABEL.$env:BUILD_NUMBER$label" | ||
Write-Host "Build label: $label" | ||
Write-Host "##vso[build.updatebuildnumber]$label" | ||
displayName: Update the build number with a more readable one | ||
- task: JavaToolInstaller@0 | ||
displayName: Select JDK | ||
inputs: | ||
versionSpec: '17' | ||
jdkArchitectureOption: 'x64' | ||
jdkSourceOption: 'PreInstalled' | ||
|
||
- pwsh: dotnet tool restore | ||
displayName: Restore the dotnet tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
variables: | ||
MAJOR_VERSION: 2 | ||
BASE_VERSION: 2.0.0 | ||
PREVIEW_LABEL: 'preview' | ||
BUILD_NUMBER: $[counter(format('{0}_{1}_{2}', variables['BASE_VERSION'], variables['Build.SourceBranch'], variables['PREVIEW_LABEL']), 1)] | ||
GIT_SHA: $(Build.SourceVersion) | ||
GIT_BRANCH_NAME: $(Build.SourceBranchName) |