diff options
Diffstat (limited to 'azure-pipelines.yml')
| -rw-r--r-- | azure-pipelines.yml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..534742f4f --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,54 @@ +# https://aka.ms/yaml + +variables: + ENV LIBRARY_PATH: /lib:/usr/lib + ENV PIPENV_HIDE_EMOJIS: 1 + ENV PIPENV_IGNORE_VIRTUALENVS: 1 + ENV PIPENV_NOSPIN: 1 + ENV PIPENV_VENV_IN_PROJECT: 1 + +jobs: +- job: test + displayName: 'Lint & Test' + + pool: + vmImage: 'Ubuntu 16.04' + + variables: + PIPENV_CACHE_DIR: ".cache/pipenv" + PIP_CACHE_DIR: ".cache/pip" + + steps: + - script: sudo apt-get install build-essential curl docker libffi-dev libfreetype6-dev libxml2 libxml2-dev libxslt1-dev zlib1g zlib1g-dev + displayName: 'Install base dependencies' + + - task: UsePythonVersion@0 + displayName: 'Set Python version' + inputs: + versionSpec: '3.7.x' + addToPath: true + + - script: sudo pip install pipenv + displayName: 'Install pipenv' + + - script: pipenv install --dev --deploy --system + displayName: 'Install project using pipenv' + + - script: python -m flake8 + displayName: 'Run linter' + +- job: build + displayName: 'Build Containers' + dependsOn: 'test' + + steps: + - task: Docker@1 + displayName: 'Login: Docker Hub' + + inputs: + containerregistrytype: 'Container Registry' + dockerRegistryEndpoint: 'DockerHub' + command: 'login' + + - bash: bash scripts/deploy-azure.sh + displayName: 'Build and deploy containers' |