Questions tagged [jenkins]

Jenkins is an open source continuous integration server

Jenkins CI, formerly known as "Hudson Labs", is an open source continuous integration tool forked from Hudson after a dispute with Oracle.

It's written in Java and integrates with different SCM and build automation tools like Apache Ant and Apache Maven. The way builds are triggered depends on the needs of the parts involved on the development process. It could be based on version control, schedule, build dependency on other builds finished or by URL request.

Jenkins builds are not restricted to Java language, and several plugins were released to support more programming languages.

Related links:

123 questions
32
votes
1 answer

git-upload-pack hangs indefinitely

I have the following call structure: Jenkins runs fab -Huser@host set_repository_commit_hash:123abc. set_repository_commit_hash runs git fetch with pty = False. The child process ssh [email protected] git-upload-pack 'user/repository.git' never…
l0b0
  • 50,672
  • 41
  • 197
  • 360
24
votes
2 answers

Using "su - " to change user gives "No passwd entry for user"

Specifically, I am trying test something on my build server by switching to the "jenkins" user: sudo su - jenkins No passwd entry for user 'jenkins'
kevlarjacket
  • 407
  • 1
  • 4
  • 12
19
votes
2 answers

How to run builds in Docker containers from Jenkins

I am trying to use Jenkins to build a C++ project in a Docker container. I have no problem building in Jenkins, or building in a container outside of Jenkins. Below is what I tried. I am omitting the volumes mapping for clarity. Case 1 The following…
marcv81
  • 620
  • 2
  • 7
  • 15
13
votes
4 answers

how to disable the "CSRF protection " in jenkins by default

I need to disable the CSRF protection in jenkins, which is enabled by default. The problem is after containerizing this, when ever i spun up a new container with jenkins inside it, it throws a "No valid crumb " error. i am currenty using this cmd to…
Mohammed Ali
  • 671
  • 2
  • 14
  • 38
11
votes
1 answer

Jenkins if statment

I am trying to write a simple If statement on the Execute Shell of Jenkins (1.638). I looked on similar issue and it still didn't work (see below the result output). I tried both [[ and [ and relevant spaces, It appears that Jenkins handles if…
Chen
  • 113
  • 1
  • 1
  • 6
10
votes
1 answer

Jenkins does not use system's locales

I got a interesting behavior in Jenkins. Jenkins' shell does not use my systems locales. Jenkins runs as user jenkins on my system. Logged in as jenkins via SSH: locale displayed: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" …
whosit
  • 341
  • 1
  • 2
  • 8
10
votes
4 answers

Call sudo from Jenkins

I have one build machine which has a user abc which is has limited sudo access. When I check out the source code and run my build script, it works fine. The build script contains sudo calls for which it does not say "sudo: no tty present and no…
Niraj Nandane
  • 211
  • 1
  • 2
  • 4
7
votes
3 answers

Where should environment variables be set for Jenkins

I am using Jenkins to automate application builds using Maven on Linux. Where should I set environment variables such as $JAVA_HOME and append items to $PATH so that they are available to Jenkins? I have tried a few different places and had no…
Mark W
  • 203
  • 1
  • 2
  • 8
6
votes
3 answers

"Could not connect to display" in one user account

I have a GUI application written in Qt and I wanted to run tests by ssh (or Jenkins). There is only one user account, which allows to run it in display mode (ofc when I previously do export $DISPLAY=:0. On other user, jenkins, I saw an error in…
trivelt
  • 217
  • 1
  • 4
  • 10
5
votes
1 answer

How to save command result in variable in Jenkins shell build step

I want to run this script inside my Jenkins job. My goal is to save the cat output into a variable so that I can use it somewhere else. #!/bin/bash ssh myserver.com <
skymedium
  • 163
  • 1
  • 1
  • 6
5
votes
3 answers

tail a log util keywords found or timeout

I'm using a special way that can let me visit google. It is very different in the page now... So I can edit the question and comment the answers normally. I deleted more early discussions and go to the point. I want to stop tailing and return 0 when…
BlueRoyale
  • 61
  • 4
5
votes
1 answer

Ansible - How to mark a tasks as success when it failed actually

We are using some pipelines to build servers using ansible and one of the task is to check if server is online (means a production server in inventory list by accident). We check the port 443 and break the build pipeline; this is to ensure that no…
Gineesh
  • 187
  • 1
  • 1
  • 5
5
votes
1 answer

if else bash script

I have the following bash script if [[$NODE_NAME = "Node1"]] then dir="../../test" fi that I use in Jenkins execute shell prompt. It gives me an error saying Slave1 command not found. I just want to check if the $NODE_NAME variable equals the…
Chris Hansen
  • 151
  • 1
  • 1
  • 3
5
votes
4 answers

Which directory is taking up the most space

Jenkins has stopped building and I can see from df: that /var is maxed. Following this I can see the culprit is /var/lib/jenkins 52K alternatives ... 4.0K games 2.3G jenkins <--this one 4.0K logrotate.status ... 12M yum 2.4G …
TenLeftFingers
  • 153
  • 1
  • 4
4
votes
1 answer

Jenkins write permission on linux

I'm having trouble getting Jenkins to write to a directory, however I believe I have set the correct permissions. Jenkins is being run by a user named "jenkins", who belongs to a group called "jenkins-group". The directory in question looks…
sarnikowski
  • 61
  • 1
  • 1
  • 5
1
2 3
8 9