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 [email protected] -tt "cd
/home/ec2-user/xxx-eportal2-myportalui"
#scp -r $WORKSPACE/* [email protected]
:/home/ec2-user/xxx-eportal2-myportalui
#ssh -o ServerAliveInterval=100 [email protected] -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 [email protected] -tt "cd
/usr/share/nginx/html/portal2;sudo rm -rf *;"
#ssh -o ServerAliveInterval=100 [email protected] -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: image.png]

It's weird though.

Please share your thoughts on fixing this.

Thanks,
Vijay


On Mon, Jan 13, 2020 at 9:31 AM Jérôme Godbout <[email protected]> wrote:

> 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.
>
>
>
>
>
>
> [image: 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 <http://www.amotus-solutions.com/>
> statum-iot.com
>
> <https://www.facebook.com/LesSolutionsAmotus/>
> <https://www.linkedin.com/company/amotus-solutions/>
> <https://twitter.com/AmotusSolutions>
> <https://www.youtube.com/channel/UCoYpQgsmj1iJZyDjTQ3x8Ig>
>
>
>
>
>
> *From:* [email protected] <[email protected]>
> *On Behalf Of *Vijay Gongle
> *Sent:* January 12, 2020 8:57 PM
> *To:* [email protected]
> *Subject:* Re: Jenkins build status always shows success
>
>
>
> 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 <[email protected]>
> wrote:
>
> 
>
> 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.
>
>
>
>
>
>
>
> On Sat, Jan 11, 2020 at 04:59 Vijay Gongle <[email protected]> wrote:
>
> 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 <
> [email protected]> wrote:
>
> 
>
> 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*
>
>
>
>
>
> On Sat, 11 Jan 2020 at 02:53, Vijay Gongle <[email protected]> wrote:
>
> 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
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/297b1845-300b-403a-b6a1-75df69a69c8a%40googlegroups.com
> .
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAMrg02QwFJ_qpxs_M8La1ayFja4-7Pv4%2BFfDQ8OKa3FBhw27%2BQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAMrg02QwFJ_qpxs_M8La1ayFja4-7Pv4%2BFfDQ8OKa3FBhw27%2BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/996DC916-80B4-479E-BCB7-FBEE5CAD900B%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/996DC916-80B4-479E-BCB7-FBEE5CAD900B%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9KVUMS8LkdFE%3D9tQYSfXxf%3DyZpeHp7SkWGmHAyvRRyitA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9KVUMS8LkdFE%3D9tQYSfXxf%3DyZpeHp7SkWGmHAyvRRyitA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/A1A4EAC0-EE49-4FBF-999D-A22D250C9A4A%40gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/A1A4EAC0-EE49-4FBF-999D-A22D250C9A4A%40gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/YQXPR0101MB1173C32A873B93FD6456AE6CCD350%40YQXPR0101MB1173.CANPRD01.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/jenkinsci-users/YQXPR0101MB1173C32A873B93FD6456AE6CCD350%40YQXPR0101MB1173.CANPRD01.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMrMyD%3D0hOvZ%2BHz27ngX6y-17RiUWby66d5WfTuuKz6X0%2BRSbA%40mail.gmail.com.

Reply via email to