88
99pool :
1010 vmImage : ubuntu-latest
11+
1112strategy :
1213 matrix :
1314 Python39 :
@@ -16,25 +17,37 @@ strategy:
1617 # python.version: '3.11'
1718
1819steps :
19- - task : UsePythonVersion@0
20- inputs :
21- versionSpec : ' $(python.version)'
22- displayName : ' Use Python $(python.version)'
23-
24- - script : |
25- python -m pip install --upgrade pip
26- pip install -r requirements.txt
27- displayName : ' Install dependencies'
28-
29- - script : |
30- pip install pytest pytest-azurepipelines
31- pytest
32- displayName : ' pytest'
33-
34- - task : AzureRmWebAppDeployment@4
35- inputs :
36- ConnectionType : ' AzureRM'
37- azureSubscription : ' julia-test-service-conn-workflow-identity'
38- appType : ' webAppLinux'
39- WebAppName : ' ceb-pipelines-flask-webapp'
40- packageForLinux : ' $(System.DefaultWorkingDirectory)/**'
20+ - task : UsePythonVersion@0
21+ inputs :
22+ versionSpec : ' $(pythonVersion)'
23+ displayName : ' Use Python $(pythonVersion)'
24+
25+ - script : |
26+ python -m venv antenv
27+ source antenv/bin/activate
28+ python -m pip install --upgrade pip
29+ pip install setup
30+ pip install --target="./.python_packages/lib/site-packages" -r ./requirements.txt
31+ workingDirectory: $(projectRoot)
32+ displayName: "Install requirements"
33+
34+ - task : ArchiveFiles@2
35+ inputs :
36+ rootFolderOrFile : ' $(Build.SourcesDirectory)'
37+ includeRootFolder : false
38+ archiveType : ' zip'
39+ archiveFile : ' $(Build.ArtifactStagingDirectory)/Application$(Build.BuildId).zip'
40+ replaceExistingArchive : true
41+ displayName : ' Create deployment package'
42+
43+ - publish : $(Build.ArtifactStagingDirectory)/Application$(Build.BuildId).zip
44+ displayName : ' Upload package'
45+ artifact : drop
46+
47+ - task : AzureRmWebAppDeployment@4
48+ inputs :
49+ ConnectionType : ' AzureRM'
50+ azureSubscription : ' julia-test-service-conn-workflow-identity'
51+ appType : ' webAppLinux'
52+ WebAppName : ' ceb-pipelines-flask-webapp'
53+ packageForLinux : ' $(System.DefaultWorkingDirectory)/**/*.zip'
0 commit comments