|
2 | 2 | import ecdcpipeline.ContainerBuildNode |
3 | 3 | import ecdcpipeline.PipelineBuilder |
4 | 4 |
|
5 | | -project = "python-streaming-data-types" |
6 | | - |
7 | 5 | container_build_nodes = [ |
8 | | - 'centos7-release': ContainerBuildNode.getDefaultContainerBuildNode('centos7-gcc8'), |
| 6 | + 'centos7': new ContainerBuildNode('dockerregistry.esss.dk/ecdc_group/build-node-images/centos7-build-node:10.0.2-dev', '/usr/bin/scl enable devtoolset-11 rh-python38 -- /bin/bash -e -x') |
9 | 7 | ] |
10 | 8 |
|
11 | 9 | // Define number of old builds to keep. |
@@ -36,29 +34,26 @@ builders = pipeline_builder.createBuilders { container -> |
36 | 34 |
|
37 | 35 | pipeline_builder.stage("${container.key}: Dependencies") { |
38 | 36 | container.sh """ |
39 | | - /opt/miniconda/bin/conda init bash |
40 | | - export PATH=/opt/miniconda/bin:$PATH |
41 | | - python --version |
42 | 37 | which python |
43 | | - python -m pip install --user -r ${project}/requirements.txt |
44 | | - python -m pip install --user -r ${project}/requirements-dev.txt |
| 38 | + python -m pip install --user -r ${pipeline_builder.project}/requirements-dev.txt |
45 | 39 | """ |
46 | 40 | } // stage |
47 | 41 |
|
48 | 42 | pipeline_builder.stage("${container.key}: Test") { |
49 | 43 | def test_output = "TestResults.xml" |
50 | 44 | container.sh """ |
51 | | - export PATH=/opt/miniconda/bin:$PATH |
52 | | - cd ${project} |
| 45 | + cd ${pipeline_builder.project} |
| 46 | + pyenv local 3.7 3.8 3.9 |
| 47 | + pyenv versions |
53 | 48 | python -m tox -- --junitxml=${test_output} |
54 | 49 | """ |
55 | | - container.copyFrom("${project}/${test_output}", ".") |
| 50 | + container.copyFrom("${pipeline_builder.project}/${test_output}", ".") |
56 | 51 | xunit thresholds: [failed(unstableThreshold: '0')], tools: [JUnit(deleteOutputFiles: true, pattern: '*.xml', skipNoTestFiles: false, stopProcessingIfError: true)] |
57 | 52 | } // stage |
58 | 53 | } // createBuilders |
59 | 54 |
|
60 | 55 | node { |
61 | | - dir("${project}") { |
| 56 | + dir("${pipeline_builder.project}") { |
62 | 57 | scm_vars = checkout scm |
63 | 58 | } |
64 | 59 |
|
|
0 commit comments