@@ -96,11 +96,11 @@ jobs:
9696 - checkout : self
9797 fetchDepth : 0
9898
99- - task : UseDotNet@2
100- displayName : ' Install .NET SDK ${{ parameters.dotnetSdkVersion }}'
101- inputs :
102- packageType : ' sdk'
103- version : ' ${{ parameters.dotnetSdkVersion }}'
99+ # - task: UseDotNet@2
100+ # displayName: 'Install .NET SDK ${{ parameters.dotnetSdkVersion }}'
101+ # inputs:
102+ # packageType: 'sdk'
103+ # version: '${{ parameters.dotnetSdkVersion }}'
104104
105105 - task : gitversion-setup@4.5.0
106106 displayName : ' GitVersion Setup'
@@ -128,76 +128,67 @@ jobs:
128128 Write-Host "Build Source branch: $env:BUILD_SOURCEBRANCHNAME"
129129 displayName: Debug environment
130130
131- # - task: PowerShell@2
132- # displayName: 'Debug branch condition'
133- # condition: ne(variables['Build.SourceBranchName'], 'main')
131+ # - task: DotNetCoreCLI@2
132+ # displayName: 'Dotnet restore'
134133 # inputs:
135- # targetType: 'inline'
136- # script: |
137- # Write-Host "Running because branch is NOT main"
138- # Write-Host "Branch: $env:BUILD_SOURCEBRANCHNAME"
139-
140- - task : DotNetCoreCLI@2
141- displayName : ' Dotnet restore'
142- inputs :
143- command : ' restore'
144- projects : ' ${{ parameters.solution }}'
145- arguments : ' --verbosity minimal'
146- nugetConfigPath : ' nuget.config'
147-
148- - task : SonarCloudPrepare@4
149- condition : and(
150- succeeded(),
151- ${{ parameters.sonarCloudEnabled }},
152- eq(variables['Build.SourceBranchName'], 'main'))
153- inputs :
154- SonarCloud : ${{ parameters.sonarCloudServiceConnection }}
155- organization : event-triangle
156- scannerMode : dotnet
157- projectKey : event-triangle-api
158- projectName : eventtriangleapi
159- extraProperties : |
160- sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/*.trx
161- sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/*opencover.xml
162- sonar.exclusions=**/Properties/**, **/bin/**, **/obj/**, **/Migrations/**
163-
164- - task : DotNetCoreCLI@2
165- displayName : ' Build solution'
166- inputs :
167- command : ' build'
168- projects : ' ${{ parameters.solution }}'
169- arguments : ' -c ${{ parameters.buildConfiguration }} -p:Version=$(version_step.semVer) --no-restore'
170-
171- - task : SonarCloudAnalyze@4
172- condition : and(
173- succeeded(),
174- ${{ parameters.sonarCloudEnabled }},
175- eq(variables['Build.SourceBranchName'], 'main'))
176- inputs : {}
177-
178- - task : SonarCloudPublish@4
179- condition : and(
180- succeeded(),
181- ${{ parameters.sonarCloudEnabled }},
182- eq(variables['Build.SourceBranchName'], 'main'))
183- inputs :
184- pollingTimeoutSec : " 300"
134+ # command: 'restore'
135+ # projects: '${{ parameters.solution }}'
136+ # arguments: '--verbosity minimal'
137+ # nugetConfigPath: 'nuget.config'
138+
139+ # - task: SonarCloudPrepare@4
140+ # condition: and(
141+ # succeeded(),
142+ # ${{ parameters.sonarCloudEnabled }},
143+ # eq(variables['Build.SourceBranchName'], 'main'))
144+ # inputs:
145+ # SonarCloud: ${{ parameters.sonarCloudServiceConnection }}
146+ # organization: event-triangle
147+ # scannerMode: dotnet
148+ # projectKey: event-triangle-api
149+ # projectName: eventtriangleapi
150+ # extraProperties: |
151+ # sonar.cs.vstest.reportsPaths=$(Agent.TempDirectory)/**/*.trx
152+ # sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/*opencover.xml
153+ # sonar.exclusions=**/Properties/**, **/bin/**, **/obj/**, **/Migrations/**
154+
155+ # - task: DotNetCoreCLI@2
156+ # displayName: 'Build solution'
157+ # inputs:
158+ # command: 'build'
159+ # projects: '${{ parameters.solution }}'
160+ # arguments: '-c ${{ parameters.buildConfiguration }} -p:Version=$(version_step.semVer) --no-restore'
161+
162+ # - task: SonarCloudAnalyze@4
163+ # condition: and(
164+ # succeeded(),
165+ # ${{ parameters.sonarCloudEnabled }},
166+ # eq(variables['Build.SourceBranchName'], 'main'))
167+ # inputs: {}
168+
169+ # - task: SonarCloudPublish@4
170+ # condition: and(
171+ # succeeded(),
172+ # ${{ parameters.sonarCloudEnabled }},
173+ # eq(variables['Build.SourceBranchName'], 'main'))
174+ # inputs:
175+ # pollingTimeoutSec: "300"
185176
186- - task : DotnetCoreCLI@2
187- displayName : ' Run unit tests'
188- condition : and(succeeded(), eq(${{ parameters.shouldRunUnitTests }}, true))
189- inputs :
190- command : ' test'
191- projects : ' ${{ parameters.unitTestsProjectPath }}'
192- arguments : ' --no-build --configuration ${{ parameters.buildConfiguration }} --collect "Code Coverage"'
177+ # - task: DotnetCoreCLI@2
178+ # displayName: 'Run unit tests'
179+ # condition: and(succeeded(), eq(${{ parameters.shouldRunUnitTests }}, true))
180+ # inputs:
181+ # command: 'test'
182+ # projects: '${{ parameters.unitTestsProjectPath }}'
183+ # arguments: '--no-build --configuration ${{ parameters.buildConfiguration }} --collect "Code Coverage"'
193184
194- - task : DotNetCoreCLI@2
195- displayName : ' Run integration tests'
196- condition : and(succeeded(), eq(${{ parameters.shouldRunIntegrationTests }}, true))
197- inputs :
198- command : ' test'
199- projects : ' ${{ parameters.integrationTestsProjectPath }}'
200- arguments : ' --no-build --configuration ${{ parameters.buildConfiguration }} --collect "Code Coverage"'
185+ # - task: DotNetCoreCLI@2
186+ # displayName: 'Run integration tests'
187+ # condition: and(succeeded(), eq(${{ parameters.shouldRunIntegrationTests }}, true))
188+ # inputs:
189+ # command: 'test'
190+ # projects: '${{ parameters.integrationTestsProjectPath }}'
191+ # arguments: '--no-build --configuration ${{ parameters.buildConfiguration }} --collect "Code Coverage"'
201192
202193 - task : PowerShell@2
203194 displayName : ' Build Docker Image'
0 commit comments