Tag: jenkins

How to trigger Jenkins Multi-Branch Pipeline with Gitlab Webhook

I currently set up a Jenkins Multi-Branch Pipeline job that is based on a Git repository hosted on our Gitlab server. Jenkins can read the branches in the repository and creates a job for every branch in the repository. But I can’t figure out how to trigger the jobs with webhooks in Gitlab. My questions […]

Jenkins git plugin and branches

I have a job set up in Jenkins to build all my feature branches (feature/**). It is working nicely with the Build Name Setter plugin to identify different builds with Jenkins branch setter name plugin. My question is, if there are changes to more than one branch at the same time, will it queue the […]

sparse checkout gives me an error stderr: fatal: Not a valid object name HEAD

When I try to do a GIT sparse checkout in Jenkins, I get the following error: > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision b1697de347cafa3afbd9efc364b2874994e88b0e (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git config core.sparsecheckout true # timeout=10 > git read-tree -mu HEAD # timeout=10 Command “git […]

Running pylint against only changed lines/files with jenkins

At this time, I am using the violations plugin with Jenkins to generate a report of PEP8 violations. Since I am only beginning to use this check, there are an insane number of violations. So I’d like to start with only checking what changed in a pull request. When a pull request is opened, I […]

Setting git private repository project on jenkins server

I am trying to set git private repo on jenkins server. I have installed git plugin and also github. when I set repo url in jenkins project ui the error is Failed to connect to repository : Command “git -c core.askpass=true ls-remote -h git@github.com:repo/project.git HEAD” returned status code 128: stdout: stderr: Permission denied (publickey). fatal: […]

Get git branch name in Jenkins Jenkinsfile

I’ve create a jenkins pipeline and it is pulling the pipeline script from scm. I set the branch specifier to ‘all‘, so it builds on any change to any branch. How do I access the branch name causing this build from the Jenkinsfile? Everything I have tried echos out null except sh(returnStdout: true, script: ‘git […]

Jenkins Git Publisher: How to commit code back to master after build?

I’m having some difficulty with Jenkins Git Publisher committing and pushing code back to master after my build. My build process increases a version number in one of my files and then I want to commit this file back into the repo, but I can’t seem to get it to work. In Source Code Management->Git, […]

Github-Jenkins Trigger issue with slave

I have a jenkins instance which has a windows slave machine attached. I also have a job running which resides in github and I have the trigger – “Build when a change is pushed to GitHub” set. as I push a change to github, there is no build triggered on jenkins. I check and see […]

how can jenkins downstream job send email notification to upstream git committers via email-ext

this question is about how to send emails to git committers who broke integration tests in a downstream job, in jenkins, and see the list of changes in the downstream job. i haven’t tried everything i wrote here, so i could be wrong, these are impressions from the code i encountered. there are apparently many […]

Incrementing Maven Project Version with Jenkins/Git

I’m using Jenkins to build Maven Java projects and deploy them to a Nexus repository. I also use Git, although I’m more used to Subversion so my Git knowledge is limited. I’d like Jenkins/Maven to: Merge feature branch into integration branch Build merged code, run unit tests If they pass, increment Maven version number Push […]

Git Baby is a git and github fan, let's start git clone.