Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jenkins]

Jenkins is an open source continuous integration server

0
votes
0answers
21 views

How to put secure password in Jenkins Groovy parameter script

My overall goal is to create a build parameter in Jenkins which is a drop down for only release branches. I have been at this for some time and know there are many ways to do this. Let me run through ...
0
votes
1answer
27 views

Jenkins how to catch error in script

What I am trying to do is once source .... command is executed if there is an error I want to put it into temp file. I tried several ways but no luck. def responseValue = sh(script: """#!/bin/...
0
votes
1answer
175 views

grep on a shell command in a pipeline scripted script

When I want to make several shell commands my scripted pipeline returns the answer of the first command without executing the pipes. Here is my case: I want to get specific content on an HTML page. So ...
1
vote
2answers
41 views

How do I run Jenkins with a specific working directory and a specific user account?

I am executing below jenkins.war with below command jenkins -jar jenkins.war But I want to specify to use below path while executing the war `/data/jenkins` and it should run as jenkins user . ...
0
votes
0answers
39 views

Jenkins Docker exec : No such file or Directory

I installed Jenkins using below command sudo docker run -u root -d -p 8081:8081 -p 50001:50001 -v /data/jenkins-data:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock ...
0
votes
0answers
10 views

Executing UI test cases from Jenkins

We have test suite which is basically a jar file and can be executed like the following java -jar test_suite.jar Which then opens up a browser in GNome Environment and runs through the set of test ...
0
votes
0answers
23 views

Replace pom version using sed in Jenkinsfile [duplicate]

I have a variable myStrthat contains the following value: "app": { "services": { "app": [{ "groupID": "com.mycompany", "artifactId": "myapp-versions", "...
0
votes
0answers
59 views

Jenkins/Nginx returning 404 when concurrent requests made from jenkins

I am running nginx latest docker image to access nginx. I have 2 jenkins jobs triggered at the same time - which make a GET request to nginx and get the data. When the two jobs ran at the same time, ...
0
votes
1answer
679 views

Jenkins pipeline: scp tries to copy to other remote, Host key verification failed [duplicate]

I use Jenkins in ubuntu server. In this case, I want to copy a file to another remote server. I use SCP command inside sshagent the Jenkins pipeline. I tried the solution from unable to scp in ...
1
vote
1answer
123 views

find command fails in jenkins, but not in terminal

I want to export all frames from a lot of video files, automatically in a jenkins build job using ffmpeg. This script is running fine when I ssh into the slave and execute it in the same folder: ...
1
vote
1answer
20 views

How to know if Jenkins is patched on CentOS 7

I've been using rpm -q --changelog package_name to check if a certain cve vulnerability has been patched on my system. However, when I'm doing the same for jenkins, all I got was Sat Apr 19 ...
0
votes
1answer
49 views

Invoke UI from pseudo console

We have some UI test cases which we are currently invoking manually on our Linux machine (with Gnome enabled).  We login to the machine and run the below command: java -jar test_case.jar to invoke ...
0
votes
1answer
633 views

curl in Jenkins,

What i want to do is: The 1st curl command output will be the input of the 2nd curl command... Have a jenkins build which originally runs a curl commands such as: curl -u $user:$PS -h "content-type:...
0
votes
1answer
829 views

JSON on the command line with jq in Jenkins

I used jq -r '.version' package.json command to filter the version from package.json file using the terminal. Can we use jq command in Jenkins shell without locally installing it?
1
vote
1answer
254 views

jenkins can't recognise known_hosts file

I am using Centos 7. I have Jenkins installed on it I have copied ~/.ssh directory to /var/lib/jenkins/ Contents of .ssh directory are authorized_keys id_rsa id_rsa.pub known_hosts Now when I am ...
1
vote
0answers
54 views

Jenkins on solaris operating system

Need to install jenkins server on solaris box, this is the version details, can we get any jenkins package to install? Solaris details: Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
0
votes
1answer
858 views

can i safely remove /var/log/jenkins/jenkins.log (/var: 100% used) [duplicate]

I am running out of disk space with /var system file and noticed /var/log/jenkins/jenkins.log file is occupied 7 GB. Can i safely remove this log file ?
0
votes
1answer
1k views

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-...
2
votes
1answer
209 views

Redirecting output to a file silently? [closed]

So I have this here: echo "$(some docker command that gives output)" > file When I run this from Jenkins, the command’s output is shown in the Jenkins log. I do not want this to happen. How can ...
0
votes
4answers
562 views

Disowning child from parent process

If $PID_PARENT launched $PID_CHILD, how can I detach (disown?) $PID_CHILD from $PID_PARENT so that, when I kill $PID_PARENT, $PID_CHILD keeps running like nothing happened? Concretely, my $PID_PARENT ...
1
vote
0answers
1k views

Unable to execute script on remote host using ssh-plugin - Jenkins

I am trying to test ssh-plugin on Jenkins to execute the shell script on the remote host. I have added the site and the connection is successful. However, when I tested this Execute shell script on ...
0
votes
1answer
95 views

jenkins behind nginx in kubernetes

I have a jenkins server behind a Kubernetes (AWS ELB - NGINX proxy ). When I try to trigger a remote job using curl it fails: # curl -X POST -H "$CRUMB" "https://jenkins:add91b3fefefefefef@jenkins....
1
vote
1answer
752 views

How to set ansible playbook to reboot servers

I want to be able to write one playbook to update all my servers in different environments - stage and prod. I do not want to reboot these servers every time there is an update to the kernel, I only ...
4
votes
1answer
2k views

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 ...
0
votes
1answer
1k views

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 ...
0
votes
2answers
41 views

Is it possible to download and configure jenkins with a script?

I want to develop a continuous integration with one or many scripts locally and then on a server. For that I need Jenkins. I installed jenkins in a docker container, but would it be possible to ...
-1
votes
1answer
251 views

Passwordless ssh does not work with multiple servers

I have a jenkins server that runs a job to ssh (passwordless) out to Server A and runs a script. This works very well and I set it up by doing: ssh-keygen -t rsa on Jenkins Copy over the id_rsa.pub ...
2
votes
3answers
27k views

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? ...
0
votes
0answers
248 views

How to diagnose this Kubernetes pod high load

I am executing a Jenkins pod instance in IBM Cloud kubernetes service. I am getting a very high load even though none of the processes has high load. I have read that it has to do with IO requests. ...
0
votes
1answer
320 views

Unable to run Jenkins Slave jobs on AWS EC2 Centos 7 VM

I have Jenkins Master Server running on prem and my slaves are running on AWS. It's Centos 7 EC2 VM. When Jenkins tries to push slave.jar file over scp it fails with the following error message: ...
1
vote
1answer
306 views

jenkins job not waiting defined time

i have a jenkins job that is executing a shell, i want it to wait , if a particular condition is not as per desired state,, but the job executes with 22 sec, where as i have asked it to wait for 30 ...
0
votes
0answers
183 views

unable to load variable value in jenkins build

ok i have situation my in current jenkins build. Build steps are like this sh new_script.sh $USER helm package $USER container_name=`helm install $USER-0.1.0.tgz | grep ContainerCreating | awk '{...
1
vote
1answer
1k views

branch name in Jenkins regular pipeline job

For a Jenkins pipeline job having web-hook trigger in Git/Bitbucket, each repo push triggers pipeline job. How we can know branch name in pipeline job on which push/change is committed. I need this ...
1
vote
1answer
2k views

Connecting to a docker host!

Does any one how to connect to a docker host uri?? i need to setup jenkins to perform task on a docker host?? This is the docker host info. This is Ubuntu based machine. root@node1:~# netstat -tulnp |...
1
vote
1answer
551 views

Running a script through jenkins [closed]

I need to run a script through jenkins, the script is located, at a user x home directory, /home/x/script.sh This script should only run through user x only as it will pull config settings from ....
0
votes
0answers
97 views

Jenkins nginx config 'not secure' two subdomains

I am getting a not secure on the website and I can't figure out why, here's the nginx config; upstream jenkins-av-server { server jenkins.audience-view:8080 fail_timeout=0; } server { listen 80; ...
0
votes
0answers
195 views

Jenkins in Docker doesn't have access to /dev/vboxnetctl for VirtualBox

I'm trying to set up Jenkins (runs in Docker; official image) which runs as user "jenkins". And Jenkins should start a virtual machine using docker-machine and virtualbox. I bind-mounted /dev/...
0
votes
1answer
863 views

Trying to restrict Jenkins access to specified group in FreeIPA

========== IPA config ========== ========== Jenkins config ========== ========== Jenkins warning (user in "jenkins-usergroup") ========== ========== Jenkins warning (user not in "jenkins-usergroup")...
0
votes
1answer
569 views

Apache mod proxy does use a different charset then proxied server

I'm running jenkins, a java web application, on port 8080 behind an apache2 server using mod_proxy. +---------------+ +----------------+ | apache2 | -----> | jenkins:8080 ...
1
vote
1answer
4k views

Permission denied in jenkins [closed]

I am trying to run a shell script in jenkins and have given all permissions on the file. On the run, jenkins mentions the below error Started by user admin Building in workspace /var/lib/jenkins/...
0
votes
1answer
262 views

Incompatible character encoding in Jenkins can't resolve

I am attempting to run a Cucumber (Ruby) Test Suite from Jenkins that tests whether or not 2-4 byte UTF-8 characters are valid names for groups. I have tried a number of solutions and have been ...
0
votes
1answer
417 views

Keep docker containers beyond jenkins job execution

is there a way to keep docker containers until after jenkins build finishes. I would like to restart and attach and bash into it.
0
votes
1answer
1k views

How to connect to local host 8080 using terminal's hostname in mac?

I have been using docker through direct installation of Community Edition. Can anyone please let me know how to connect to local host after creating a docker container using my machines hostname? ...
0
votes
1answer
507 views

Can I skip specific file from “**/*.xml” rule in jenkins?

So, the requirement is, consider all .xml files(which is the original pattern) except one specific file(example: test/special.xml)
1
vote
0answers
163 views

Jenkins deploy doesn't pass variable to java

Problem that I ran into is that when we deploy our Java application via Jenkins hostname variable is not passed to it. Inside the script somewhere we define HOSTNAME=$(hostname -f) variable, which we ...
1
vote
1answer
2k views

How to launch jenkins?

I am on Ubuntu 16.04.My java is here which java /usr/bin/java Next cat /etc/init.d/jenkins #!/bin/bash # /etc/init.d/jenkins # debian-compatible jenkins startup script. # Amelia A Lewis <alewis@...
0
votes
1answer
145 views

configuring jenkins 2.32 on centos7

i have installed jenkins 2.32 on centos7, and created two users 1=admin 2=sanjeev problem i am facing is that when i logged in from normal user sanjeev, he can go to the configure link and is able ...
1
vote
1answer
366 views

Icon next to the build job list not showing up in jenkins

I have a problem with one of my coworkers is not able to see the build icon next to each job. I already tried to make the permissions in Manage Jenkins -> Configure Settings -> Project-based ...
2
votes
1answer
5k views

Jenkins pipelines, sh, quotes and spaces

I am trying to setup sh command as part of my Jenkins pipeline. This command has one parameter where list of values is supplied. Those values have spaces in them. I have tried so many things, arrays, ...
1
vote
1answer
1k views

Jenkins permission to build in home dir

I am trying to build a Git project using Jenkins on an ec2 instance. The custom workspace address I want to keep is /home/ec2-user/xyz. I get the following error: java.io.IOException: Failed to ...