Skip to content

Commit 17db09f

Browse files
authored
Add environment and triggers (#838)
1 parent 48edc4c commit 17db09f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.azurepipelines/azure-pipelines-publish-pypi.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# MSTICPy PyPI Production pipeline
22

3+
trigger: none
4+
pr: none
5+
36
# This pipeline is used to publish the MSTICPy package to PyPI
47
name: 1ES-MSTICPy-Publish-$(date:yyyyMMdd)$(rev:.r)
58

@@ -38,6 +41,8 @@ extends:
3841
stages:
3942
- stage: publishTasks
4043
displayName: PublishTasks
44+
dependsOn: SDLSources
45+
environment: Production
4146
jobs:
4247
- job: publishJob
4348
displayName: PublishJob
@@ -46,7 +51,7 @@ extends:
4651
value: $(Pipeline.Workspace)\${{ parameters.Artifact }}
4752
steps:
4853
- checkout: self
49-
54+
5055
- task: UsePythonVersion@0
5156
inputs:
5257
versionSpec: '>=3.10'
@@ -88,4 +93,10 @@ extends:
8893
TWINE_REPOSITORY: ${{ parameters.Feed }}
8994
TWINE_USERNAME: __token__
9095
TWINE_PASSWORD: $(TWINE_PASSWORD)
91-
- powershell: echo Unrecognized feed "$( parameters.Feed )"
96+
- powershell: |
97+
echo Unrecognized feed "$( parameters.Feed )"
98+
exit 1
99+
# This is a catch-all for any unrecognized feed
100+
condition: and(succeeded(), ne('${{ parameters.Feed }}', 'testpypi'), ne('${{ parameters.Feed }}', 'pypi'))
101+
displayName: 'Check for unrecognized feed'
102+

0 commit comments

Comments
 (0)