Skip to content

Commit

Permalink
Merge pull request #209 from WorldCereal/user-preinstall-jenkins
Browse files Browse the repository at this point in the history
Enable jenkins pre-install script
  • Loading branch information
kvantricht authored Oct 30, 2024
2 parents fb4ebb8 + 20f6050 commit a9e321e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ pythonPipeline {
test_module_name = 'worldcereal'
wipeout_workspace = true
python_version = ["3.10"]
extras_require = "jenkins"
extras_require = "dev,train"
upload_dev_wheels = false
pipeline_triggers = [cron('H H(0-6) * * *')]
pep440 = true
pre_test_script = 'pre_test_script.sh'
pre_install_script = 'jenkins_pre_install_script.sh'
extra_env_variables = [
"OPENEO_AUTH_METHOD=client_credentials",
"OPENEO_OIDC_DEVICE_CODE_MAX_POLL_TIME=5",
Expand Down
28 changes: 28 additions & 0 deletions jenkins_pre_install_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Install git
dnf install git -y

# # Install openeo-gfmap and presto-worldcereal
# dir=$(pwd)
# GFMAP_URL="https://github.com/Open-EO/openeo-gfmap.git"
# PRESTO_URL="https://github.com/WorldCereal/presto-worldcereal.git"

# su - jenkins -c "cd $dir && \
# source venv310/bin/activate && \
# git clone $GFMAP_URL && \
# cd openeo-gfmap || { echo 'Directory not found! Exiting...'; exit 1; } && \
# pip install . && \
# cd ..
# git clone -b croptype $PRESTO_URL && \
# cd presto-worldcereal || { echo 'Directory not found! Exiting...'; exit 1; } && \
# pip install .
# "

# For now only presto-worldcereal as gfmap is up to date on pypi
dir=$(pwd)

su - jenkins -c "cd $dir && \
source venv310/bin/activate && \
pip install git+https://github.com/WorldCereal/presto-worldcereal.git@croptype
"
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,6 @@ train = [
"ipywidgets==8.1.3",
"duckdb==1.1.0"
]
jenkins = [
"pytest>=7.4.0",
"matplotlib>=3.3.0",
"catboost==1.2.5",
"scikit-learn==1.5.0",
"torch==2.3.1",
"ipywidgets==8.1.3",
"duckdb==1.1.0"
]

[tool.pytest.ini_options]
testpaths = [
Expand Down

0 comments on commit a9e321e

Please sign in to comment.