Generate worker.py for different host version (#605)
* Generate worker.py from different host config * Use worker path * Update proto packages with identity and shared * Add workerPath to parameters Co-authored-by: Maheer Iqbal <42051041+maiqbal11@users.noreply.github.com>
This commit is contained in:
Родитель
676a8e578c
Коммит
e507a984a4
|
@ -60,16 +60,26 @@ jobs:
|
|||
vmImage: 'vs2017-win2016'
|
||||
strategy:
|
||||
matrix:
|
||||
Python36:
|
||||
Python36V2:
|
||||
pythonVersion: '3.6'
|
||||
Python37:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python37V2:
|
||||
pythonVersion: '3.7'
|
||||
Python38:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python36V3:
|
||||
pythonVersion: '3.6'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python37V3:
|
||||
pythonVersion: '3.7'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python38V3:
|
||||
pythonVersion: '3.8'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
steps:
|
||||
- template: pack/templates/win_env_gen.yml
|
||||
parameters:
|
||||
pythonVersion: '$(pythonVersion)'
|
||||
workerPath: '$(workerPath)'
|
||||
architecture: 'x64'
|
||||
artifactName: '$(pythonVersion)_WINDOWS_X64'
|
||||
- job: Build_WINDOWS_X86
|
||||
|
@ -78,14 +88,20 @@ jobs:
|
|||
vmImage: 'vs2017-win2016'
|
||||
strategy:
|
||||
matrix:
|
||||
Python37:
|
||||
Python37V2:
|
||||
pythonVersion: '3.7'
|
||||
Python38:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python37V3:
|
||||
pythonVersion: '3.7'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python38V3:
|
||||
pythonVersion: '3.8'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
steps:
|
||||
- template: pack/templates/win_env_gen.yml
|
||||
parameters:
|
||||
pythonVersion: '$(pythonVersion)'
|
||||
workerPath: '$(workerPath)'
|
||||
architecture: 'x86'
|
||||
artifactName: '$(pythonVersion)_WINDOWS_x86'
|
||||
- job: Build_LINUX_X64
|
||||
|
@ -94,16 +110,26 @@ jobs:
|
|||
vmImage: 'ubuntu-16.04'
|
||||
strategy:
|
||||
matrix:
|
||||
Python36:
|
||||
Python36V2:
|
||||
pythonVersion: '3.6'
|
||||
Python37:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python37V2:
|
||||
pythonVersion: '3.7'
|
||||
Python38:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python36V3:
|
||||
pythonVersion: '3.6'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python37V3:
|
||||
pythonVersion: '3.7'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python38V3:
|
||||
pythonVersion: '3.8'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
steps:
|
||||
- template: pack/templates/nix_env_gen.yml
|
||||
parameters:
|
||||
pythonVersion: '$(pythonVersion)'
|
||||
workerPath: '$(workerPath)'
|
||||
artifactName: '$(pythonVersion)_LINUX_X64'
|
||||
- job: Build_OSX_X64
|
||||
dependsOn: 'Tests'
|
||||
|
@ -111,16 +137,26 @@ jobs:
|
|||
vmImage: 'macOS-10.13'
|
||||
strategy:
|
||||
matrix:
|
||||
Python36:
|
||||
Python36V2:
|
||||
pythonVersion: '3.6'
|
||||
Python37:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python37V2:
|
||||
pythonVersion: '3.7'
|
||||
Python38:
|
||||
workerPath: 'python/prodV2/worker.py'
|
||||
Python36V3:
|
||||
pythonVersion: '3.6'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python37V3:
|
||||
pythonVersion: '3.7'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
Python38V3:
|
||||
pythonVersion: '3.8'
|
||||
workerPath: 'python/prodV3/worker.py'
|
||||
steps:
|
||||
- template: pack/templates/nix_env_gen.yml
|
||||
parameters:
|
||||
pythonVersion: '$(pythonVersion)'
|
||||
workerPath: '$(workerPath)'
|
||||
artifactName: '$(pythonVersion)_OSX_X64'
|
||||
|
||||
- job: PackageWorkers
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
parameters:
|
||||
pythonVersion: ''
|
||||
artifactName: ''
|
||||
workerPath: ''
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
|
@ -8,7 +9,7 @@ steps:
|
|||
versionSpec: ${{ parameters.pythonVersion }}
|
||||
addToPath: true
|
||||
- task: ShellScript@2
|
||||
inputs:
|
||||
inputs:
|
||||
disableAutoCwd: true
|
||||
scriptPath: 'pack/scripts/nix_deps.sh'
|
||||
- task: CopyFiles@2
|
||||
|
@ -20,9 +21,9 @@ steps:
|
|||
- task: CopyFiles@2
|
||||
inputs:
|
||||
contents: |
|
||||
python/prod/worker.py
|
||||
${{ parameters.workerPath }}
|
||||
targetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
flattenFolders: true
|
||||
flattenFolders: true
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: '$(Build.SourcesDirectory)/deps'
|
||||
|
@ -34,4 +35,4 @@ steps:
|
|||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
artifactName: ${{ parameters.artifactName }}
|
||||
artifactName: ${{ parameters.artifactName }}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
parameters:
|
||||
pythonVersion: ''
|
||||
artifactName: ''
|
||||
workerPath: ''
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
|
@ -20,7 +21,7 @@ steps:
|
|||
- task: CopyFiles@2
|
||||
inputs:
|
||||
contents: |
|
||||
python\prod\worker.py
|
||||
${{ parameters.workerPath }}
|
||||
targetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
flattenFolders: true
|
||||
- task: CopyFiles@2
|
||||
|
|
2
setup.py
2
setup.py
|
@ -255,6 +255,8 @@ setup(
|
|||
license='MIT',
|
||||
packages=['azure_functions_worker',
|
||||
'azure_functions_worker.protos',
|
||||
'azure_functions_worker.protos.identity',
|
||||
'azure_functions_worker.protos.shared',
|
||||
'azure_functions_worker.bindings'],
|
||||
install_requires=[
|
||||
'grpcio==1.26.0',
|
||||
|
|
Загрузка…
Ссылка в новой задаче