Questions tagged [jenkins]

Jenkins is an open source continuous integration server

Filter by
Sorted by
Tagged with
1 vote
0 answers
140 views

Jenkins Fontconfig head is null even after installing fontconfig

I am trying to install generic Jenkins with jenkins.war. Getting following error while starting. 2024-03-05 15:23:36.018+0000 [id=1] SEVERE hudson.util.BootFailure#publish: Failed to initialize ...
Jigar Shah's user avatar
0 votes
1 answer
29 views

Why does this script variable keep showing as "null"?

I have the following script: def String Service_version = sh "cd ./projects/onehome && pwd && cat package.json | grep version" echo "Service_Version_update: ...
Jenber Nurye's user avatar
0 votes
0 answers
108 views

How can I echo/print the environment files of a directory/path in a Jenkinsfile during a build?

In a Jenkins file, I have the following code: #!/usr/bin/env groovy .... def env_prod = 'prod.env' def entrypoint = "${env.WORKSPACE} The above is then combined like this: ${env.WORKSPACE}/$...
Patrick_Chong's user avatar
0 votes
0 answers
33 views

Why are four Jenkins build nodes suddenly having fatal problems finding things on the PATH?

In our overall organization, we run Jenkins 2.303.1 onprem. We run thousands of builds a day. The project I work on uses one Jenkins master and a set of about ten build nodes. We build a few hundred ...
David M. Karr's user avatar
0 votes
0 answers
30 views

format a log file using groovy script

I need quick help with the below Groovy script; I was fetching the hostname and IPs of the server via Jenkins. When did a cat of that file, I am getting the contents below $ cat serverbox_info ...
raj krish's user avatar
0 votes
1 answer
290 views

declare: not found error in Jenkins pipeline

I have a Jenkins pipeline which has a step running a sh script. Something like this, but with more commands in between which are not relevant: steps { echo 'Running build with all ...
Catalin Nicolae's user avatar
0 votes
0 answers
51 views

Trigger Jenkins job when the content of specific file merged in gerrit repo

I am looking to create a Jenkins pipeline job that triggers when the content of the file filename.json changes merged in the Gerrit repository's master branch. . ├── Readme ├── tools- └── src └── ...
nagarjuna v's user avatar
3 votes
2 answers
5k views

Can't upgrade Jenkins on Debian11, the public key is not available: NO_PUBKEY FCEF32E745F2C3D5

I try to upgrade jenkins. I use the new way to use gpg keys: wget https://pkg.jenkins.io/debian-stable/jenkins.io.key gpg --dearmor jenkins.io.key mv jenkins.io.key.gpg /usr/share/keyrings/jenkins-...
Mévatlavé Kraspek's user avatar
3 votes
1 answer
979 views

setting alias for sourcing a script, to run that script in jenkins with restricted permissions

I want to run source ./script_name instead of ./script_name. Can I create an alias for this ? The Jenkins job will run the script as ./script_name and I can't edit the way it will run the script on ...
Anubhav Rai's user avatar
0 votes
0 answers
48 views

Is there any way to automatically merge commits from master another branch whenever there is any merge request for master?

Is there any way to automatically merge commits from master another branch whenever there is any merge request for master? want to add to JenkinsFile as well.
Mohit's user avatar
  • 1
0 votes
1 answer
225 views

Arrays declaration working on one distro do not work on another

I've a bash script that I run on Debian 11 and it worked just fine, I must move it to Ubuntu Server (probably 22.04) and now it stopped working. My script below: BRANCHES=("master" "...
Aenye_Cerbin's user avatar
0 votes
0 answers
101 views

struggling to install Jenkins with docker compose

I'm having an issue where a jenkins agent can't access Docker, and I'm just about ready to give up but I figured I'd try asking here first. Along with the official documentation, I've also been using ...
KernelDeimos's user avatar
3 votes
1 answer
3k views

Manually install fontconfig, without root, for Java

While installing Jenkins on a server without root access, I get the following: AWT is not properly configured on this server. Perhaps you need to run your container with "-Djava.awt.headless=...
Frankie's user avatar
  • 221
0 votes
1 answer
164 views

If I try browsing the fqdn of my jenkins server, my browser times out, but the domain resolves in the commandline, and I can browse the ip address

I have a jenkins server in aws. I can browse it (on my private network) by visiting http://{ip-of-my-jenkins-server}:8080, but if I try browsing http://{fqdn-of-my-jenkins-server}:8080, the request ...
pancake's user avatar
0 votes
0 answers
464 views

Network Is Unreachable When Installing Jenkins On Ubuntu 20.04

So I want to install jenkins on my ubuntu 20.04 VPS and always got the error "Network is unreachable". I tried to install it with wget like this : wget https://get.jenkins.io/war-stable/2....
Tano's user avatar
  • 1
0 votes
3 answers
3k views

Jenkins sh : wait for wget download to finish

I have a hard time to force wget command to wait until download finish's, problem occurs inside Jenkins sh '''script place '''. I have wrote the script in .sh file, where it runs without any issues, ...
Re Viki's user avatar
0 votes
1 answer
1k views

How to invoke a jenkins pipeline B, in between if-else condition of jenkins pipeline A?

jenkins pipeline-A pipeline{ stage('deploy'){ agent { label 'slave' } steps{ script{ if [ "$deployenv" = dev ]; then echo 'restart not required' elif [ ...
dsl's user avatar
  • 9
0 votes
1 answer
396 views

how to restart an application 5 times with delay time 25min, through jenkins pipeline using groovy script

How can I restart an application a total of 5 times with a 25 minute delay between each launch, through a jenkins pipeline using a groovy script? //service update command need to execute.. stage('...
dsl's user avatar
  • 9
0 votes
3 answers
2k views

How to let Jenkins listen to port 80?

With the default configuration, Jenkins is listening to port 8080: $ ss -tulpn | grep 8080 tcp LISTEN 0 50 *:8080 *:* users:(("java",pid=3052,fd=115) However, I ...
Hans's user avatar
  • 115
0 votes
1 answer
2k views

Permissions Issue creating folder on remote host with Jenkins

I'm having an issue with using Jenkins to create a folder on a remote host. The remote host in this case is a stock Ubuntu 20.04 AMI EC2 server with the default ubuntu user. I am connecting with the ...
Programster's user avatar
  • 2,257
1 vote
1 answer
504 views

Script run under Jenkins fails due to mis-recognized tokens

I'm creating a build job within the Jenkins CI/CD software. The build job will clone my android project from Github and generates the APK. I'm using Ubuntu 20.04 LTS server OS. As part of the build ...
ThatTechGuy's user avatar
0 votes
1 answer
562 views

Bash script to restart java application after Jenkins compiling

I'm noob in linux! I have my server and installed jenkins. I need to create bash script, which should run application(or will restart if it has already been started) after jenkins compile it. I tried ...
Alex F's user avatar
  • 3
0 votes
2 answers
1k views

sshpass splitting the password as two strings seperated by the character "&" in password

I have a password variable PASS whose value is abc123&zxcv456 When I try to do SSH in jenkins using the password variable like below sshpass -p ${PASS} ssh -o StrictHostKeyChecking=no admin@100....
light's user avatar
  • 11
0 votes
4 answers
3k views

how i parse following json array format. i want this filename value in bash or groovy?

How do I parse the following json array format? I want the filename value filewhichisdeploy in bash or groovy { "filewhichisdeploy":[ { "filename": "value" ...
Akshay kumar Sinha's user avatar
0 votes
2 answers
4k views

How to run remote server shell script with environment parameters on Jenkins pipeline

I am attempting to run a shell script on a remote server in jenkins scripted pipeline using the sshScript remote: remote, script: command. This line of code currently looks like this: sshScript remote:...
Connor Rasmussen's user avatar
1 vote
1 answer
3k views

lsof command not found during shell script execution in Jenkins pipeline

I'm trying to get process id which is running against specific port hence manually following command successfully executed - lsof -i :9090 -t But if I run same code on same machine through shell ...
Alpha's user avatar
  • 147
2 votes
1 answer
21k views

warning: here-document at line 2 delimited by end-of-file (wanted `EOF')

I've read a lot here and then but still cannot find how to fix this: steps.wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { steps.withCredentials([steps.usernamePassword(...
WhoAmI's user avatar
  • 179
0 votes
1 answer
327 views

Error when Deploy PHP to Azure Web App using Jenkins Pipeline

I'm stuck at the jenkins stage to deploy from github repo to azure web app. stage('Deployment to Staging') { azureWebAppPublish appName: 'app1', azureCredentialsId: 'cred1', ...
Steven Audy's user avatar
0 votes
1 answer
108 views

Which method to avoid printing into log but still creating file in bash

I am new to working on sedona stuff, so I have tried following code. sh("echo '{abData}'> abData.out") It is supposed to create file called abData.out with the content of abData variable ...
Kush's user avatar
  • 1
0 votes
1 answer
2k views

after disk space freed, jenkins nodes doesn't come back online

I looked at https://unix.stackexchange.com/search?q=jenkins & Jenkins support https://issues.jenkins.io I didn't find out there how to solve that. initial state Nodes & main server had disk ...
francois P's user avatar
  • 1,219
0 votes
1 answer
927 views

Http_proxy environment variable is present in terminal but not in Jenkins run

In /etc/profile ,we have http_proxy variable is set. When we run the command env from terminal(logged in via ssh in putty) it shows it correctly. But when we tried to run env command from Jenkins this ...
Samselvaprabu's user avatar
0 votes
1 answer
40 views

Jenkins master and slave architecture [closed]

I am new to jenkins, just wanted to confirm few things. Is jenkins install the agent node by default on the same node when you install the jenkins or it just install the master. Is it good practice ...
Rajnish Kumar Soni's user avatar
0 votes
0 answers
2k views

Shell script on Jenkins Execute Shell not working as expected

Here is the script on jenins execute shell , if the choice parameter selected as QA I'd like the script to execute ./runTest_qa.sh and otherwise run ./runTest_rnd.sh a=$ENV b=QA if [ "$a" ==...
theLostTechnologist's user avatar
0 votes
0 answers
413 views

how to remove a file in Jenkins through Execute Shell [duplicate]

this is the console output of Jenkins' build. Here, you could see that the file Oct Release SQL.txt is present in the path but when I am deleting it by using rm Oct Release SQL.txt, it is not able to ...
Harshita Singh's user avatar
0 votes
0 answers
135 views

Stop systemd from running user unit for user jenkins

I just installed jenkins on my pop-os following the instruction and install several plugins in jenkins when I found that several gnome user unit is started for user jenkins I tried restarting my ...
JiaHao Xu's user avatar
  • 228
0 votes
1 answer
1k views

jenkins auto login disable

I want to disable Jenkins auto login. When I open the jenkins on browser like http://192.168.5.15:8080 , it does not ask user id and password . when I go to Manage Jenkins > Configure Global ...
addi jeo's user avatar
1 vote
0 answers
180 views

Play sound from Jenkins script

I run Jenkins on Ubuntu Mate on a Raspberry Pi 2 which has sound hardware (via HDMI). When connected via SSH, sounds works great. However, it does not work via Jenkins. I tried an espeak 'hi', the ...
Ionică Bizău's user avatar
1 vote
1 answer
6k views

Perform action based on directory's existence

I'm writing a shell script in Jenkins pipeline, where if a specific zip file is available, then proceed with further step. If the zip file does not exist (it may be case that directory structure ...
Alpha's user avatar
  • 147
0 votes
1 answer
6k views

Failed to authenticate with public key in jenkins

I have two different servers: Jenkins EC2 instance (my vuejs application) So When I am trying to deploy vuejs application using Jenkins SSH Plugin to remote server but it can't connect The log : ...
kaito kid's user avatar
0 votes
0 answers
501 views

Connection dropping immediately after entering password to remote CentOS system after starting jenkins

When trying to connect to a remote system through VPN, connection dropped immediately after entering the password. mohan@mohan-ThinkPad-T431s:~$ ssh [email protected] [email protected]'s password: ...
Mohan's user avatar
  • 143
2 votes
1 answer
5k views

How to pass username and password of a bitbucket repository to a shell script triggered via jenkins

I am trying to create a Jenkins job that will trigger a shell script via the option Send files or execute commands over SSH in Jenkins. The following is the main part of my shell script: #!/bin/bash ...
Geo Thomas's user avatar
0 votes
2 answers
258 views

How to define the 'From' field for email notification in one command from execute shell

I have Jenkins pipeline (illinXXX) with execute shell, which part of it runs the below command: echo "LDAP server is down"|/usr/sbin/sendmail -t [email protected] Any idea how can I change the 'From'...
arielma's user avatar
  • 223
0 votes
1 answer
351 views

How to set and record alerts for Jenkin server down and up

I have Jenkins pipeline job which goes thought all our Jenkins servers and check the connectivity (runs every few minutes). ksh file: #!/bin/ksh JENKINS_URL=$1 curl --connect-timeout 10 "$...
arielma's user avatar
  • 223
0 votes
4 answers
24k views

Unit jenkins.service could not be found

I am trying to start Jenkins in a Centos 7 machine. I am trying to copy the Jenkins folder from another machine to this machine and start it here instead of downloading. I copy the entire Jenkins ...
Geo Thomas's user avatar
0 votes
1 answer
304 views

Can I migrate Jenkins from Centos machine to another just by copying the Jenkins folder

I am trying to copy my Jenkins from 1 Centos machine to another. I am trying to Zip the entire Jenkins folder and Unzip it in the another machine. When I try to start Jenkins in the new machine, I ...
Geo Thomas's user avatar
0 votes
1 answer
82 views

Getting below error while building an image in docker

Getting below error while building an image in docker: docker build -t demo . Output : Sending build context to Docker daemon 2.048kB Step 1/3 : From tomcat:8 ---> 8973f493aa0a Step 2/3 : ...
SHWETA's user avatar
  • 1
5 votes
1 answer
15k views

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 <<EOF echo "Start." CYCLE=$...
skymedium's user avatar
  • 163
0 votes
0 answers
150 views

Jenkins - Bash if else statement variable not found [duplicate]

I am having a steps in Jenkins pipeline to read my test passing result and fail the Stage if rate lower than 95%. Here's the code sh ''' #!/bin/bash -xe PASS= `cat index.txt | grep % ...
hellojoshhhy's user avatar
0 votes
1 answer
1k views

Jenkins port in RHEL Maipo is pointing to tcp6

I have installed jenkins packages and started the service. But i am not able to access the url. when i am checking the ports listening, i could see that the port for jenkins is with tcp6. How do i ...
Newbie's user avatar
  • 1
5 votes
3 answers
1k views

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 ...
BlueRoyale's user avatar