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
c9a1f307
Commit
c9a1f307
authored
6 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
- disallow concurrent builds
- code cleaning
parent
5c0fe06d
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
vars/analysis.groovy
+13
-4
13 additions, 4 deletions
vars/analysis.groovy
vars/buildDoocsLibrary.groovy
+3
-0
3 additions, 0 deletions
vars/buildDoocsLibrary.groovy
vars/buildTestDeploy.groovy
+3
-0
3 additions, 0 deletions
vars/buildTestDeploy.groovy
vars/helper.groovy
+1
-1
1 addition, 1 deletion
vars/helper.groovy
with
20 additions
and
5 deletions
vars/analysis.groovy
+
13
−
4
View file @
c9a1f307
...
...
@@ -7,7 +7,7 @@
***********************************************************************************************************************/
// This is the function called from the .jenkinsfile
def
call
(
ArrayList
<
String
>
dependencyList
)
{
def
call
()
{
def
builds
=
[]
// Run for all -Debug builds of the main job
...
...
@@ -35,12 +35,21 @@ def call(ArrayList<String> dependencyList) {
pipeline
{
agent
none
// setup build trigger etc.
triggers
{
upstream
parentJob
}
properties
([
disableConcurrentBuilds
()])
properties
([
copyArtifactPermission
(
'*'
)])
options
{
buildDiscarder
(
logRotator
(
numToKeepStr:
'30'
,
artifactNumToKeepStr:
'10'
))
}
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
(
dependencyList
,
it
)]
}
parallel
builds
.
collectEntries
{
[
"${it}"
:
transformIntoStep
(
it
)]
}
}
}
}
// end stage build
...
...
@@ -59,7 +68,7 @@ def call(ArrayList<String> dependencyList) {
/**********************************************************************************************************************/
def
transformIntoStep
(
ArrayList
<
String
>
dependencyList
,
String
buildName
)
{
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
...
...
@@ -70,7 +79,7 @@ def transformIntoStep(ArrayList<String> dependencyList, String buildName) {
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 -v /home/msk_jenkins/JenkinsConfiguration:/home/msk_jenkins/JenkinsConfiguration"
docker
.
image
(
"builder:${label}"
).
inside
(
dockerArgs
)
{
script
{
helper
.
doAnalysis
(
dependencyList
,
label
,
buildType
)
helper
.
doAnalysis
(
label
,
buildType
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
vars/buildDoocsLibrary.groovy
+
3
−
0
View file @
c9a1f307
...
...
@@ -36,6 +36,9 @@ def call(String libraryName, ArrayList<String> dependencyList) {
pollSCM
'H/5 * * * *'
upstream
dependencies
}
properties
([
disableConcurrentBuilds
()])
properties
([
copyArtifactPermission
(
'*'
)])
options
{
buildDiscarder
(
logRotator
(
numToKeepStr:
'30'
,
artifactNumToKeepStr:
'10'
))
}
stages
{
stage
(
'build'
)
{
...
...
This diff is collapsed.
Click to expand it.
vars/buildTestDeploy.groovy
+
3
−
0
View file @
c9a1f307
...
...
@@ -53,6 +53,9 @@ def call(ArrayList<String> dependencyList, String gitUrl='') {
pollSCM
'H/5 * * * *'
upstream
dependencies
}
properties
([
disableConcurrentBuilds
()])
properties
([
copyArtifactPermission
(
'*'
)])
options
{
buildDiscarder
(
logRotator
(
numToKeepStr:
'30'
,
artifactNumToKeepStr:
'10'
))
}
stages
{
stage
(
'build'
)
{
...
...
This diff is collapsed.
Click to expand it.
vars/helper.groovy
+
1
−
1
View file @
c9a1f307
...
...
@@ -25,7 +25,7 @@ def doBuildTestDeploy(ArrayList<String> dependencyList, String label, String bui
/**********************************************************************************************************************/
def
doAnalysis
(
ArrayList
<
String
>
dependencyList
,
String
label
,
String
buildType
)
{
def
doAnalysis
(
String
label
,
String
buildType
)
{
if
(
buildType
==
"Debug"
)
{
doPrepare
(
false
)
doBuilddirArtefact
(
label
,
buildType
)
...
...
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