Work CD-CI
Add check for ***NO_CI*** in commit message for merges.
Change variable name to SKIP_BUILD to make it clearer.
@@ -36,16 +36,23 @@ jobs:
if( ($commit.commit.author.name -eq "nfbot") -and (($commit.commit.message -like "*[version update]*") -or ($commit.commit.message -like "***NO_CI***")) )
{
- echo "##vso[task.setvariable variable=IS_VERSION_UPDATE;isOutput=true]true"
+ echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
}
else
{
- echo "##vso[task.setvariable variable=IS_VERSION_UPDATE;isOutput=true]false"
+ echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false"
}
}
else
{
- echo "##vso[task.setvariable variable=IS_VERSION_UPDATE;isOutput=true]false"
+ if($commit.commit.message -like "***NO_CI***")
+ {
+ echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true"
+ }
+ else
+ {
+ echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false"
+ }
}
name: BuildOptions
@@ -56,7 +63,7 @@ jobs:
- job: Build_STM32_targets
# skip build if this is a PR, submitted by nfbot and the commit message contains [version update]
# not( and( eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.RequestedForId'], 'nfbot'), contains(variables['Build.SourceVersionMessage'], '[version update]') ) )
- condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.IS_VERSION_UPDATE'], true ) ))
+ condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) ))
dependsOn:
- Check_Build_Options
@@ -113,7 +120,7 @@ jobs:
- job: Build_ESP32_targets
# skip build if this is a PR, submitted by nfbot and the commit message contains [version update]
# condition: not( and( eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.RequestedForId'], 'nfbot'), contains(variables['Build.SourceVersionMessage'], '[version update]') ) )
- condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.IS_VERSION_UPDATE'], true ) ))
+ condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) ))
dependsOn:
- Check_Build_Options
@@ -159,7 +166,7 @@ jobs:
- job: Build_WIN32_nanoCLR
# skip build if this is a PR, submitted by nfbot and the commit message contains [version update]
# condition: not( and( eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.RequestedForId'], 'nfbot'), contains(variables['Build.SourceVersionMessage'], '[version update]') ) )
- condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.IS_VERSION_UPDATE'], true ) ))
+ condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) ))
dependsOn:
- Check_Build_Options
