Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JenkinsConfiguration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
JenkinsConfiguration
Commits
8c30db92
Commit
8c30db92
authored
6 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
setting environment variables from config possible
parent
7ad5cdb1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+8
-0
8 additions, 0 deletions
README.md
vars/helper.groovy
+6
-0
6 additions, 0 deletions
vars/helper.groovy
with
14 additions
and
0 deletions
README.md
+
8
−
0
View file @
8c30db92
...
...
@@ -48,6 +48,14 @@ env.CTESTOPTS="-j1"
env.RUN_FROM_SUBDIR="examples"
```
-
Set extra environment variables:
The variables are gives as space separated lists of key=values pairs. The pairs must not have spaces. JOB_VARIABLES are applied to build and tests (incl. analysis), while TEST_VARIABLES are only in tests and analysis.
```
env.JOB_VARIABLES="A=aha B=bubu"
env.TEST_VARABLES="PATH=${PATH}:/some/path/for/the/test"
```
## Analysis jobs
-
Exclude tests from being run in valgrind (currently only possible with a single test):
```
...
...
This diff is collapsed.
Click to expand it.
vars/helper.groovy
+
6
−
0
View file @
8c30db92
...
...
@@ -166,6 +166,9 @@ def doBuild(String label, String buildType) {
else
SUBDIR="${env.RUN_FROM_SUBDIR}"
fi
for VAR in \${JOB_VARIABLES}; do
export ${VAR}
done
sudo -H -u msk_jenkins cmake /scratch/source/\${SUBDIR} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${buildType} -DSUPPRESS_AUTO_DOC_BUILD=true \${CMAKE_EXTRA_ARGS}
sudo -H -u msk_jenkins make ${env.MAKEOPTS}
"""
...
...
@@ -191,6 +194,9 @@ def doTest(String label, String buildType) {
if [ -z "\${CTESTOPTS}" ]; then
CTESTOPTS="${env.MAKEOPTS}"
fi
for VAR in \${JOB_VARIABLES} \${TEST_VARIABLES}; do
export ${VAR}
done
sudo -H -u msk_jenkins ctest --no-compress-output \${CTESTOPTS} -T Test -V || true
sudo -H -u msk_jenkins sed -i Testing/*/Test.xml -e 's_\\(^[[:space:]]*<Name>\\)\\(.*\\)\\(</Name>\\)\$_\\1${label}.${buildType}.\\2\\3_'
sudo -H -u msk_jenkins cp -r /scratch/build-${JOB_NAME}/Testing "${WORKSPACE}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment