-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjenkinsfile.disable.groovy
45 lines (38 loc) · 1.16 KB
/
jenkinsfile.disable.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
def repository = 'hydro-serving-cli'
def buildAndPublishReleaseFunction={
configFileProvider([configFile(fileId: 'PYPIDeployConfiguration', targetLocation: '.pypirc', variable: 'PYPI_SETTINGS')]) {
sh """#!/bin/bash
python3 -m venv venv &&
source venv/bin/activate
pip install wheel~=0.34.2 &&
pip install setuptools==39.0.1 &&
pip install twine &&
make PYTHON=python wheel &&
make PYTHON=python test &&
twine upload --config-file ${env.WORKSPACE}/.pypirc -r pypi ${env.WORKSPACE}/dist/*
"""
}
}
def buildFunction={
sh """#!/bin/bash
python3 -m venv venv &&
source venv/bin/activate
pip install wheel~=0.34.2 &&
pip install setuptools==39.0.1 &&
make PYTHON=python wheel &&
make PYTHON=python3 test &&
deactivate
"""
}
def collectTestResults = {
junit testResults: 'test-report.xml', allowEmptyResults: true
}
pipelineCommon(
repository,
false, //needSonarQualityGate,
[],
collectTestResults,
buildAndPublishReleaseFunction,
buildFunction,
buildFunction
)