job { scm { cvs } }?

91 views
Skip to first unread message

Andrew McLaughlin

unread,
Apr 6, 2016, 7:31:02 PM4/6/16
to job-dsl-plugin
Howdy,

Just sinking my teeth in to Jenkins Jobs DSL support and looking to migrate all of our existing job configurations to the DSL format. Sure wish there was some way to convert the XML to DSL to at least give me a leg up... :)

Anywho, we're an old shop (15+ years) and still use CVS for our SCM. So far, it looks like the job.scm.cvs function supports every type of repository except cvs. Is this in the works, or can I participate in order to contribute? Converting our CVS to anything else would cause too much disruption in our current development process.

Thanks!
Andrew

Victor Martinez

unread,
Apr 7, 2016, 4:40:02 AM4/7/16
to job-dsl-plugin
Unfortunately CVS is not supported by any specific DSL: https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.jobs.FreeStyleJob.scm

In that case you can either 
- or write that particular code to support it -> https://github.com/jenkinsci/job-dsl-plugin/blob/master/CONTRIBUTING.md you can also raise a Jira ticket to track that work

Cheers

Andrew McLaughlin

unread,
Apr 7, 2016, 12:48:23 PM4/7/16
to job-dsl-plugin
Looks like configure might get me over the hump. Wish I had more time to develop and contribute...

I'll give it a shot.

Can the seed job still support the RESTful interface for remote triggering? We currently use the taginfo file to remotely trigger Jenkins to initiate a build on a project when it is tagged (in CVS). We'd like to continue triggering builds this way since polling CVS is so resource intensive.

Thanks!
Andrew

Daniel Spilker

unread,
Apr 8, 2016, 7:29:12 AM4/8/16
to job-dsl...@googlegroups.com
The next Job DSL release will contain a feature for automatically generated DSL for any plugin, see https://github.com/jenkinsci/job-dsl-plugin/pull/816 for details.

In case of the CVS plugin, the generated DSL syntax would be this:
job('example') {
scm {
cvsscm {
repositories {
cvsRepository {
cvsRoot(':pserver:username@hostname:/opt/path/to/a/repo')
repositoryItems {
cvsRepositoryItem {
modules {
cvsModule {
localName('bar')
remoteName('foo')
}
}
location {
tagRepositoryLocation {
tagName('test')
}
}
}
}
}
}
canUseUpdate(true)
pruneEmptyDirectories(true)
}
}
}
It's a bit nicer as a configure block and needs dedicated DSL support neither in the Job DSL plugin nor in the CVS plugin.

Daniel

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/bef4d2b8-a106-4a50-a5cc-6a435674ac72%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Daniel Spilker

unread,
Apr 8, 2016, 9:18:29 AM4/8/16
to job-dsl...@googlegroups.com
I opened a pull request for the CVS plugin to add a symbol to get a even nicer syntax:

job('example') {
  scm {
    cvs {
      // ...
    }
  }
}

Daniel

Reply all
Reply to author
Forward
0 new messages