trigger:
- master
- next
- version-*
variables:
${{ if startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}:
branchName: ${{ replace(variables['System.PullRequest.SourceBranch'], '/', '-') }}
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}:
branchName: ${{ replace(variables['Build.SourceBranchName'], 'refs/heads/', '') }}
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: Bash@3
targetType: 'inline'
script: |
python ./scripts/az_do_set_branch.py
- task: Docker@2
containerRegistry: 'beryjuorg-harbor'
repository: 'beryju/authentik-static'
command: 'buildAndPush'
Dockerfile: 'web/Dockerfile'
tags: "gh-$(branchName)"
buildContext: 'web/'