Skip to content

Commit 6102de5

Browse files
author
Jim Robinson
committed
Add pipeline
1 parent c825f9b commit 6102de5

File tree

2 files changed

+37
-25
lines changed

2 files changed

+37
-25
lines changed

azure-pipelines.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,34 @@
44
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
55

66
trigger:
7-
- master
7+
- main
88

99
pool:
1010
vmImage: ubuntu-latest
1111
resources:
1212
repositories:
13-
- repository: templates
14-
type: github
15-
name: CroudTech/devops-azure-pipelines-step-templates
16-
ref: master
17-
endpoint: CroudTech
18-
- repository: self
13+
- repository: templates
14+
type: github
15+
name: CroudTech/devops-azure-pipelines-step-templates
16+
ref: master
17+
endpoint: CroudTech
18+
- repository: self
1919
variables:
2020
- group: "package_managers"
2121
- name: python_version
2222
value: 3.8
2323
jobs:
24+
- job: PythonTest
25+
steps:
26+
- template: test/python-test.yaml@templates
27+
parameters:
28+
coverage: app,core,status
29+
root_dir: ./
30+
python_version: 3.9
2431
- job: build
2532
displayName: Build
33+
dependsOn: PythonTest
34+
condition: and(succeeded(), in(variables['Build.SourceBranchName'], 'integration', 'main'))
2635
steps:
2736
- task: UsePythonVersion@0
2837
inputs:
@@ -34,18 +43,27 @@ jobs:
3443
versionSpec: 5.x
3544
- task: gitversion/execute@0
3645
displayName: Use GitVersion
37-
- script: |
46+
- script: |
3847
pip install -r requirements.dev.txt
3948
python -m build
4049
python -m twine upload ./dist/* --non-interactive -u __token__ -p $(pypi_token)
4150
- job: GithubRelease
4251
dependsOn: build
4352
displayName: GithubRelease
4453
steps:
45-
- template: release/github-release.yaml@templates
46-
parameters:
47-
semVer: $(semVer)
48-
github_access_token: $(github_access_token)
49-
github_org: CroudTech
50-
github_repo: croudtech-python-bootstrap-app
51-
54+
- task: UsePythonVersion@0
55+
inputs:
56+
versionSpec: "3.8"
57+
addToPath: true
58+
architecture: "x64"
59+
- script: |
60+
pip install -r requirements.dev.txt
61+
pip install pyinstaller
62+
pyinstaller --onefile ./croudtech_bootstrap_app/croudtech-bootstrap.py --clean
63+
cp ./dist/croudtech-bootstrap $(Build.ArtifactStagingDirectory)/croudtech-bootstrap
64+
- template: release/github-release.yaml@templates
65+
parameters:
66+
semVer: $(semVer)
67+
github_access_token: $(github_access_token)
68+
github_org: CroudTech
69+
github_repo: croudtech-python-bootstrap-app

setup.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
VERSION = os.getenv("SEMVER", os.getenv("GitVersion_FullSemVer", "dev"))
55

6+
with open(os.path.join(os.getcwd(), "requirements.txt")) as f:
7+
required = f.read().splitlines()
8+
69

710
def get_long_description():
811
with open(
@@ -31,16 +34,7 @@ def get_long_description():
3134
[console_scripts]
3235
croudtech-ecs-tools=croudtech_ecs_tools.cli:cli
3336
""",
34-
install_requires=[
35-
"boto3==1.20.28",
36-
"botocore==1.23.28; python_version >= '3.6'",
37-
"click==8.0.3",
38-
"jmespath==0.10.0; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
39-
"python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
40-
"s3transfer==0.5.0; python_version >= '3.6'",
41-
"six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
42-
"urllib3==1.26.7; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'",
43-
],
37+
install_requires=required,
4438
extras_require={
4539
"test": ["pytest"]
4640
},

0 commit comments

Comments
 (0)