Skip to content

Commit

Permalink
Publish OpenAPI Spec to repository server
Browse files Browse the repository at this point in the history
  • Loading branch information
EraYaN committed Oct 1, 2020
1 parent 9585fea commit c0de26f
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion .ci/azure-pipelines-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,38 @@ jobs:
sshEndpoint: repository
sourceFolder: '$(Build.SourcesDirectory)/deployment/dist'
contents: '**'
targetFolder: '/srv/repository/incoming/azure/$(Build.BuildNumber)/$(BuildConfiguration)'

- job: OpenAPISpec
dependsOn: Test
condition: or(startsWith(variables['Build.SourceBranch'], 'refs/heads/master'),startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
displayName: 'Push OpenAPI Spec to repository'

pool:
vmImage: 'ubuntu-latest'

steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download OpenAPI Spec'
inputs:
source: 'current'
artifact: "OpenAPI Spec"
path: "$(System.ArtifactsDirectory)/openapispec"
runVersion: "latest"

- task: SSH@0
displayName: 'Create target directory on repository server'
inputs:
sshEndpoint: repository
runOptions: 'inline'
inline: 'mkdir -p /srv/repository/incoming/azure/$(Build.BuildNumber)'

- task: CopyFilesOverSSH@0
displayName: 'Upload artifacts to repository server'
inputs:
sshEndpoint: repository
sourceFolder: '$(System.ArtifactsDirectory)/openapispec'
contents: 'openapi.json'
targetFolder: '/srv/repository/incoming/azure/$(Build.BuildNumber)'

- job: BuildDocker
displayName: 'Build Docker'
Expand Down

0 comments on commit c0de26f

Please sign in to comment.