Build-flow plugin - fetching script from SVN/Git

79 views
Skip to first unread message

Tomasz Szandała

unread,
Feb 11, 2016, 8:48:35 AM2/11/16
to Jenkins Users
Greetings,
I have just started using DSL in my Jenkins.
I have encountered a problem: how to keep DSL scripts under version control?
I have:

BUt the console log says:

[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Executing and processing the following script content: 
svn export --force ${SVN_CREDENTIALS} https://path.to.my.repo/szandala/factory_test .
echo "My workspace: ${WORKSPACE}"
pwd
[jenkins] $ /bin/sh -xe /var/tmp/hudson1928792222847093505.sh
A    .
A    factory.dsl
Exported revision 2450.
+ echo 'My workspace: '
My workspace: 
+ pwd
/var/jenkins
[EnvInject] - Script executed successfully.
[EnvInject] - Injecting contributions.
Building on master in workspace /var/jenkins/jobs/szandala.factory_test/workspace
[build-flow] reading DSL from file 'factory.dsl'
FATAL: /var/jenkins/jobs/szandala.factory_test/workspace/factory.dsl (No such file or directory)
java.io.FileNotFoundException: /var/jenkins/jobs/szandala.factory_test/workspace/factory.dsl (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:146)
	at hudson.FilePath.read(FilePath.java:1752)
	at hudson.FilePath.readToString(FilePath.java:1853)
	at com.cloudbees.plugins.flow.FlowRun$BuildWithWorkspaceRunnerImpl.doRun(FlowRun.java:177)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.Run.run(Run.java:1679)
	at com.cloudbees.plugins.flow.FlowRun.run(FlowRun.java:153)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:408)
Finished: FAILURE

How can I export DSL script from Git / SVN?

nicolas de loof

unread,
Feb 11, 2016, 9:59:06 AM2/11/16
to jenkins...@googlegroups.com
You should look at Pipeline plugin, which do support storing build DSL definition in project SCM (as so called "Jenkinsfile")
DSL syntax is not the same as build-flow, but comparable so as you just started using it migrating will not be such an issue.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/95c0553e-f447-4286-856d-c83ccb191205%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages