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
030f1932
Commit
030f1932
authored
6 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:ChimeraTK/JenkinsConfiguration
parents
f74e9e9b
8c30db92
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+8
-0
8 additions, 0 deletions
README.md
scripts/login_docker.sh
+1
-1
1 addition, 1 deletion
scripts/login_docker.sh
vars/buildTestDeploy.groovy
+1
-1
1 addition, 1 deletion
vars/buildTestDeploy.groovy
vars/helper.groovy
+6
-0
6 additions, 0 deletions
vars/helper.groovy
with
16 additions
and
2 deletions
README.md
+
8
−
0
View file @
030f1932
...
...
@@ -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.
scripts/login_docker.sh
+
1
−
1
View file @
030f1932
...
...
@@ -15,7 +15,7 @@ buildType=$3
buildNumber
=
$4
# should be the same as in the pipeline script (excluding the -u 0)
DOCKER_PARAMS
=
"--device=/dev/mtcadummys0 --device=/dev/mtcadummys1 --device=/dev/mtcadummys2 --device=/dev/mtcadummys3 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6 -v /var/run/lock/mtcadummy:/var/run/lock/mtcadummy"
DOCKER_PARAMS
=
"--device=/dev/mtcadummys0 --device=/dev/mtcadummys1 --device=/dev/mtcadummys2 --device=/dev/mtcadummys3 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6 -v /var/run/lock/mtcadummy:/var/run/lock/mtcadummy
-v /opt/matlab_R2016b:/opt/matlab_R2016b
"
# create and start container (use options to allow gdb inside!)
ID
=
`
docker create
--cap-add
=
SYS_PTRACE
--security-opt
seccomp
=
unconfined
-i
${
DOCKER_PARAMS
}
-v
/home/msk_jenkins:/home/msk_jenkins builder:
${
label
}
`
...
...
This diff is collapsed.
Click to expand it.
vars/buildTestDeploy.groovy
+
1
−
1
View file @
030f1932
...
...
@@ -111,7 +111,7 @@ def transformIntoStep(ArrayList<String> dependencyList, String buildName, String
stage
(
buildName
)
{
node
(
'Docker'
)
{
// we need root access inside the container and access to the dummy pcie devices of the host
def
dockerArgs
=
"-u 0 --privileged --device=/dev/mtcadummys0 --device=/dev/mtcadummys1 --device=/dev/mtcadummys2 --device=/dev/mtcadummys3 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6 -v /var/run/lock/mtcadummy:/var/run/lock/mtcadummy"
def
dockerArgs
=
"-u 0 --privileged --device=/dev/mtcadummys0 --device=/dev/mtcadummys1 --device=/dev/mtcadummys2 --device=/dev/mtcadummys3 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6 -v /var/run/lock/mtcadummy:/var/run/lock/mtcadummy
-v /opt/matlab_R2016b:/opt/matlab_R2016b
"
docker
.
image
(
"builder:${label}"
).
inside
(
dockerArgs
)
{
script
{
helper
.
doBuildTestDeploy
(
dependencyList
,
label
,
buildType
,
gitUrl
)
...
...
This diff is collapsed.
Click to expand it.
vars/helper.groovy
+
6
−
0
View file @
030f1932
...
...
@@ -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