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
5df94a31
Commit
5df94a31
authored
6 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
added script to build epics for doocs
parent
23dfa0dd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vars/buildEpicsForDoocs.groovy
+78
-0
78 additions, 0 deletions
vars/buildEpicsForDoocs.groovy
with
78 additions
and
0 deletions
vars/buildEpicsForDoocs.groovy
0 → 100644
+
78
−
0
View file @
5df94a31
/***********************************************************************************************************************
buildEpicsForDoocs() is called from pipeline script of the DOOCS_epics job
***********************************************************************************************************************/
// This is the function called from the pipeline script
def
call
()
{
// List of builds to be run. Format must be "<docker_image_name>-<cmake_build_type>"
def
builds
=
[
'xenial-Debug'
,
'xenial-Release'
,
'bionic-Debug'
,
'bionic-Release'
,
'tumbleweed-Debug'
,
'tumbleweed-Release'
]
pipeline
{
agent
none
stages
{
stage
(
'build'
)
{
// Run the build stages for all labels + build types in parallel, each in a separate docker container
steps
{
script
{
parallel
builds
.
collectEntries
{
[
"${it}"
:
transformIntoStep
(
it
)]
}
}
}
}
// end stage build
}
// end stages
}
// end pipeline
}
/**********************************************************************************************************************/
def
transformIntoStep
(
String
buildName
)
{
// split the build name at the '-'
def
(
label
,
buildType
)
=
buildName
.
tokenize
(
'-'
)
// we need to return a closure here, which is then passed to parallel() for execution
return
{
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 --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
.
image
(
"builder:${label}"
).
inside
(
dockerArgs
)
{
script
{
sh
'''
VERSION=3.14.12.6
sudo -E -u msk_jenkins wget https://epics.anl.gov/download/base/baseR${VERSION}.tar.gz
sudo -u msk_jenkins tar xf baseR${VERSION}.tar.gz
cd base-${VERSION}
echo "INSTALL_LOCATION=/export/epics" >> configure/CONFIG_SITE
export LC_ALL=en_US.UTF-8
mkdir -p /export/epics
chown msk_jenkins /export/epics
sudo -u msk_jenkins make all
# fix include directory as expected by DOOCS
cd /export/epics/include
ln -sfn `pwd` epics
# fix library directory as expected by DOOCS
cd /export/epics/lib
ln -sfn linux-x86_64/* .
mkdir -p /scratch
touch /scratch/dependencies.${JOB_NAME}.list
'''
sh
"""
sudo -u msk_jenkins tar zcf install-${JOB_NAME}-${label}-${buildType}.tgz /export /scratch
"""
archiveArtifacts
artifacts:
"install-${JOB_NAME}-${label}-${buildType}.tgz"
,
onlyIfSuccessful:
false
}
}
}
}
}
}
/**********************************************************************************************************************/
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