diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 33849353c855..931b4c690bef 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -45,7 +45,7 @@ stages: RepoId: Azure/azure-sdk-for-python WorkingDirectory: $(System.DefaultWorkingDirectory) - - ${{if ne(artifact.options.skipPublishPackage, 'true')}}: + - ${{if ne(artifact.skipPublishPackage, 'true')}}: - deployment: PublishPackage displayName: "Publish to PyPI" condition: and(succeeded(), ne(variables['Skip.PublishPackage'], 'true')) @@ -103,7 +103,7 @@ stages: echo "Uploaded sdist to devops feed" displayName: 'Publish package to feed: ${{parameters.DevFeedName}}' - - ${{if ne(artifact.options.skipPublishDocs, 'true')}}: + - ${{if ne(artifact.skipPublishDocs, 'true')}}: - deployment: PublishGitHubIODocs displayName: Publish Docs to GitHubIO Blob Storage condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) @@ -138,7 +138,7 @@ stages: # we override the regular script path because we have cloned the build tools repo as a separate artifact. ScriptPath: 'eng/common/scripts/copy-docs-to-blobstorage.ps1' - - ${{if ne(artifact.options.skipPublishDocs, 'true')}}: + - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: PublishDocs displayName: "Docs.MS Release" condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true')) @@ -187,7 +187,7 @@ stages: GHReviewersVariable: 'OwningGHUser' CIConfigs: $(CIConfigs) - - ${{if ne(artifact.options.skipUpdatePackageVersion, 'true')}}: + - ${{if ne(artifact.skipPublishDocGithubIo, 'true')}}: - deployment: UpdatePackageVersion displayName: "Update Package Version" condition: and(succeeded(), ne(variables['Skip.UpdatePackageVersion'], 'true')) @@ -255,23 +255,24 @@ stages: artifactFeeds: $(DevFeedName) - ${{ each artifact in parameters.Artifacts }}: - - pwsh: | - Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}} - New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace) - $underscorePrefix = "${{artifact.name}}" - $dashPrefix = "${{artifact.name}}".Replace("_", "-") - Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} - Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} - Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} + - ${{if ne(artifact.skipPublishDevFeed, 'true')}}: + - pwsh: | + Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}} + New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace) + $underscorePrefix = "${{artifact.name}}" + $dashPrefix = "${{artifact.name}}".Replace("_", "-") + Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} + Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]*a[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}} + Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} - $fileCount = (Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} | Measure-Object).Count - if ($fileCount -eq 0) { - Write-Host "No alpha packages for ${{artifact.safeName}} to publish." - exit 0 - } + $fileCount = (Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}} | Measure-Object).Count + if ($fileCount -eq 0) { + Write-Host "No alpha packages for ${{artifact.safeName}} to publish." + exit 0 + } - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.whl - echo "Uploaded whl to devops feed $(DevFeedName)" - twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.zip - echo "Uploaded sdist to devops feed $(DevFeedName)" - displayName: 'Publish ${{artifact.name}} alpha package' \ No newline at end of file + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.whl + echo "Uploaded whl to devops feed $(DevFeedName)" + twine upload --repository $(DevFeedName) --config-file $(PYPIRC_PATH) $(Pipeline.Workspace)/${{artifact.safeName}}/*a*.zip + echo "Uploaded sdist to devops feed $(DevFeedName)" + displayName: 'Publish ${{artifact.name}} alpha package' \ No newline at end of file