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.
2016-02-11 14:48 GMT+01:00 Tomasz Szandała <[email protected]>: > 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 > <https://svne1.access.nsn.com/isource/svnroot/BTS_T_SCM_CCS/users/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 > <http://stacktrace.jenkins-ci.org/search?query=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? > > -- > 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/95c0553e-f447-4286-856d-c83ccb191205%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/95c0553e-f447-4286-856d-c83ccb191205%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CANMVJz%3DyxEF%2Bs9AUhOmhBT53bqi%2BvKRHNFH5M1C5qJrfv9%2BpLw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
