How to write Pipeline to discard old builds?

As for declarative syntax, you can use the options block: pipeline { options { buildDiscarder(logRotator(numToKeepStr: ’30’, artifactNumToKeepStr: ’30’)) } … } Parameters for logRotator (from the source code): daysToKeepStr: history is only kept up to this days. numToKeepStr: only this number of build logs are kept. artifactDaysToKeepStr: artifacts are only kept up to this days. … Read more

How to remove a TFS Workspace Mapping?

From VS: Open Team Explorer Click Source Control Explorer In the nav bar of the tool window there is a drop down labeled “Workspaces”. Extend it and click on the “Workspaces…” option (yeah, a bit un-intuitive) The “Manage Workspaces” window comes up. Click edit and you can add / remove / edit your workspace From … Read more

Export/import jobs in Jenkins

Probably use jenkins command line is another option, see https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI create-job: Creates a new job by reading stdin as a configuration XML file. get-job: Dumps the job definition XML to stdout So you can do java -jar jenkins-cli.jar -s http://server get-job myjob > myjob.xml java -jar jenkins-cli.jar -s http://server create-job newmyjob < myjob.xml It works … Read more