# Pipeline Definition for Releases to PyPI # This Azure DevOps pipeline is for releasing fairlearn to PyPI. It performs the # following: # 1. Predeployment validation similar to the regular builds # 2. Release to PyPI-Test # - Create package # - Upload # - Run tests against package on PyPI-Test # 3. Release to PyPI itself, repeating the same stages # Note that the pipeline MUST be queued with a variable DEV_VERSION set to an # integer value. This is used to make the packages on PyPI-Test 'release # candidates' so that minor fixes can be made without requiring a separate checkin # to release to PyPI itself. See the logic in __init__.py # TODO: # Use Azure KeyVault so that uploads to PyPI actually occur variables: poolImage: "ubuntu-latest" poolPythonVersion: 3.6 FreezeFileStem: 'requirements-freeze-predeploy' trigger: none # No CI build pr: none # Not for pull requests stages: - stage: PreDeploymentValidation pool: vmImage: $(PoolImage) jobs: - template: templates/all-tests-job-template.yml parameters: name: Linux vmImage: 'ubuntu-16.04' pyVersions: [3.5, 3.6, 3.7] freezeArtifactStem: "PreDeployment" freezeFileStem: $(FreezeFileStem) - template: templates/all-tests-job-template.yml parameters: name: Windows vmImage: 'vs2017-win2016' pyVersions: [3.5, 3.6, 3.7] freezeArtifactStem: "PreDeployment" freezeFileStem: $(FreezeFileStem) - template: templates/all-tests-job-template.yml parameters: name: MacOS vmImage: 'macos-latest' pyVersions: [3.5, 3.6, 3.7] freezeArtifactStem: "PreDeployment" freezeFileStem: $(FreezeFileStem) - template: templates/notebook-job-template.yml parameters: name: LinuxNotebooks vmImage: 'ubuntu-16.04' pyVersions: [3.5, 3.6, 3.7] - template: templates/notebook-job-template.yml parameters: name: WindowsNotebooks vmImage: 'vs2017-win2016' pyVersions: [3.5, 3.6, 3.7] - template: templates/limited-installation-job-template.yml # ================================================================================================================= # We rely on the implicit dependence on the previous stage # No fan out/fan in of stages - template: templates/pypi-deployment-stages-template.yml parameters: poolImage: $(PoolImage) targetType: 'Test' kvSubscription: "Fairness - Automation (cecafb73-04ae-4432-9f96-d96925d28058)" # This is actually the name of the service connection from the Project Settings page kvVaultName: fairlearndeploy kvUsername: 'usernametest' kvPassword: 'passwordtest' freezeArtifactStem: 'Freeze' freezeFileStem: 'requirements-freeze' # ================================================================================================================= - template: templates/pypi-deployment-stages-template.yml parameters: poolImage: $(PoolImage) targetType: 'Prod' targetEnvironment: 'PyPI Deployment' kvSubscription: "Fairness - Automation (cecafb73-04ae-4432-9f96-d96925d28058)" # This is actually the name of the service connection from the Project Settings page kvVaultName: fairlearndeploy kvUsername: 'usernameprod' kvPassword: 'passwordprod' freezeArtifactStem: 'Freeze' freezeFileStem: 'requirements-freeze'