How to access parameters in a Parameterized Build?
I think the variable is available directly, rather than through env, when using Workflow plugin. Try: node() { print “DEBUG: parameter foo = ${foo}” }
I think the variable is available directly, rather than through env, when using Workflow plugin. Try: node() { print “DEBUG: parameter foo = ${foo}” }
This error: stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly indicates that Jenkins is trying to connect to github with the wrong ssh key. You should: Determine the user that jenkins runs as, eg. ‘build’ or ‘jenkins’ Login on the jenkins host that is trying to do the clone – that is, … Read more
I have figured out how it works (without changing sln/csproj properties in VS2013/2015). if you want to build .sln file: /p:ConfigurationPlatforms=Release /p:Platform=”Any CPU” if you want to build .csproj file: /p:Configuration=Release /p:Platform=AnyCPU notice the “Any CPU” vs AnyCPU check the code analysis, fxcop, test coverage(NCover) targets, as well as the MSBUILD should be located properly. … Read more
Can be easier done from groovy script console . Go to http://your-jenkins-server/script In script window enter: item = Jenkins.instance.getItemByFullName(“your-job-name-here”) //THIS WILL REMOVE ALL BUILD HISTORY item.builds.each() { build -> build.delete() } item.updateNextBuildNumber(1)
This is now possible. Below is an example of a declarative pipeline, but catchError works for scripted pipelines as well. pipeline { agent any stages { stage(‘1’) { steps { sh ‘exit 0’ } } stage(‘2’) { steps { catchError(buildResult: ‘SUCCESS’, stageResult: ‘FAILURE’) { sh “exit 1” } } } stage(‘3’) { steps { sh … Read more
Jenkins has a link to their REST API in the bottom right of each page. This link appears on every page of Jenkins and points you to an API output for the exact page you are browsing. That should provide some understanding into how to build the API URls. You can additionally use some wrapper, … Read more
You should enable proxy. Run a command: sudo a2enmod proxy sudo /etc/init.d/apache2 restart
You can use Parameterized Trigger Plugin which will let you pass parameters from one task to another. You need also add this parameter you passed from upstream in downstream.
Team City is by far and away the best CI server out there. Its killer feature for me is the tight integration with IDEs (IntelliJ, Eclipse and VisualStudio). It can show you, for example, when a file you’re editing in the IDE becomes out of date, who changed it and what they changed. You can … Read more
Finally, this post helped me to do away with the crumb problem, but still securing Jenkins from a CSRF attack. Solution for no-valid crumb included in the request issue Basically, we need to first request for a crumb with authentication and then issue a POST API calls with a crumb as a header along with … Read more