Skip to content

Commit

Permalink
Jenkins test runs: set pytest basetemp inside workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Mar 31, 2023
1 parent cfbffbf commit a17bc23
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,6 @@ ENV/
openeo_driver/data
tmp*
temp*

# pytest basetemp root (e.g. for tmp_path fixture).
pytest-tmp
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ pythonPipeline {
docker_run_options_prod = ['-e ENV=prod', '-p 8081:8080']
pep440 = true
notification_channel = 'openeo-devs'
extra_env_variables = [
/* Set pytest `basetemp` inside Jenkins workspace. (Note: this is intentionally Jenkins specific, instead of a global pytest.ini thing.) */
"PYTEST_DEBUG_TEMPROOT=pytest-tmp",
]
pre_test_script = 'pre_test.sh'
}
6 changes: 6 additions & 0 deletions tests/pre_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -eux

pwd
mkdir -p pytest-tmp
chown jenkins pytest-tmp

0 comments on commit a17bc23

Please sign in to comment.