diff --git a/build/pipelines/ci.yml b/build/pipelines/ci.yml index 0900e52414..ed2925b248 100644 --- a/build/pipelines/ci.yml +++ b/build/pipelines/ci.yml @@ -34,3 +34,5 @@ jobs: - template: ./templates/build-console-ci.yml parameters: platform: ARM64 + + - template: ./templates/check-formatting.yml diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml index 31365ae66d..700701000b 100644 --- a/build/pipelines/release.yml +++ b/build/pipelines/release.yml @@ -35,4 +35,6 @@ jobs: platform: arm64 additionalBuildArguments: /p:WindowsTerminalReleaseBuild=true + - template: ./templates/check-formatting.yml + - template: ./templates/release-sign-and-bundle.yml diff --git a/build/pipelines/templates/build-console-audit-job.yml b/build/pipelines/templates/build-console-audit-job.yml index 1d79b1e542..b5bb0699c4 100644 --- a/build/pipelines/templates/build-console-audit-job.yml +++ b/build/pipelines/templates/build-console-audit-job.yml @@ -41,12 +41,6 @@ jobs: nugetConfigPath: build/config/NuGet.config restoreDirectory: '$(Build.SourcesDirectory)/packages' - - task: PowerShell@2 - displayName: 'Code Formattting Check' - inputs: - targetType: filePath - filePath: '.\build\scripts\Invoke-FormattingCheck.ps1' - - task: VSBuild@1 displayName: 'Build solution **\OpenConsole.sln' inputs: diff --git a/build/pipelines/templates/check-formatting.yml b/build/pipelines/templates/check-formatting.yml new file mode 100644 index 0000000000..e06af4e8e3 --- /dev/null +++ b/build/pipelines/templates/check-formatting.yml @@ -0,0 +1,16 @@ + +jobs: +- job: CodeFormatCheck + displayName: Proper Code Formatting Check + pool: { vmImage: vs2017-win2016 } + + steps: + - checkout: self + submodules: false + clean: true + + - task: PowerShell@2 + displayName: 'Code Formattting Check' + inputs: + targetType: filePath + filePath: '.\build\scripts\Invoke-FormattingCheck.ps1' diff --git a/build/pipelines/templates/release-sign-and-bundle.yml b/build/pipelines/templates/release-sign-and-bundle.yml index 105b834d4c..ced32a05f8 100644 --- a/build/pipelines/templates/release-sign-and-bundle.yml +++ b/build/pipelines/templates/release-sign-and-bundle.yml @@ -10,13 +10,15 @@ jobs: - Buildx64Release - Buildx86Release - Buildarm64Release + - CodeFormatCheck condition: | and ( in(dependencies.Buildx64AuditMode.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), in(dependencies.Buildx64Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), in(dependencies.Buildx86Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), - in(dependencies.Buildarm64Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped') + in(dependencies.Buildarm64Release.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'), + in(dependencies.CodeFormatCheck.result, 'Succeeded', 'SucceededWithIssues', 'Skipped') ) variables: