Skip to content

Commit

Permalink
Added spec location verification to the release pipeline (#22301)
Browse files Browse the repository at this point in the history
* publish package info as artifact

* Added the same condition as previous step
  • Loading branch information
raych1 committed Feb 1, 2024
1 parent 00f2b8b commit b36de61
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions eng/pipelines/templates/jobs/archetype-go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ stages:
deploy:
steps:
- checkout: self
- download: current
artifact: 'PackageInfo'
- template: /eng/common/pipelines/templates/steps/retain-run.yml
- template: /eng/common/pipelines/templates/steps/verify-changelog.yml
parameters:
Expand All @@ -64,6 +66,14 @@ stages:
${{ else }}:
PackageName: 'sdk/${{parameters.ServiceDirectory}}'
ForRelease: true
- template: /eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml
parameters:
${{ if startsWith(parameters.ServiceDirectory, '../') }}:
PackageName: "${{replace(parameters.ServiceDirectory, '../', '')}}"
${{ else }}:
PackageName: 'sdk/${{parameters.ServiceDirectory}}'
ServiceDirectory: ${{parameters.ServiceDirectory}}
ArtifactLocation: $(Pipeline.Workspace)
- task: PowerShell@2
displayName: 'Verify no replace directives in go.mod file'
inputs:
Expand Down
7 changes: 6 additions & 1 deletion eng/pipelines/templates/steps/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ steps:
workingDirectory: $(Pipeline.Workspace)
displayName: Dump Package properties
condition: and(succeeded(), ${{ parameters.IsSdkLibrary }})

- task: PublishPipelineArtifact@1
condition: and(succeeded(), ${{ parameters.IsSdkLibrary }})
displayName: 'Publish PackageInfo Artifacts'
inputs:
artifactName: 'PackageInfo'
path: $(Build.ArtifactStagingDirectory)/PackageInfo
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml

- task: Powershell@2
Expand Down

0 comments on commit b36de61

Please sign in to comment.