Skip to content

Commit 68707c6

Browse files
authored
Merge pull request #78 from ess-dmsc/pyenv
use pyenv instead of conda
2 parents 6b6ca19 + 9f6f673 commit 68707c6

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

Jenkinsfile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import ecdcpipeline.ContainerBuildNode
33
import ecdcpipeline.PipelineBuilder
44

5-
project = "python-streaming-data-types"
6-
75
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')
97
]
108

119
// Define number of old builds to keep.
@@ -36,29 +34,26 @@ builders = pipeline_builder.createBuilders { container ->
3634

3735
pipeline_builder.stage("${container.key}: Dependencies") {
3836
container.sh """
39-
/opt/miniconda/bin/conda init bash
40-
export PATH=/opt/miniconda/bin:$PATH
41-
python --version
4237
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
4539
"""
4640
} // stage
4741

4842
pipeline_builder.stage("${container.key}: Test") {
4943
def test_output = "TestResults.xml"
5044
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
5348
python -m tox -- --junitxml=${test_output}
5449
"""
55-
container.copyFrom("${project}/${test_output}", ".")
50+
container.copyFrom("${pipeline_builder.project}/${test_output}", ".")
5651
xunit thresholds: [failed(unstableThreshold: '0')], tools: [JUnit(deleteOutputFiles: true, pattern: '*.xml', skipNoTestFiles: false, stopProcessingIfError: true)]
5752
} // stage
5853
} // createBuilders
5954

6055
node {
61-
dir("${project}") {
56+
dir("${pipeline_builder.project}") {
6257
scm_vars = checkout scm
6358
}
6459

requirements-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
black==22.3.0 # Pinned to match pre-commit config
33
flake8==4.0.1 # Pinned to match pre-commit config
44
isort==5.10.1 # Pinned to match pre-commit configblack
5-
flake8
65
pre-commit
76
pytest
8-
tox
7+
tox==3.27.1 # tox 4 seems to be broken at the moment
8+
tox-pyenv
99
twine
1010
wheel

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[tox]
2-
envlist = py36, py37, py38, flake8
3-
requires = tox-conda
2+
envlist = py37, py38, py39, flake8
43
isolated_build = true
54
skipsdist=true
65

0 commit comments

Comments
 (0)