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

Strange variable scoping behavior in Jenkinsfile

TL;DR variables defined with def in the main script body cannot be accessed from other methods. variables defined without def can be accessed directly by any method even from different scripts. It’s a bad practice. variables defined with def and @Field annotation can be accessed directly from methods defined in the same script. Explanation When … Read more

Is it possible to capture the stdout from the sh DSL command in the pipeline

Now, the sh step supports returning stdout by supplying the parameter returnStdout. // These should all be performed at the point where you’ve // checked out your sources on the slave. A ‘git’ executable // must be available. // Most typical, if you’re not cloning into a sub directory gitCommit = sh(returnStdout: true, script: ‘git … Read more

How do I make a Jenkins job start after multiple simultaneous upstream jobs succeed?

Pipeline plugin You can use the Pipeline Plugin (formerly workflow-plugin). It comes with many examples, and you can follow this tutorial. e.g. // build stage ‘build’ … // deploy stage ‘deploy’ … // run tests in parallel stage ‘test’ parallel ‘functional’: { … }, ‘performance’: { … } // promote artifacts stage ‘promote’ … Build … Read more

Jenkins HTML Publisher Plugin: No external links with Jenkins 1.643

The issue you’re seeing is likely related to recent security fixes. See the Configuring Content Security Policy wiki page for details on how to relax the Jenkins configuration. The CSP header sent by Jenkins can be modified by setting the system property hudson.model.DirectoryBrowserSupport.CSP: If its value is the empty string, e.g. java -Dhudson.model.DirectoryBrowserSupport.CSP= -jar jenkins.war … Read more