Skip to content
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

adding if conditions for debug and release jobs #1644

Merged
merged 3 commits into from
Sep 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
78 changes: 52 additions & 26 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,41 @@ stages:
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)

strategy:
matrix:
Build_Debug:
_BuildConfig: Debug
_PublishType: none
_SignType: test
_DotNetPublishToBlobFeed : false
Build_Release:
_BuildConfig: Release
# PRs or external builds are not signed.
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
${{ if ne(variables['System.TeamProject'], 'public') }}:
deepchoudhery marked this conversation as resolved.
Show resolved Hide resolved
matrix:
Build_Release:
_BuildConfig: Release
# PRs or external builds are not signed.
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
_PublishType: none
_SignType: test
_DotNetPublishToBlobFeed : false
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_PublishType: blob
_SignType: real
_DotNetPublishToBlobFeed : true
# _Script: eng\validate-sdk.cmd
# _ValidateSdkArgs: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) -barToken $(MaestroAccessToken)
${{ if eq(variables['System.TeamProject'], 'public') }}:
matrix:
Build_Debug:
_BuildConfig: Debug
_PublishType: none
_SignType: test
_DotNetPublishToBlobFeed : false
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_PublishType: blob
_SignType: real
_DotNetPublishToBlobFeed : true
# _Script: eng\validate-sdk.cmd
# _ValidateSdkArgs: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) -barToken $(MaestroAccessToken)
Build_Release:
_BuildConfig: Release
# PRs or external builds are not signed.
${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
_PublishType: none
_SignType: test
_DotNetPublishToBlobFeed : false
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
_PublishType: blob
_SignType: real
_DotNetPublishToBlobFeed : true
# _Script: eng\validate-sdk.cmd
# _ValidateSdkArgs: -gitHubPat $(BotAccount-dotnet-maestro-bot-PAT) -barToken $(MaestroAccessToken)
steps:
- checkout: self
clean: true
Expand All @@ -111,11 +127,16 @@ stages:
pool:
name: Hosted macOS
strategy:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
${{ if eq(variables['System.TeamProject'], 'public') }}:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
${{ if ne(variables['System.TeamProject'], 'public') }}:
matrix:
release_configuration:
_BuildConfig: Release
steps:
- checkout: self
clean: true
Expand All @@ -131,11 +152,16 @@ stages:
name: Hosted Ubuntu 1604
container: LinuxContainer
strategy:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
${{ if eq(variables['System.TeamProject'], 'public') }}:
matrix:
debug_configuration:
_BuildConfig: Debug
release_configuration:
_BuildConfig: Release
${{ if ne(variables['System.TeamProject'], 'public') }}:
matrix:
release_configuration:
_BuildConfig: Release
steps:
- checkout: self
clean: true
Expand Down