Hi,

I want to replace a bunch Jenkins jobs by a single workflow job. This 
includes a final step which shall publish the artifacts to a CIFS share. 
Currently I'm using a freestyle job using the Copy Artifact plugin and the 
Publish over CIFS plugin to fulfill this task. Since there is no direct 
support for the Publish over CIFS plugin within a workflow yet I tried to 
trigger the existing publishing job from the workflow script like this:

node('linux') {
    build(
        job: 'Publish_over_CIFS',
        parameters: [
            [
                $class: 'StringParameterValue',
                name: 'BUILD_SELECTOR_ARTIFACTS',
                value: '<SpecificBuildSelector 
plugin="[email protected]">  <buildNumber>' + env.BUILD_NUMBER + 
'</buildNumber></SpecificBuildSelector>'
            ]
        ]
    );
}

Unfortunately this does not work. The job fails with following error:

/var/lib/jenkins/jobs/Publish_over_CIFS/workspace/.87e38c35/script.sh: line 2: 
syntax error near unexpected token `<'


However, when I replace the "env.BUILD_NUMBER" by a constant number 
pointing to an already completed build, then code above works perfectly. It 
seems that the Copy Artifact plugin has problems accessing the artifacts of 
the current build.

What is wrong with the code? Or is there a better way to publish artifact 
to a CIFS share?

Thanks!

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7a9ea15f-3af3-4e0c-abc6-3fae8ec9fa95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to