Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit ec3bc4a

Browse files
authored
Revert "feat: yaml linting (#18)" (#19)
This reverts commit 4842ea0. This formatting applied during this causes failures in Azure-Pipelines
1 parent 4842ea0 commit ec3bc4a

File tree

7 files changed

+223
-260
lines changed

7 files changed

+223
-260
lines changed

azure-pipelines.yaml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
11
# Pipeline for versioning and releasing the templates.
2-
---
3-
trigger:
4-
- master
52

6-
resources:
7-
repositories:
8-
- repository: templates
9-
type: github
10-
name: tomtom-international/azure-pipeline-templates
11-
ref: refs/heads/master
12-
# For github projects we need to define a service connection
13-
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#repository-resource
14-
endpoint: tomtom-international
3+
trigger:
4+
- master
155

166
jobs:
17-
- job: 'Linux'
18-
strategy:
19-
matrix:
20-
Python37:
21-
python.version: '3.7'
7+
- job: Release
8+
condition: and(eq(variables['Build.Reason'], 'Manual'), eq(variables['release'], 'true'))
229
pool:
2310
vmImage: 'ubuntu-16.04'
11+
variables:
12+
- group: GitHub
2413
steps:
25-
- template: steps/yaml/yaml.lint.yml
14+
- bash: echo "Hello World"

jobs/python.setup.py.yml

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# * Releasing on-demand the Python package to PyPI
77
# * This can be achieved by triggering a manual build and providing a queue variable 'release: true'
88
#
9-
---
9+
1010
parameters:
1111
dockerDeploy: true
1212
dockerDeployFile: "Dockerfile"
@@ -18,76 +18,76 @@ parameters:
1818
pythonUseVersion: "3.6"
1919

2020
jobs:
21-
- job: 'Linux'
22-
strategy:
23-
matrix:
24-
Python35:
25-
python.version: '3.5'
26-
Python36:
27-
python.version: '3.6'
28-
Python37:
29-
python.version: '3.7'
30-
pool:
31-
vmImage: 'ubuntu-16.04'
32-
steps:
33-
- template: ../steps/python/python.build.yml
21+
- job: 'Linux'
22+
strategy:
23+
matrix:
24+
Python35:
25+
python.version: '3.5'
26+
Python36:
27+
python.version: '3.6'
28+
Python37:
29+
python.version: '3.7'
30+
pool:
31+
vmImage: 'ubuntu-16.04'
32+
steps:
33+
- template: ../steps/python/python.build.yml
3434

3535

36-
- job: 'macOS'
37-
strategy:
38-
matrix:
39-
Python35:
40-
python.version: '3.5'
41-
Python36:
42-
python.version: '3.6'
43-
Python37:
44-
python.version: '3.7'
45-
pool:
46-
vmImage: 'macos-10.13'
47-
steps:
48-
- template: ../steps/python/python.build.yml
36+
- job: 'macOS'
37+
strategy:
38+
matrix:
39+
Python35:
40+
python.version: '3.5'
41+
Python36:
42+
python.version: '3.6'
43+
Python37:
44+
python.version: '3.7'
45+
pool:
46+
vmImage: 'macos-10.13'
47+
steps:
48+
- template: ../steps/python/python.build.yml
4949

5050

51-
- job: 'Windows'
52-
strategy:
53-
matrix:
54-
Python35:
55-
python.version: '3.5'
56-
Python36:
57-
python.version: '3.6'
58-
Python37:
59-
python.version: '3.7'
60-
pool:
61-
vmImage: 'vs2017-win2016'
62-
steps:
63-
- template: ../steps/python/python.build.yml
51+
- job: 'Windows'
52+
strategy:
53+
matrix:
54+
Python35:
55+
python.version: '3.5'
56+
Python36:
57+
python.version: '3.6'
58+
Python37:
59+
python.version: '3.7'
60+
pool:
61+
vmImage: 'vs2017-win2016'
62+
steps:
63+
- template: ../steps/python/python.build.yml
6464

6565

66-
- job: 'Deploy'
67-
dependsOn:
68-
- macOS
69-
- Linux
70-
- Windows
71-
condition: |
72-
and(succeeded('macOS'),
73-
succeeded('Windows'),
74-
succeeded('Linux'),
75-
eq(variables['Build.Reason'], 'Manual'),
76-
or(eq(variables['release'], 'true'),
77-
eq(variables['dockerSnapshot'], 'true')))
78-
pool:
79-
vmImage: 'ubuntu-16.04'
80-
variables:
81-
- group: GitHub
82-
steps:
83-
- template: ../steps/python/python.deploy.yml
84-
parameters:
85-
dockerDeploy: "${{ parameters.dockerDeploy }}"
86-
dockerDeployFile: "${{ parameters.dockerDeployFile }}"
87-
dockerRegistryConnector: "${{ parameters.dockerRegistryConnector }}"
88-
dockerRepo: "${{ parameters.dockerRepo }}"
89-
gitCiToken: "$(GH_TOKEN)"
90-
gitCiUserMail: "$(GH_USER_MAIL)"
91-
gitCiUserName: "$(GH_USER_NAME)"
92-
pypiConnector: "${{ parameters.pypiConnector }}"
93-
pythonUseVersion: "${{ parameters.pythonUseVersion }}"
66+
- job: 'Deploy'
67+
dependsOn:
68+
- macOS
69+
- Linux
70+
- Windows
71+
condition: |
72+
and(succeeded('macOS'),
73+
succeeded('Windows'),
74+
succeeded('Linux'),
75+
eq(variables['Build.Reason'], 'Manual'),
76+
or(eq(variables['release'], 'true'),
77+
eq(variables['dockerSnapshot'], 'true')))
78+
pool:
79+
vmImage: 'ubuntu-16.04'
80+
variables:
81+
- group: GitHub
82+
steps:
83+
- template: ../steps/python/python.deploy.yml
84+
parameters:
85+
dockerDeploy: "${{ parameters.dockerDeploy }}"
86+
dockerDeployFile: "${{ parameters.dockerDeployFile }}"
87+
dockerRegistryConnector: "${{ parameters.dockerRegistryConnector }}"
88+
dockerRepo: "${{ parameters.dockerRepo }}"
89+
gitCiToken: "$(GH_TOKEN)"
90+
gitCiUserMail: "$(GH_USER_MAIL)"
91+
gitCiUserName: "$(GH_USER_NAME)"
92+
pypiConnector: "${{ parameters.pypiConnector }}"
93+
pythonUseVersion: "${{ parameters.pythonUseVersion }}"

steps/python/python.build.yml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,46 @@
22
#
33
# Build, lint and test Python modules based on setuptools (setup.py)
44
#
5-
---
5+
66
steps:
7-
- task: UsePythonVersion@0
8-
inputs:
9-
versionSpec: $(python.version)
10-
architecture: "x64"
11-
12-
- bash: |
13-
if [ ! -f requirements_dev.txt ]; then
14-
echo "ERROR: no requirements_dev.txt available in project!"
15-
exit 1
16-
fi
17-
pip install --user --no-cache-dir -r requirements_dev.txt
18-
displayName: "Install build & test prerequisites"
19-
20-
- script: python setup.py build
21-
displayName: "Build"
22-
23-
- script: |
24-
python setup.py install --user
25-
python setup.py lint --lint-output-format parseable
26-
condition: eq(variables['Agent.OS'], 'Linux')
27-
displayName: "Pylint"
28-
29-
- script: |
30-
python setup.py test --addopts "--cov-report xml:build/coverage.xml --cov-report term --cov-branch --junitxml=build/test_results.xml"
31-
displayName: "Tests"
32-
33-
- script: |
34-
python setup.py install --user
35-
python setup.py build_sphinx
36-
displayName: "Docs"
37-
38-
- task: PublishTestResults@2
39-
condition: succeededOrFailed()
40-
inputs:
7+
- task: UsePythonVersion@0
8+
inputs:
9+
versionSpec: $(python.version)
10+
architecture: "x64"
11+
12+
- bash: |
13+
if [ ! -f requirements_dev.txt ]; then
14+
echo "ERROR: no requirements_dev.txt available in project!"
15+
exit 1
16+
fi
17+
pip install --user --no-cache-dir -r requirements_dev.txt
18+
displayName: "Install build & test prerequisites"
19+
20+
- script: python setup.py build
21+
displayName: "Build"
22+
23+
- script: |
24+
python setup.py install --user
25+
python setup.py lint --lint-output-format parseable
26+
condition: eq(variables['Agent.OS'], 'Linux')
27+
displayName: "Pylint"
28+
29+
- script: |
30+
python setup.py test --addopts "--cov-report xml:build/coverage.xml --cov-report term --cov-branch --junitxml=build/test_results.xml"
31+
displayName: "Tests"
32+
33+
- script: |
34+
python setup.py install --user
35+
python setup.py build_sphinx
36+
displayName: "Docs"
37+
38+
- task: PublishTestResults@2
39+
condition: succeededOrFailed()
40+
inputs:
4141
testResultsFiles: "**/test*.xml"
4242
testRunTitle: "$(Agent.OS) - $(Build.BuildNumber)[$(Agent.JobName)]"
4343

44-
- task: PublishCodeCoverageResults@1
45-
inputs:
44+
- task: PublishCodeCoverageResults@1
45+
inputs:
4646
codeCoverageTool: Cobertura
4747
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'

0 commit comments

Comments
 (0)