trigger:
- master
- next
- version-*
stages:
- stage: generate
jobs:
- job: swagger_generate
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- task: CmdLine@2
script: |
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli generate -i /local/swagger.yaml -g typescript-fetch -o /local/web/api --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=authentik-api,npmVersion=1.0.0
- task: PublishPipelineArtifact@1
targetPath: 'web/api/'
artifact: 'ts_swagger_client'
publishLocation: 'pipeline'
- stage: lint
- job: eslint
- task: DownloadPipelineArtifact@2
buildType: 'current'
artifactName: 'ts_swagger_client'
path: "web/api/"
- task: Npm@1
command: 'install'
workingDir: 'web/'
command: 'custom'
customCommand: 'run lint'
- job: lit_analyse
customCommand: 'run lit-analyse'
- stage: build_local
- job: build
customCommand: 'run build'