Asaf
Asaf

Reputation: 11

Running a python script from jenkins - but can't see the python prints in the output of jenkins

I am running Python script from Jenkins but the prints of Python doesn't shows in the jenkins output

Jenkins output example: "Started by user anonymous Building in workspace C:\Program Files (x86)\Jenkins\workspace\Testing Sanity

[Testing Sanity] $ cmd.exe /c call C:\windows\TEMP\shiningpanda6085220944592659293.bat

C:\Program Files (x86)\Jenkins\workspace\Testing Sanity>nosetests 
C:\Users\asafb\PycharmProjects\Sanity_HB_RR_from_Saved_Pos\Check_Newly_Created_Cluster_Monitor.py 

C:\Program Files (x86)\Jenkins\workspace\Testing Sanity>exit 0 
Finished: SUCCESS"

Upvotes: 1

Views: 1434

Answers (1)

Rakesh
Rakesh

Reputation: 82765

I set this on top of the python script and the output started showing on the Jenkins Console:

#!/usr/bin/env python -u

Upvotes: 1

Related Questions