From 5c1ebaa8b6d95b56db726a58f49700f7284d6914 Mon Sep 17 00:00:00 2001 From: Anne Griffith Date: Wed, 25 Sep 2024 12:57:28 +0100 Subject: [PATCH 1/4] changes to jenkinsfile --- Jenkinsfile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff85bf796..b429d728d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,7 +63,7 @@ pipeline { unstash name: 'Checkout' sh ''' - PATH=$WORKSPACE/venv/bin:/usr/local/bin:$PATH + PATH=$WORKSPACE/venv/bin:/usr/local/bin:/root/.local/bin:$PATH python3 -m pip install -U pip pip3 install virtualenv @@ -72,15 +72,15 @@ pipeline { virtualenv venv fi . venv/bin/activate + export PIP_USER=false - python -m pip install -U pip - pip3 install pypandoc==1.7.5 + pip3 install pypandoc # Remove pydoop from requirements before it's installed. awk '!/pydoop.*/' requirements.txt > temp && mv temp requirements.txt pip3 install -r requirements.txt - pip3 install pyspark==2.4.0 + pip3 install pyspark==3.2.3 or pip3 install pyspark==3.3.0 pip3 freeze @@ -105,8 +105,13 @@ pipeline { sh ''' . venv/bin/activate - coverage run --branch --source=./${PROJECT_NAME} --omit=src/utils/hdfs_mods.py,src/utils/wrappers.py,src/utils/runlog.py,src/_version.py,src/pipeline.py \ - -m pytest -ra ./tests --ignore=tests/test_utils/test_hdfs_mods.py + python3 -m pytest --junitxml "junit-report.xml" "./tests" + ''' + + junit restResults: 'junit-report.xml' + + /* coverage run --branch --source=./${PROJECT_NAME} --omit=src/utils/hdfs_mods.py,src/utils/wrappers.py,src/utils/runlog.py,src/_version.py,src/pipeline.py \ + -m pytest -ra ./tests --ignore=tests/test_utils/test_hdfs_mods.py ''' /* // Lines below create a coverage report for on Jenkins. Currently commented out @@ -141,8 +146,8 @@ pipeline { steps { onStage() colourText('info', "Building Python package.") - unstash name: 'Checkout' - unstash name: 'venv' + // unstash name: 'Checkout' + // unstash name: 'venv' sh ''' . venv/bin/activate From 493fc33df14e94f06e402dbbd9b211d9a0198cd0 Mon Sep 17 00:00:00 2001 From: Anne Griffith Date: Wed, 25 Sep 2024 13:44:39 +0100 Subject: [PATCH 2/4] only one version of pyspark in jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b429d728d..d45a2488b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -80,7 +80,7 @@ pipeline { awk '!/pydoop.*/' requirements.txt > temp && mv temp requirements.txt pip3 install -r requirements.txt - pip3 install pyspark==3.2.3 or pip3 install pyspark==3.3.0 + pip3 install pyspark==3.2.3 pip3 freeze From 2e11c9b3d0ab33bb3cca89c7e2ac34403ab44c8b Mon Sep 17 00:00:00 2001 From: Anne Griffith Date: Wed, 25 Sep 2024 13:48:15 +0100 Subject: [PATCH 3/4] remove pyspark as not needed --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d45a2488b..b20375bb9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -80,7 +80,6 @@ pipeline { awk '!/pydoop.*/' requirements.txt > temp && mv temp requirements.txt pip3 install -r requirements.txt - pip3 install pyspark==3.2.3 pip3 freeze From 88192310b5c6a4a6cefc195c229b71842ff6b75c Mon Sep 17 00:00:00 2001 From: Anne Griffith Date: Wed, 25 Sep 2024 13:49:53 +0100 Subject: [PATCH 4/4] update to version 2.0.2 --- src/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_version.py b/src/_version.py index 159d48b87..0309ae290 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1 +1 @@ -__version__ = "2.0.1" +__version__ = "2.0.2"