trigger:
- master
variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: $(System.PullRequest.SourceBranch)
stages:
- stage: lint
jobs:
- job: eslint
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- 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'
- stage: build_docker
- job: build_static
- task: Docker@2
containerRegistry: 'dockerhub'
repository: 'beryju/authentik-static'
command: 'buildAndPush'
Dockerfile: 'web/Dockerfile'
tags: "gh-${{ variables.branchName }}"
buildContext: 'web/'