Skip to content

Commit cd2cbe2

Browse files
author
Jim Robinson
committed
Add pipeline
1 parent ea9014c commit cd2cbe2

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

azure-pipelines.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,52 @@ variables:
2424
jobs:
2525
- job: build
2626
displayName: Build
27-
condition: in(variables['Build.SourceBranchName'], 'integration', 'main', 'master')
27+
condition: in(variables['Build.SourceBranchNametrigger:
28+
- master
29+
30+
pool:
31+
vmImage: ubuntu-latest
32+
resources:
33+
repositories:
34+
- repository: templates
35+
type: github
36+
name: CroudTech/devops-azure-pipelines-step-templates
37+
ref: master
38+
endpoint: CroudTech
39+
- repository: self
40+
variables:
41+
- group: "package_managers"
42+
- name: python_version
43+
value: 3.8
44+
jobs:
45+
- job: build
46+
displayName: Build
47+
steps:
48+
- task: UsePythonVersion@0
49+
inputs:
50+
versionSpec: "$(python_version)"
51+
displayName: "Use Python $(python_version)"
52+
- task: gitversion/setup@0
53+
displayName: Install GitVersion
54+
inputs:
55+
versionSpec: 5.x
56+
- task: gitversion/execute@0
57+
displayName: Use GitVersion
58+
- script: |
59+
pip install -r requirements.dev.txt
60+
python -m build
61+
python -m twine upload ./dist/* --non-interactive -u __token__ -p $(pypi_token)
62+
- job: GithubRelease
63+
dependsOn: build
64+
displayName: GithubRelease
65+
steps:
66+
- template: release/github-release.yaml@templates
67+
parameters:
68+
semVer: $(semVer)
69+
github_access_token: $(github_access_token)
70+
github_org: CroudTech
71+
github_repo: croudtech-python-bootstrap-app
72+
'], 'integration', 'main', 'master')
2873
steps:
2974
- task: UsePythonVersion@0
3075
inputs:
@@ -38,7 +83,7 @@ jobs:
3883
displayName: Use GitVersion
3984
- script: |
4085
pip install -r requirements.dev.txt
41-
python setup.py build sdist
86+
python setup.py sdist
4287
python -m twine upload ./dist/* --non-interactive -u __token__ -p $(pypi_token)
4388
- job: GithubRelease
4489
dependsOn: build

0 commit comments

Comments
 (0)