Jenkins build status always shows success

瀏覽次數:25 次
跳到第一則未讀訊息

Vijay Gongle

未讀,
2020年1月10日 下午4:23:262020/1/10
收件者:Jenkins Users
Hello,
This is something weird I started seeing from past 2 days. No matter what or how many errors you have in console output, it shows the results as “success” and green and never marks the status “failed” at the end.

This job has been working fine for months.
I created a new job with similar configuration and script, it still behaves the same way.

I’m sure someone can help me with it.

Thanks in advance!
Vijay

RAJENDRA PRASAD

未讀,
2020年1月10日 晚上11:28:262020/1/10
收件者:jenkins...@googlegroups.com
Could you please elaborate on what kind of project you are running?
Running from Bash Shell of Jenkins build step or batch file?
i

Rajendra Prasad Reddy Penumalli



--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/297b1845-300b-403a-b6a1-75df69a69c8a%40googlegroups.com.

Vijay Gongle

未讀,
2020年1月11日 清晨5:59:232020/1/11
收件者:jenkins...@googlegroups.com
Correct. It’s an Angular project and running bash shell script of Jenkins build.

Thanks,
Vijay 
Sent from my iPhone

On Jan 10, 2020, at 11:28 PM, RAJENDRA PRASAD <rajendra....@gmail.com> wrote:



Jan Monterrubio

未讀,
2020年1月11日 下午4:47:002020/1/11
收件者:jenkins...@googlegroups.com
Does it mark unsuccessful if you have:
exit 1

As the last line of your script? Can you each out the result of your angular command? It might be pronting errors but exiting with a status of 0 which is considered successful. 



Vijay Gongle

未讀,
2020年1月12日 晚上8:56:592020/1/12
收件者:jenkins...@googlegroups.com
I didn’t set the exit status to either 0 or 1. 

I did set it now to 1 and the status still shows success .

Thanks,
Vijay 

Sent from my iPhone

On Jan 11, 2020, at 4:46 PM, Jan Monterrubio <janmont...@gmail.com> wrote:



RAJENDRA PRASAD

未讀,
2020年1月12日 晚上11:30:402020/1/12
收件者:jenkins...@googlegroups.com
Impossible,
Could you please paste code snippet that you are using to set exit status 1...
 

Thanks and Regards,
Rajendra Prasad Reddy Penumalli



Jérôme Godbout

未讀,
2020年1月13日 上午9:31:142020/1/13
收件者:jenkins...@googlegroups.com

Just asking, is the shell script (bat or sh) argument are set

returnStatus = false, returnStdout = false

 

or if the default did changes into recent release? If not into Jenkinsfiles, is the API into the plugin did modify anything?

Maybe this sound obvious but sound like something like that did changes and is not backward compatible.

 

 


36E56279

une compagnie 

RAPPROCHEZ LA DISTANCE

Jérôme Godbout
Développeur Logiciel Sénior / 
Senior Software Developer

p: +1 (418) 800-1073 ext.:109

amotus.ca
statum-iot.com

   

 

Vijay Gongle

未讀,
2020年1月13日 下午4:10:372020/1/13
收件者:jenkins...@googlegroups.com
Hello @Jerome @Rajendra: 

Below is the sh script from the build step of the job: 

#!/bin/bash

TIMESTAMP=$(date "+%Y_%m_%dT%T")
#ssh -o ServerAliveInterval=100 ec2-...@xxfff.f.fff -tt "cd /home/ec2-user/xxx-eportal2-myportalui"
#scp -r $WORKSPACE/* ec2-...@xx224.9.xxx:/home/ec2-user/xxx-eportal2-myportalui
#ssh -o ServerAliveInterval=100 ec2-...@xx224.9.xxx -tt "cd /home/ec2-user/xxx-eportal2-myportalui;chmod 755 -R *;npm install -i;npm run build;sudo node version.js $BUILD_NUMBER;sudo systemctl stop nginx;"
#ssh -o ServerAliveInterval=100 ec2-...@xx224.9.xxx -tt "cd /usr/share/nginx/html/portal2;sudo rm -rf *;"
#ssh -o ServerAliveInterval=100 ec2-...@xx224.9.xxx -tt "cd /home/ec2-user/xxx-eportal2-myportalui/dist;sudo cp -rf * /usr/share/nginx/html/;sudo systemctl start nginx;"

#######################aws s3 rm s3://enterpriseportal/portal2/angularapp/$env/$RELNO/myportal/ --recursive

#npm install
npm install -i

# get chromium (stable)
#yum install chromium

# install lighthouse


#build
npm run build

#deploy
NODE_ENV=$env release=$RELNO npm run deploy

#ssh -o ServerAliveInterval=100 ec2-user@xx13xxxxxx9 -tt "sudo -i sed -i \"s/^\(\s*\"$env\"_angularapp_myportal_release\s*:\s*\).*/\1$RELNO/\" /etc/puppetlabs/code/environments/production/hieradata/s3sync.yaml"
ssh -o ServerAliveInterval=100 ec2-user@xx13xxxxxx73 -tt 'sudo -i puppet apply -e "include base::hiera_git"'
################ssh ec2-user@xx13xxxxxx73 -tt "sudo -i sed -i \"s/^\(\s*s3sync\:\:\"$env\"_angularapp_myportal_release\s*:\s*\).*/\1$RELNO/\" /tmp/workspace_git/data/s3sync.yaml"
ssh -o ServerAliveInterval=100 ec2-user@xx13xxxxxx73 -tt 'sudo -i /etc/puppetlabs/puppet/scripts/updateyaml.sh'

ssh -o ServerAliveInterval=100 ec2-user@xx13xxxxxx73 -tt "sudo -i puppet apply -e \"include portal2::angularapp_sync\""


#Sonar
npm run sonar
node -v



Under which I have the exit code set to 1 but doesn't work with either 0 or 1 or blank. 

image.png

It's weird though. 

Please share your thoughts on fixing this. 

Thanks, 
Vijay
 

回覆所有人
回覆作者
轉寄
0 則新訊息