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
50cdd75f
Commit
50cdd75f
authored
6 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
try generating the parallel jobs from a list
parent
ccb1bd59
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/buildTestDeploy.groovy
+32
-74
32 additions, 74 deletions
vars/buildTestDeploy.groovy
with
32 additions
and
74 deletions
vars/buildTestDeploy.groovy
+
32
−
74
View file @
50cdd75f
...
...
@@ -32,6 +32,17 @@
***********************************************************************************************************************/
def
builds
=
[
'xenial-Debug'
,
'xenial-Release'
,
'bionic-Debug'
,
'bionic-Release'
,
'tumbleweed-Debug'
,
'tumbleweed-Release'
]
/**********************************************************************************************************************/
// This is the function called from the .jenkinsfile
def
call
(
ArrayList
<
String
>
dependencyList
)
{
pipeline
{
...
...
@@ -40,80 +51,7 @@ def call(ArrayList<String> dependencyList) {
stage
(
'build'
)
{
// Run the build stages for all labels + build types in parallel, each in a separate docker container
// Note: If the list of labels + build types is extended here, don't forget to update also the doPublish() function!
parallel
{
stage
(
'Ubuntu 16.04 Release'
)
{
agent
{
docker
{
image
"builder:xenial"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
"Ubuntu1604"
,
"Release"
)
}
}
stage
(
'Ubuntu 16.04 Debug'
)
{
agent
{
docker
{
image
"builder:xenial"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
"Ubuntu1604"
,
"Debug"
)
}
}
stage
(
'Ubuntu 18.04 Release'
)
{
agent
{
docker
{
image
"builder:bionic"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
"Ubuntu1804"
,
"Release"
)
}
}
stage
(
'Ubuntu 18.04 Debug'
)
{
agent
{
docker
{
image
"builder:bionic"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
"Ubuntu1804"
,
"Debug"
)
}
}
stage
(
'SUSE Tumbeweed Release'
)
{
agent
{
docker
{
image
"builder:tumbleweed"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
"SUSEtumbleweed"
,
"Release"
)
}
}
stage
(
'SUSE Tumbeweed Debug'
)
{
agent
{
docker
{
image
"builder:tumbleweed"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
"SUSEtumbleweed"
,
"Debug"
)
}
}
}
// end parallel
parallel
builds
.
collectEntries
{
[
"${it}"
:
transformIntoStep
(
dependencyList
,
it
)]
}
}
// end stage build
}
// end stages
post
{
...
...
@@ -128,6 +66,26 @@ def call(ArrayList<String> dependencyList) {
/**********************************************************************************************************************/
def
transformIntoStep
(
ArrayList
<
String
>
dependencyList
,
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
{
agent
{
docker
{
image
"builder:${label}"
// we need root access inside the container and access to the dummy pcie devices of the host
args
"-u 0 --device=/dev/mtcadummys0 --device=/dev/llrfdummys4 --device=/dev/noioctldummys5 --device=/dev/pcieunidummys6"
}
}
steps
{
doAll
(
dependencyList
,
label
,
buildType
)
}
}
}
/**********************************************************************************************************************/
def
doAll
(
ArrayList
<
String
>
dependencyList
,
String
label
,
String
buildType
)
{
// Add inactivity timeout of 10 minutes (build will be interrupted if 30 minutes no log output has been produced)
...
...
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