RE: How to run commands as Oracle linux user in Jenkins

  • From: <dimensional.dba@xxxxxxxxxxx>
  • To: <krishsingh.111@xxxxxxxxx>, "'ORACLE-L'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 18 May 2020 09:24:36 -0700

You have to be able to “sudo su – oracle”

Look up standard linux for implementing sudo privileges for a specific user.

 

From: oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> On Behalf 
Of kunwar singh
Sent: Monday, May 18, 2020 8:54 AM
To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
Subject: How to run commands as Oracle linux user in Jenkins

 

Hi Listers,

I am learning Jenkins for automating oracle database installation etc.

 

I have a question, i installed Jenkins. 

 

How  do i run commands as Oracle linux user. In other words how to i switch to 
Oracle user

 

When i hit build now inside Jenkins Dashboard and see the "Console Output" I 
see this.

--------------------------------------------

Started by user Admin

Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/Databaseinstallation
[Databaseinstallation] $ /bin/sh -xe /tmp/jenkins8356574915939683433.sh
+ whoami
jenkins

 -------------------------------------------- 

Apologies in advance as it is a basic question, but i am new to this :)

 

I reviewed few blog posts but not able to get past it.

 

This is my Jenkins version.

<version>2.222.3</version>

 

 

 

-- 

Cheers,
Kunwar

Other related posts: