Skip to content

Commit

Permalink
Move api review step into analyze job. Block on apiview failures/miss…
Browse files Browse the repository at this point in the history
…ing approvals (#18468)
  • Loading branch information
benbp authored Jun 28, 2022
1 parent ba25713 commit 8ce812c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
29 changes: 29 additions & 0 deletions eng/pipelines/templates/steps/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@ parameters:


steps:
- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1
arguments: >
-ServiceDirectory ${{parameters.ServiceDirectory}}
-OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Dump Package properties
condition: succeeded()

- template: /eng/common/pipelines/templates/steps/set-default-branch.yml

- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/scripts/Create-ApiReview.ps1
arguments: >
-ServiceDirectory ${{parameters.ServiceDirectory}}
-OutPath $(Build.ArtifactStagingDirectory)
-ApiviewUri "$(azuresdk-apiview-uri)"
-ApiKey "$(azuresdk-apiview-apikey)"
-ApiLabel "Auto Review - $(Build.SourceVersion)"
-SourceBranch $(Build.SourceBranchName)
-DefaultBranch $(DefaultBranch)
-ConfigFileDir $(Build.ArtifactStagingDirectory)/PackageInfo
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Create API review for Go
condition: and(succeeded(), ne(variables['Skip.CreateApiReview'], 'true') , ne(variables['Build.Reason'],'PullRequest'), eq(variables['System.TeamProject'], 'internal'))

- task: Powershell@2
displayName: 'Dependency Check'
Expand Down
31 changes: 0 additions & 31 deletions eng/pipelines/templates/steps/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,37 +87,6 @@ steps:
inputs:
BuildDropPath: $(Build.ArtifactStagingDirectory)

- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1
arguments: >
-ServiceDirectory ${{parameters.ServiceDirectory}}
-OutDirectory $(Build.ArtifactStagingDirectory)/PackageInfo
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Dump Package properties
condition: succeeded()

- template: /eng/common/pipelines/templates/steps/set-default-branch.yml

- task: Powershell@2
inputs:
filePath: $(Build.SourcesDirectory)/eng/scripts/Create-ApiReview.ps1
arguments: >
-ServiceDirectory ${{parameters.ServiceDirectory}}
-OutPath $(Build.ArtifactStagingDirectory)
-ApiviewUri "$(azuresdk-apiview-uri)"
-ApiKey "$(azuresdk-apiview-apikey)"
-ApiLabel "Auto Review - $(Build.SourceVersion)"
-SourceBranch $(Build.SourceBranchName)
-DefaultBranch $(DefaultBranch)
-ConfigFileDir $(Build.ArtifactStagingDirectory)/PackageInfo
pwsh: true
workingDirectory: $(Pipeline.Workspace)
displayName: Create API review for Go
continueOnError: true
condition: and(succeeded(), ne(variables['Skip.CreateApiReview'], 'true') , ne(variables['Build.Reason'],'PullRequest'), eq(variables['System.TeamProject'], 'internal'))

- template: /eng/common/pipelines/templates/steps/publish-artifact.yml
parameters:
ArtifactPath: '$(Build.ArtifactStagingDirectory)/_manifest'
Expand Down

0 comments on commit 8ce812c

Please sign in to comment.