Update azure-pipelines.yml for Azure Pipelines (#331)
* Update azure-pipelines.yml for Azure Pipelines * Add Python build scripts. * Run scripts with Python 3. * Add strategy for both variants. * Fix variables for jobs and use the right variant to build. * Fix build and test script.
This commit is contained in:
@@ -1,18 +1,38 @@
|
||||
# Docker image
|
||||
# Build a Docker image to deploy, run, or push to a container registry.
|
||||
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
docker --version
|
||||
docker-compose --version
|
||||
docker build -t maxking/mailman-core:latest core/
|
||||
docker build -t maxking/mailman-web:latest web/
|
||||
docker build -t maxking/postorius postorius/
|
||||
strategy:
|
||||
maxParallel: 2
|
||||
matrix:
|
||||
Stable:
|
||||
variant: stable
|
||||
Rolling:
|
||||
variant: rolling
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
architecture: 'x64'
|
||||
- task: PythonScript@0
|
||||
inputs:
|
||||
scriptSource: 'filepath'
|
||||
scriptPath: 'build.py'
|
||||
arguments: $(variant)
|
||||
- task: PythonScript@0
|
||||
inputs:
|
||||
scriptSource: 'filepath'
|
||||
scriptPath: 'test.py'
|
||||
arguments: $(variant)
|
||||
- task: Bash@3
|
||||
inputs:
|
||||
filePath: 'tests/test.sh'
|
||||
- task: PythonScript@0
|
||||
inputs:
|
||||
scriptSource: 'filePath'
|
||||
scriptPath: '.travis/deploy.py'
|
||||
condition: and(eq(variables['Build.SourceBranch'], 'refs/heads/master'),
|
||||
eq(variables['variant'], 'rolling'))
|
||||
|
||||
Reference in New Issue
Block a user