Tag: jenkins

Downloading a directory inside a git repo

Being a git noob, this might be a dumb or impossible question. My git repo looks like this. If I run a git clone ssh://fn.ln@blah.com:8443/blah.git in my local directory, a sub directory called blah is created. Inside the blah directory, I have these sub directories: proj1 proj2 proj3 etc. What I need to do is […]

Adding Git Commit Hashes to Email-ext Plugin in Jenkins

I’m looking to output the result of a Jenkins build into an email using Email-ext plugin + a groovy text template. By tweaking the default groovy template slightly (i.e., no code edits), I have gotten the output to look like: * [] Testing default post receive hook script | Author: Dev One – File: README […]

In the Jenkins API is there a way to find the git commit of the last build?

I would like to write a script to automate the feature branch creation for hot-fixes. In order to do that I need to figure out how to see what was the last commit in the current build. Is there a way to get the last commit from the Jenkins API? git checkout -b hotfix <commit>

Package multiple publish profiles .pubxml after a successful build in Jenkins CI

I’m using Jenkins for Continuous Integration. Right now I have a job with this command in Jenkins in the command line arguments for a build step: This is the command: “%WORKSPACE%\OEVizion\ITVizion.OEVizion.Web\ITVizion.OEVizion.Web.csproj” /p:DeployOnBuild=true /p:PublishProfile=”IT Vizion – Web Deploy Package for a given domain.pubxml” It works just fine, that is, the web deploy package (.zip) is created […]

Conditional OR for multiple Jenkins parameters

I’m looking for a way of handling multiple parameters within a Jenkins job. My build can either be triggered by a push to Gitlab or manually. Gitlab passes ${gitlabSourceBranch} as a parameter containing the branch it has received a push for. My branches to build setting is currently set to origin/${gitlabSourceBranch}. Works like a charm […]

python – how to get branch name from a specific build from jenkins?

We use Git, jenkins and python at office. We build a new SW version on a daily basis using jenkins. How can I get the branch name to which the build belongs using Python from Jenkins? Is there any API (function call) in Jenkins that can I give the build number as an argument, and […]

Jenkins : stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly

I am hosting Jenkins on a virtual machine(redhat). I am able to setup jenkins system on it and able to access jenkins. But on manage jenkins page while creating any build job, when I giv my git repository link, I am getting this error – Failed to connect to repository : Command “git ls-remote -h […]

should I use tags or branches? Which is better for tracking your source code in Git of every nightly build with Jenkins

I would like to know the experience of others and what would be the better strategy. I am supposing that branching is not that good, because of the space usage.

How to tag a build in Jenkins/Maven/Git

I have a build setup in Jenkins, which compiles a simple Git hosted Maven project into a jar and publishes the jar into Artifactory. How can I setup the build job to tag the sources which were used for the build with e.g. a build number (or similar), in order to later be able to […]

Jenkins – (private subnet) WebHook with Github does not trigger automatic build

Problem : I am working on a CI setup to configure github – Jenkins web hook for triggering builds with code commits on github. Below are the current configuration details My Jenkins is inside an AWS private subnet I have plugin: “GitHub Web Hook” configured with API URL, Username and OAuth token, Test Credentials gives […]

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