From 0db27f1ceff0f894484ad98062eb0ac14473a2de Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 9 Jun 2019 14:26:42 +0200 Subject: [PATCH] Update azure-pipelines-ci.yml for Azure Pipelines --- azure-pipelines-ci.yml | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 0b4d61a35b8..f9dda5b41f3 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -7,11 +7,21 @@ trigger: - dev pr: none +resources: + containers: + - container: 35 + image: homeassistant/ci-azure:3.5 + - container: 36 + image: homeassistant/ci-azure:3.6 + - container: 37 + image: homeassistant/ci-azure:3.7 + + variables: - name: ArtifactFeed value: '2df3ae11-3bf6-49bc-a809-ba0d340d6a6d' - name: PythonMain - value: '3.5' + value: '35' jobs: @@ -19,10 +29,8 @@ jobs: - job: 'Lint' pool: vmImage: 'ubuntu-latest' + container: $[ variables['PythonMain'] ] steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(PythonMain)' - script: | python -m venv lint @@ -43,20 +51,16 @@ jobs: matrix: Python35: python.version: '3.5' + python.container: '35' Python36: python.version: '3.6' + python.container: '36' Python37: python.version: '3.7' + python.container: '37' + container: $[ variables['python.container'] ] steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - script: | - set -e - - sudo add-apt-repository ppa:jonathonf/ffmpeg-4 - sudo apt-get update - echo "$(python.version)" > .cache displayName: 'Set up docker prerequisite requirement' @@ -69,14 +73,8 @@ jobs: - script: | set -e - - # Install build env - sudo apt-get install -y --no-install-recommends \ - libudev-dev libsqlite3-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev - - # Setup venv python -m venv venv - + . venv/bin/activate pip install -U pip setuptools pip install -r requirements_test_all.txt -c homeassistant/package_constraints.txt @@ -106,4 +104,4 @@ jobs: pylint homeassistant displayName: 'Run pylint' - condition: and(succeeded(), eq(variables['python.version'], variables['PythonMain'])) + condition: and(succeeded(), eq(variables['python.container'], variables['PythonMain'])) \ No newline at end of file