Tag: jenkins

Jenkins does not build branch after merging with another one

I have a Jenkins job that builds all Git branches of some project. This job is triggered with push notification from GitLab. Everything works fine except for one problem. When I merge one branch into another: git merge development some-feature Jenkins does not build development branch because in most cases after the merge both development […]

Checking if Git branch exists from within Jenkins Groovy script

Is there any way to check if the Git branch exists in a Jenkins console Groovy script? What i have now is this: import hudson.model.* // For each project for(item in Hudson.instance.items) { // check that job is not building if(!item.isBuilding()) { if (item.scm instanceof hudson.plugins.git.GitSCM) { println(“Item name: ” + item.name); item.scm.repositories.each { println(“Repo […]

Jenkins and Git configuration issue

I have been using Git for sometime now. Recently, I have started exploring Jenkins and I managed to set it up using the native windows installer. I created a sample project on my local system and built it using Jenkins successfully. Now, I have a project on remote Server and I want Jenkins to pull […]

In Jenkins, How do I send emails only when the branch failed is the master branch?

I want to write a script in pre-send script (from Editable-Email Notification plugin) to send the email (set the cancel flag to true) ONLY when the branch failed is a master branch (as in have master in the name of the branch). How do I do this?

Trigger Jenkins Job only when changes happen to a particular branch

I have configured a jenkins job and I wish it should be triggered when I make some changes to the Github for that particular branch. I use the Github plugin and has enabled “build when a change is pushed to github“. But this option is triggering my Job if someone else create a separate branch […]

Using Git SHA commit ID as artifact version number when publishing to Artifactory in Jenkins

We have a Gradle project in a Git repository that Jenkins monitors for commits. When a new commit comes in it kicks off the build pipeline. At the end of the pipeline it publishes the jar file to Artifactory. I want Jenkins to use the Git SHA commit ID has the artifact version number of […]

how to get submodules to trigger a Jenkins build

I have a submodule A that is not a standalone application. It requires the main application for it to work. I would like to create a CI build for A so that whenever a commit is pushed to A it triggers a build with the main project code. How do I do that in Jenkins? […]

Using Maven Archetype Generate in the same Directory

Is there a way to run mvn archetype:generate and target the current directory instead of creating a directory from the artifactId? The plugin supposedly takes a basedir parameter, but passing in “-Dbasedir=.” doesn’t do the trick. For additional context, I’ve got 2 Git repositories setup. The first contains the source of a Maven archetype for […]

What are the recipients of Jenkins Email Extension Plugin email notifications?

When adding a trigger, it is possible to select Developers Culprits Suspects causing the build to begin failing and some more options. When using Git as SCM, how are those recipient lists exactly determined?

Why is the Jenkins Git Plugin using old parameter values when being triggered by SCM tool

We use a Jenkins build server to build our software after pushes to several Git repositories. Since we went to some code reorganization recently I tried to set up a more sophisticated build pipeline, building each of our products (a Git repository each) in the order of their dependencies. Each job triggers the execution of […]

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