# https://aka.ms/yaml jobs: - job: test displayName: 'Lint & Test' pool: vmImage: 'Ubuntu 16.04' variables: PIP_CACHE_DIR: ".cache/pip" PIP_SRC: ".cache/src" PIPENV_CACHE_DIR: ".cache/pipenv" PIPENV_DONT_USE_PYENV: 1 PIPENV_HIDE_EMOJIS: 1 PIPENV_IGNORE_VIRTUALENVS: 1 PIPENV_NOSPIN: 1 steps: - task: UsePythonVersion@0 displayName: 'Set Python version' inputs: versionSpec: '3.7.x' addToPath: true - script: pip3 install pipenv displayName: 'Install pipenv' - script: pipenv install --dev --deploy --system displayName: 'Install project using pipenv' - script: python3 -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' - task: ShellScript@2 displayName: 'Build and deploy containers' inputs: scriptPath: scripts/deploy-azure.sh