[JIRA] (JENKINS-57502) Cmake arguments sometimes are added to path in parallel build

13 views
Skip to first unread message

wl2776@gmail.com (JIRA)

unread,
May 16, 2019, 5:35:02 AM5/16/19
to jenkinsc...@googlegroups.com
Vladimir Eremeev created an issue
 
Jenkins / Bug JENKINS-57502
Cmake arguments sometimes are added to path in parallel build
Issue Type: Bug Bug
Assignee: Martin Weber
Components: cmakebuilder-plugin
Created: 2019-05-16 09:34
Environment: Jenkins version 2.164.3
cmake plugin version 2.6.1
Priority: Blocker Blocker
Reporter: Vladimir Eremeev

I'm trying to simulate matrix build using Pipeline

Pipeline snippet

{{def cmake_tasks(os_labels, configs, DL_on_off) {
tasks = [:]
def DL_dir_labels = ['ON': 'DL', 'OFF': 'noDL']
for(int i = 0; i < os_labels.size(); i++) {
def os = os_labels[i]

for (int j = 0; j < configs.size(); j++) {
for (int k = 0; k < DL_on_off.size(); k++) {
def config = configs[j]
def DL = DL_on_off[k]
def DL_dir_label = DL_dir_labels["${DL}"]

def generator = "Ninja"
def steps = [[withCmake: true]]
def cmakeArgs = "-Dsomevar=somevalue"

def cmake_inst = 'InSearchPath'

tasks["${os}/${config}/${DL_dir_label}"] = {
node("build && ${os}") {
stage("${os}/${config}/${DL_dir_label}") {
if (os == "windows") {
bat """
${env.WORKSPACE}\\DL\\test\\support
configure.cmd ${config} build_${config}_${DL_dir_label} ${DL}
ninja
"""
} else {
cmakeBuild(buildDir: "build_${config}_${DL_dir_label}",
buildType: config,
cleanBuild: true,
cmakeArgs: cmakeArgs,
generator: generator,
installation: cmake_inst,
sourceDir: ".",
steps: steps)
}
}
}
}
}
}
}
return tasks
}

pipeline {
agent none

parameters

{ string(defaultValue: 'develop', description: 'Commit ID or branch name to build', name: 'branch', trim: false) }

stages {
stage('Checkout') {
steps {
script

{ // checkout on windows and linux }

}
}
stage('Configure & Build') {
steps {
script

{ def OSes = ["windows", "linux"] def configs = ["Release", "Debug"] def DL_inc = ["ON", "OFF"] parallel cmake_tasks(OSes, configs, DL_inc) }

}
}
}
}

}}

Sometimes I see failed steps with the following output:

{{Cleaning build dir /jenkins/workspace/project@7/build_Debug_DL ... [build_Debug_DL] $ cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -Dsomevar=somevalue /jenkins/workspace/project@7
CMake Error: The source directory "/jenkins/workspace/project@7/build_Debug_DL/CMAKE_BUILD_TYPE=Debug" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.}}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

wl2776@gmail.com (JIRA)

unread,
May 22, 2019, 4:46:02 AM5/22/19
to jenkinsc...@googlegroups.com
Vladimir Eremeev updated an issue
Change By: Vladimir Eremeev
I'm trying to simulate matrix build using Pipeline

Pipeline snippet

 
{ { code:java}
def cmake_tasks(os_labels, configs, DL_on_off) {
    tasks = [:]
    def DL_dir_labels = ['ON': 'DL', 'OFF': 'noDL']
    for(int i = 0; i < os_labels.size(); i++) {
        def os = os_labels[i]

        for (int j = 0; j < configs.size(); j++) {
            for (int k = 0; k < DL_on_off.size(); k++) {
                def config = configs[j]
                def DL = DL_on_off[k]
                def DL_dir_label = DL_dir_labels["${DL}"]

                def generator = "Ninja"
                def steps = [[withCmake: true]]
                def cmakeArgs = "-Dsomevar=somevalue"

                def cmake_inst = 'InSearchPath'

             
                tasks["${os}/${config}/${DL_dir_label}"] = {
                    node("build && ${os}") {
                     stage("${os}/${config}/${DL_dir_label}") {
                     if (os == "windows") {
                     bat """                      // does not matter
 
{code
} }
 

 

Sometimes I see failed steps with the following output similar to the following (please, note that "CMAKE_BUILD_TYPE=Debug" is concatenated with a path) :

{ { code:java}
Cleaning build dir /jenkins/workspace/project@7/build_Debug_DL ... [build_Debug_DL] $ cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -Dsomevar=somevalue /jenkins/workspace/project@7
CMake Error: The source directory "/jenkins/workspace/project@7/build_Debug_DL/CMAKE_BUILD_TYPE=Debug" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

{code
} }

fifteenknots505@gmail.com (JIRA)

unread,
Jun 6, 2019, 3:02:02 PM6/6/19
to jenkinsc...@googlegroups.com

fifteenknots505@gmail.com (JIRA)

unread,
Jul 3, 2019, 3:47:02 PM7/3/19
to jenkinsc...@googlegroups.com
Martin Weber commented on Bug JENKINS-57502
 
Re: Cmake arguments sometimes are added to path in parallel build

Sorry, cannot reproduce the error with Jenkins ver. 2.150.3 and cmake plugin 2.8.1.
Does the problem still persist? If so, remove the

sourceDir: ".", 

specification from the script and re-try. If sourceDir is not specified, the workspace-root is used by default.

wl2776@gmail.com (JIRA)

unread,
Jul 4, 2019, 3:32:03 AM7/4/19
to jenkinsc...@googlegroups.com

The problem has gone.

 

Jenkins version was updated to 2.176.1

Cmake plugin version is 2.6.1

Cmake program version is 3.13

 

 

fifteenknots505@gmail.com (JIRA)

unread,
Jul 4, 2019, 3:31:02 PM7/4/19
to jenkinsc...@googlegroups.com
Martin Weber resolved as Cannot Reproduce
 
Change By: Martin Weber
Status: Open Resolved
Resolution: Cannot Reproduce

fifteenknots505@gmail.com (JIRA)

unread,
Jul 5, 2019, 2:02:03 PM7/5/19
to jenkinsc...@googlegroups.com
Martin Weber closed an issue as Cannot Reproduce
Change By: Martin Weber
Status: Resolved Closed
Reply all
Reply to author
Forward
0 new messages