2020-05-28 17:57:48 +01:00
|
|
|
trigger:
|
2021-05-06 13:02:59 +01:00
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- next
|
|
|
|
- version-*
|
2021-06-06 12:42:38 +01:00
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- website
|
|
|
|
- outpost
|
2020-05-28 17:57:48 +01:00
|
|
|
|
|
|
|
resources:
|
2020-05-28 18:15:18 +01:00
|
|
|
- repo: self
|
2020-05-28 17:57:48 +01:00
|
|
|
|
|
|
|
variables:
|
2021-07-22 21:18:58 +01:00
|
|
|
- name: POSTGRES_DB
|
|
|
|
value: authentik
|
|
|
|
- name: POSTGRES_USER
|
|
|
|
value: authentik
|
|
|
|
- name: POSTGRES_PASSWORD
|
|
|
|
value: "EK-5jnKfjrGRm<77"
|
|
|
|
- group: coverage
|
2020-05-28 17:57:48 +01:00
|
|
|
|
|
|
|
stages:
|
2021-05-10 18:36:28 +01:00
|
|
|
- stage: Lint_and_test
|
2020-05-28 18:15:18 +01:00
|
|
|
jobs:
|
|
|
|
- job: pylint
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2021-03-22 19:10:38 +00:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run services
|
|
|
|
inputs:
|
|
|
|
dockerComposeFile: 'scripts/ci.docker-compose.yml'
|
|
|
|
action: 'Run services'
|
|
|
|
buildImages: false
|
2020-05-28 18:15:18 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-05-28 18:15:18 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2021-05-16 22:45:28 +01:00
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2021-05-16 22:45:28 +01:00
|
|
|
pipenv run pylint authentik tests lifecycle
|
2020-05-28 18:15:18 +01:00
|
|
|
- job: black
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-05-28 18:15:18 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-05-28 18:15:18 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2020-12-05 21:08:42 +00:00
|
|
|
script: pipenv run black --check authentik tests lifecycle
|
2021-03-23 17:28:23 +00:00
|
|
|
- job: isort
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '3.9'
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2021-03-23 17:28:23 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: pipenv run isort --check authentik tests lifecycle
|
2020-05-28 18:15:18 +01:00
|
|
|
- job: bandit
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-05-28 18:15:18 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-05-28 18:15:18 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2020-12-05 21:08:42 +00:00
|
|
|
script: pipenv run bandit -r authentik tests lifecycle
|
2020-05-28 18:15:18 +01:00
|
|
|
- job: pyright
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- task: UseNode@1
|
2020-07-03 08:39:23 +01:00
|
|
|
inputs:
|
|
|
|
version: '12.x'
|
2020-05-28 18:15:18 +01:00
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-05-28 18:15:18 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2021-05-04 19:57:48 +01:00
|
|
|
script: npm install -g pyright@1.1.136
|
2020-05-28 18:15:18 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-05-28 18:15:18 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2020-09-26 18:08:37 +01:00
|
|
|
script: pipenv run pyright e2e lifecycle
|
2020-05-28 18:29:28 +01:00
|
|
|
- job: migrations
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-05-28 18:29:28 +01:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run services
|
|
|
|
inputs:
|
2020-07-14 21:55:30 +01:00
|
|
|
dockerComposeFile: 'scripts/ci.docker-compose.yml'
|
2020-05-28 18:29:28 +01:00
|
|
|
action: 'Run services'
|
|
|
|
buildImages: false
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-05-28 18:29:28 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2021-05-16 22:45:28 +01:00
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2021-06-16 21:43:43 +01:00
|
|
|
pipenv run python -m lifecycle.migrate
|
2020-09-21 16:55:57 +01:00
|
|
|
- job: migrations_from_previous_release
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
2020-11-15 19:41:35 +00:00
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '3.8'
|
2020-09-21 16:55:57 +01:00
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-09-21 16:55:57 +01:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run services
|
|
|
|
inputs:
|
|
|
|
dockerComposeFile: 'scripts/ci.docker-compose.yml'
|
|
|
|
action: 'Run services'
|
|
|
|
buildImages: false
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Prepare Last tagged release
|
|
|
|
inputs:
|
|
|
|
script: |
|
2020-12-05 21:08:42 +00:00
|
|
|
# Copy current, latest config to local
|
|
|
|
cp authentik/lib/default.yml local.env.yml
|
2020-09-21 16:55:57 +01:00
|
|
|
git checkout $(git describe --abbrev=0 --match 'version/*')
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-09-21 16:55:57 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Migrate to last tagged release
|
|
|
|
inputs:
|
2021-05-16 22:45:28 +01:00
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2021-05-16 22:45:28 +01:00
|
|
|
pipenv run python -m lifecycle.migrate
|
2020-09-21 16:55:57 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Install current branch
|
|
|
|
inputs:
|
|
|
|
script: |
|
|
|
|
set -x
|
|
|
|
git checkout ${{ variables.branchName }}
|
|
|
|
pipenv sync --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Migrate to current branch
|
|
|
|
inputs:
|
2020-12-05 21:08:42 +00:00
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2020-12-05 21:08:42 +00:00
|
|
|
pipenv run python -m lifecycle.migrate
|
2020-07-10 16:25:19 +01:00
|
|
|
- job: coverage_unittest
|
2020-07-10 16:12:37 +01:00
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-07-10 16:12:37 +01:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run services
|
|
|
|
inputs:
|
2020-07-14 21:55:30 +01:00
|
|
|
dockerComposeFile: 'scripts/ci.docker-compose.yml'
|
2020-07-10 16:12:37 +01:00
|
|
|
action: 'Run services'
|
|
|
|
buildImages: false
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-07-10 16:12:37 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Run full test suite
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2021-05-04 17:45:28 +01:00
|
|
|
pipenv run make test
|
2020-09-26 13:55:50 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2020-07-10 16:12:37 +01:00
|
|
|
mkdir output-unittest
|
|
|
|
mv unittest.xml output-unittest/unittest.xml
|
|
|
|
mv .coverage output-unittest/coverage
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
inputs:
|
2020-07-10 16:43:16 +01:00
|
|
|
targetPath: 'output-unittest/'
|
|
|
|
artifact: 'coverage-unittest'
|
2020-07-10 16:12:37 +01:00
|
|
|
publishLocation: 'pipeline'
|
2020-11-19 13:25:53 +00:00
|
|
|
- job: coverage_integration
|
2020-05-28 18:29:28 +01:00
|
|
|
pool:
|
2020-11-19 13:25:53 +00:00
|
|
|
vmImage: 'ubuntu-latest'
|
2020-05-28 18:29:28 +01:00
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-05-28 18:29:28 +01:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run services
|
|
|
|
inputs:
|
2020-07-14 21:55:30 +01:00
|
|
|
dockerComposeFile: 'scripts/ci.docker-compose.yml'
|
2020-05-28 18:29:28 +01:00
|
|
|
action: 'Run services'
|
|
|
|
buildImages: false
|
2020-11-19 13:25:53 +00:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-19 13:25:53 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
2020-10-14 19:21:36 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Install K3d and prepare
|
2020-10-14 19:28:24 +01:00
|
|
|
inputs:
|
2020-10-14 19:21:36 +01:00
|
|
|
script: |
|
|
|
|
wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
|
|
|
|
k3d cluster create
|
|
|
|
k3d kubeconfig write -o ~/.kube/config --overwrite
|
2020-11-19 13:25:53 +00:00
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Run full test suite
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2020-11-19 13:25:53 +00:00
|
|
|
pipenv run make test-integration
|
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
|
|
|
mkdir output-integration
|
|
|
|
mv unittest.xml output-integration/unittest.xml
|
|
|
|
mv .coverage output-integration/coverage
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
inputs:
|
|
|
|
targetPath: 'output-integration/'
|
|
|
|
artifact: 'coverage-integration'
|
|
|
|
publishLocation: 'pipeline'
|
2021-07-29 18:45:12 +01:00
|
|
|
- job: coverage_e2e
|
2020-11-19 13:25:53 +00:00
|
|
|
pool:
|
2021-02-03 20:18:31 +00:00
|
|
|
vmImage: 'ubuntu-latest'
|
2020-11-19 13:25:53 +00:00
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '3.9'
|
2021-05-05 00:24:10 +01:00
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
2021-05-05 08:44:15 +01:00
|
|
|
versionSpec: '16.x'
|
2020-11-19 13:25:53 +00:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run services
|
|
|
|
inputs:
|
|
|
|
dockerComposeFile: 'scripts/ci.docker-compose.yml'
|
|
|
|
action: 'Run services'
|
|
|
|
buildImages: false
|
2020-05-28 18:29:28 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-05-28 18:29:28 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
2020-11-22 23:38:25 +00:00
|
|
|
pipenv install --dev --python python3.9
|
2020-07-03 08:54:25 +01:00
|
|
|
- task: DockerCompose@0
|
|
|
|
displayName: Run ChromeDriver
|
2020-05-28 18:29:28 +01:00
|
|
|
inputs:
|
2020-11-19 13:25:53 +00:00
|
|
|
dockerComposeFile: 'tests/e2e/ci.docker-compose.yml'
|
2020-07-03 08:54:25 +01:00
|
|
|
action: 'Run a specific service'
|
|
|
|
serviceName: 'chrome'
|
2020-07-03 08:25:13 +01:00
|
|
|
- task: CmdLine@2
|
2020-07-03 08:54:25 +01:00
|
|
|
displayName: Build static files for e2e
|
2020-07-03 08:25:13 +01:00
|
|
|
inputs:
|
|
|
|
script: |
|
2020-11-28 18:43:42 +00:00
|
|
|
cd web
|
2020-10-09 10:33:02 +01:00
|
|
|
npm i
|
|
|
|
npm run build
|
2020-07-03 08:25:13 +01:00
|
|
|
- task: CmdLine@2
|
2020-07-03 08:54:25 +01:00
|
|
|
displayName: Run full test suite
|
2020-07-14 20:36:40 +01:00
|
|
|
inputs:
|
2020-09-16 08:08:10 +01:00
|
|
|
script: |
|
2021-05-16 22:56:38 +01:00
|
|
|
pipenv run python -m scripts.generate_ci_config
|
2020-11-19 13:25:53 +00:00
|
|
|
pipenv run make test-e2e
|
2020-09-16 08:08:10 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
condition: always()
|
|
|
|
displayName: Cleanup
|
|
|
|
inputs:
|
|
|
|
script: |
|
|
|
|
docker stop $(docker ps -aq)
|
2020-10-18 14:14:00 +01:00
|
|
|
docker container prune -f
|
2020-07-14 20:36:40 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Prepare unittests and coverage for upload
|
2020-07-03 08:25:13 +01:00
|
|
|
inputs:
|
2020-07-10 16:12:37 +01:00
|
|
|
script: |
|
2021-07-29 18:45:12 +01:00
|
|
|
mkdir output-e2e
|
|
|
|
mv unittest.xml output-e2e/unittest.xml
|
|
|
|
mv .coverage output-e2e/coverage
|
2020-07-10 16:12:37 +01:00
|
|
|
- task: PublishPipelineArtifact@1
|
2020-07-03 08:54:25 +01:00
|
|
|
condition: failed()
|
|
|
|
displayName: Upload screenshots if selenium tests fail
|
2020-07-03 08:25:13 +01:00
|
|
|
inputs:
|
2020-07-10 16:12:37 +01:00
|
|
|
targetPath: 'selenium_screenshots/'
|
2021-07-29 18:45:12 +01:00
|
|
|
artifact: 'selenium screenshots'
|
2020-07-10 16:12:37 +01:00
|
|
|
publishLocation: 'pipeline'
|
|
|
|
- task: PublishPipelineArtifact@1
|
|
|
|
inputs:
|
2021-07-29 18:45:12 +01:00
|
|
|
targetPath: 'output-e2e/'
|
|
|
|
artifact: 'coverage-e2e'
|
2020-07-10 16:12:37 +01:00
|
|
|
publishLocation: 'pipeline'
|
2020-07-10 16:25:19 +01:00
|
|
|
- stage: test_combine
|
2020-07-10 16:12:37 +01:00
|
|
|
jobs:
|
|
|
|
- job: test_coverage_combine
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
steps:
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
2021-07-29 18:45:12 +01:00
|
|
|
artifactName: 'coverage-e2e'
|
|
|
|
path: "coverage-e2e/"
|
2020-11-19 13:25:53 +00:00
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: 'coverage-integration'
|
|
|
|
path: "coverage-integration/"
|
2020-07-10 16:12:37 +01:00
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
inputs:
|
|
|
|
buildType: 'current'
|
|
|
|
artifactName: 'coverage-unittest'
|
2020-07-10 17:39:16 +01:00
|
|
|
path: "coverage-unittest/"
|
2020-07-10 16:12:37 +01:00
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2020-11-15 14:49:02 +00:00
|
|
|
versionSpec: '3.9'
|
2020-05-28 18:29:28 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
2020-07-03 08:54:25 +01:00
|
|
|
script: |
|
2021-05-08 13:41:40 +01:00
|
|
|
sudo apt update
|
2020-11-15 00:05:20 +00:00
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config
|
2020-07-10 16:12:37 +01:00
|
|
|
sudo pip install -U wheel pipenv
|
|
|
|
pipenv install --dev
|
2021-07-29 18:45:12 +01:00
|
|
|
pipenv run coverage combine coverage-e2e/coverage coverage-unittest/coverage coverage-integration/coverage
|
2020-07-03 08:54:25 +01:00
|
|
|
pipenv run coverage xml
|
|
|
|
pipenv run coverage html
|
|
|
|
- task: PublishCodeCoverageResults@1
|
|
|
|
inputs:
|
2020-07-10 18:11:36 +01:00
|
|
|
codeCoverageTool: 'Cobertura'
|
2020-07-03 08:54:25 +01:00
|
|
|
summaryFileLocation: 'coverage.xml'
|
2020-07-10 18:11:36 +01:00
|
|
|
pathToSources: '$(System.DefaultWorkingDirectory)'
|
2020-07-03 08:54:25 +01:00
|
|
|
- task: PublishTestResults@2
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
inputs:
|
2020-07-10 18:11:36 +01:00
|
|
|
testResultsFormat: 'JUnit'
|
|
|
|
testResultsFiles: |
|
2021-07-29 18:45:12 +01:00
|
|
|
coverage-e2e/unittest.xml
|
2020-11-19 13:25:53 +00:00
|
|
|
coverage-integration/unittest.xml
|
2020-07-10 18:11:36 +01:00
|
|
|
coverage-unittest/unittest.xml
|
|
|
|
mergeTestResults: true
|
2020-05-28 18:29:28 +01:00
|
|
|
- task: CmdLine@2
|
|
|
|
inputs:
|
|
|
|
script: bash <(curl -s https://codecov.io/bash)
|
2020-05-28 18:44:25 +01:00
|
|
|
- stage: Build
|
|
|
|
jobs:
|
2020-05-28 18:46:10 +01:00
|
|
|
- job: build_server
|
2020-05-28 18:44:25 +01:00
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
2020-05-28 20:00:30 +01:00
|
|
|
steps:
|
2021-01-11 15:18:44 +00:00
|
|
|
- task: Bash@3
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: |
|
2021-02-28 13:24:16 +00:00
|
|
|
python ./scripts/az_do_set_branch.py
|
2020-05-28 20:00:30 +01:00
|
|
|
- task: Docker@2
|
|
|
|
inputs:
|
2021-03-02 23:05:15 +00:00
|
|
|
containerRegistry: 'beryjuorg-harbor'
|
2021-03-03 09:36:46 +00:00
|
|
|
repository: 'authentik/server'
|
2021-03-16 13:42:01 +00:00
|
|
|
command: 'build'
|
2020-05-28 20:00:30 +01:00
|
|
|
Dockerfile: 'Dockerfile'
|
2021-05-26 09:37:33 +01:00
|
|
|
tags: |
|
|
|
|
gh-$(branchName)
|
|
|
|
gh-$(branchName)-$(timestamp)
|
2021-03-16 15:45:53 +00:00
|
|
|
arguments: '--build-arg GIT_BUILD_HASH=$(Build.SourceVersion)'
|
2021-03-16 13:42:01 +00:00
|
|
|
- task: Docker@2
|
|
|
|
inputs:
|
|
|
|
containerRegistry: 'beryjuorg-harbor'
|
|
|
|
repository: 'authentik/server'
|
|
|
|
command: 'push'
|
2021-05-26 09:37:33 +01:00
|
|
|
tags: |
|
|
|
|
gh-$(branchName)
|
|
|
|
gh-$(branchName)-$(timestamp)
|