[JIRA] [sqlplus-script-runner-plugin] (JENKINS-31597) SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level

108 views
Skip to first unread message

raphael.unique@stef.com (JIRA)

unread,
Nov 17, 2015, 6:59:01 AM11/17/15
to jenkinsc...@googlegroups.com
Raphaël UNIQUE created an issue
 
Jenkins / Improvement JENKINS-31597
SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level
Issue Type: Improvement Improvement
Assignee: Fernando Boaglio
Components: sqlplus-script-runner-plugin
Created: 17/Nov/15 11:58 AM
Priority: Major Major
Reporter: Raphaël UNIQUE

it should be a very interesting improvment to set the ORACLE_HOME at slave or job level.

we have many slaves with different oracle client installed, in different directories.
even if the ORACLE_HOME variable is setted (at slave level), this plugin force to set it at the master level

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

fernando@boaglio.com (JIRA)

unread,
Nov 17, 2015, 10:53:02 PM11/17/15
to jenkinsc...@googlegroups.com
Fernando Boaglio commented on Improvement JENKINS-31597
 
Re: SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level

Hi, I understand your need and I can put a ORACLE_HOME at job level, but sqlplus should be inside "ORACLE_HOME\bin" directory, ok ?

raphael.unique@stef.com (JIRA)

unread,
Nov 18, 2015, 4:00:01 AM11/18/15
to jenkinsc...@googlegroups.com

Hi Fernando,
the best solution, for us, should be: the plugin, during the build, should read the ORACLE_HOME environment variable (setted on our slave, or at job level with envinject)
and yes, sqlplus is always in $ORACLE_HOIME/bin directory

fernando@boaglio.com (JIRA)

unread,
Nov 20, 2015, 8:19:01 PM11/20/15
to jenkinsc...@googlegroups.com
Fernando Boaglio updated an issue
 

new snapshot version

Change By: Fernando Boaglio
Attachment: sqlplus-script-runner-1.0.1-SNAPSHOT.hpi

fernando@boaglio.com (JIRA)

unread,
Nov 20, 2015, 8:21:01 PM11/20/15
to jenkinsc...@googlegroups.com
Fernando Boaglio commented on Improvement JENKINS-31597
 
Re: SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level

Raphaël , please try to run this attached version and let me know if it solves your problem.

raphael.unique@stef.com (JIRA)

unread,
Nov 24, 2015, 3:32:03 AM11/24/15
to jenkinsc...@googlegroups.com

raphael.unique@stef.com (JIRA)

unread,
Nov 24, 2015, 3:35:01 AM11/24/15
to jenkinsc...@googlegroups.com

raphael.unique@stef.com (JIRA)

unread,
Nov 24, 2015, 3:35:01 AM11/24/15
to jenkinsc...@googlegroups.com
Raphaël UNIQUE commented on Improvement JENKINS-31597
 
Re: SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level

Fernando,
it's better, but should be perfect if i can use environment variables

for example: attached snapshot
my ORACLE_HOME is setted at slave level
in my job configuration, i have setted the ORACLE_HOME value with the $ORACLE_HOME variable

raphael.unique@stef.com (JIRA)

unread,
Nov 24, 2015, 5:35:03 AM11/24/15
to jenkinsc...@googlegroups.com

i have tested with an ORACLE_HOME setted a job level, but it's KO:

ERROR: Build step failed with exception
java.lang.RuntimeException: java.lang.RuntimeException: ORACLE_HOME directory [/oracle/products/middleware/as_1/] does not exist!

and the directory exist!

(screenshot error)

raphael.unique@stef.com (JIRA)

unread,
Nov 24, 2015, 5:35:03 AM11/24/15
to jenkinsc...@googlegroups.com
Raphaël UNIQUE edited a comment on Improvement JENKINS-31597
Fernando,
it's better, but should be perfect if i can use environment variables

for example: attached  snapshot  screenshot
my ORACLE_HOME is setted at slave level
in my job configuration, i have setted the ORACLE_HOME value with the $ORACLE_HOME variable

raphael.unique@stef.com (JIRA)

unread,
Nov 24, 2015, 5:35:04 AM11/24/15
to jenkinsc...@googlegroups.com

fernando@boaglio.com (JIRA)

unread,
Nov 25, 2015, 9:47:01 PM11/25/15
to jenkinsc...@googlegroups.com
Fernando Boaglio updated an issue
Change By: Fernando Boaglio
Attachment: sqlplus-script-runner-1.0.1-SNAPSHOT.hpi

fernando@boaglio.com (JIRA)

unread,
Nov 25, 2015, 9:51:01 PM11/25/15
to jenkinsc...@googlegroups.com
Fernando Boaglio updated an issue

Added a global level option to try to detect ORACLE_HOME , please let me know if it works on your slave network

Change By: Fernando Boaglio
Attachment: sqlplus-script-runner.hpi

raphael.unique@stef.com (JIRA)

unread,
Nov 26, 2015, 3:38:02 AM11/26/15
to jenkinsc...@googlegroups.com
Raphaël UNIQUE commented on Improvement JENKINS-31597
 
Re: SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level

Thanks Fernando, but nothing works:

  • the global setting "Try to detect ORACLE_HOME" is not saved when activated
  • in any case, i have this error "java.lang.RuntimeException: java.lang.RuntimeException: ORACLE_HOME directory [/oracle/products/middleware/as_1] does not exist!"
  • if the oracle_home is setted in global settings
  • if the oracle_home is setted in the job

i i try to detect, i have this error:

[test_sqlplus] $ /bin/sh -xe /tmp/hudson9031973967219575541.sh
+ echo 'ORACLE_HOME value: /oracle/products/middleware/as_1'
ORACLE_HOME value: /oracle/products/middleware/as_1
+ echo 'ORACLE_HOME content:'
ORACLE_HOME content:
+ ls -l /oracle/products/middleware/as_1/bin/sqlj /oracle/products/middleware/as_1/bin/sqlldr /oracle/products/middleware/as_1/bin/sqlldrO /oracle/products/middleware/as_1/bin/sqlplus /oracle/products/middleware/as_1/bin/sqlplus32 /oracle/products/middleware/as_1/bin/sqlplus32O /oracle/products/middleware/as_1/bin/sqlplusO
-rwxrwxr-x 1 oracle oinstall 10690 26 août 2008 /oracle/products/middleware/as_1/bin/sqlj
-rwxrwxr-x 1 oracle oinstall 1479576 21 juil. 13:30 /oracle/products/middleware/as_1/bin/sqlldr
-rwxrwxr-x 1 oracle oinstall 1479576 28 janv. 2013 /oracle/products/middleware/as_1/bin/sqlldrO
-rwxrwxr-x 1 oracle oinstall 8967 21 juil. 13:30 /oracle/products/middleware/as_1/bin/sqlplus
-rwxrwxr-x 1 oracle oinstall 6811 21 juil. 13:30 /oracle/products/middleware/as_1/bin/sqlplus32
-rwxrwxr-x 1 oracle oinstall 6811 28 janv. 2013 /oracle/products/middleware/as_1/bin/sqlplus32O
-rwxrwxr-x 1 oracle oinstall 8967 28 janv. 2013 /oracle/products/middleware/as_1/bin/sqlplusO
--------------------------------------------------------------------------
Getting ORACLE_HOME...


ERROR: Build step failed with exception

java.lang.RuntimeException: java.lang.RuntimeException: Please set up the ORACLE_HOME!
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunnerBuilder.perform(SQLPlusRunnerBuilder.java:120)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Caused by: java.lang.RuntimeException: Please set up the ORACLE_HOME!
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunner.runGetSQLPLusVersion(SQLPlusRunner.java:56)
at org.jenkinsci.plugins.sqlplusscriptrunner.SQLPlusRunnerBuilder.perform(SQLPlusRunnerBuilder.java:112)
... 9 more
Build step 'SQLPlus Script Runner' marked build as failure

raphael.unique@stef.com (JIRA)

unread,
Nov 26, 2015, 3:46:02 AM11/26/15
to jenkinsc...@googlegroups.com
Raphaël UNIQUE edited a comment on Improvement JENKINS-31597
Thanks Fernando, but nothing works:

- the global setting "Try to detect ORACLE_HOME" is not saved when activated
- in any case, i have this error "java.lang.RuntimeException: java.lang.RuntimeException: ORACLE_HOME directory [/oracle/products/middleware/as_1] does not exist!"
     - if the oracle_home is  setted in global settings
     -  if the oracle_home is  setted in the job


i i try to detect, i have this error:


{code:java}
{code}

fernando@boaglio.com (JIRA)

unread,
Dec 7, 2015, 4:24:01 AM12/7/15
to jenkinsc...@googlegroups.com

Hi Raphaël, I am having a hard time trying to make it work on slaves properly, but I am getting closer

Anyway, I've added localization support to this plugin to translate it to my native language (pt_BR).

Assuming that you are not native American, do you want to help translate it to another language ?

taj@mailinator.com (JIRA)

unread,
Dec 17, 2015, 4:30:04 AM12/17/15
to jenkinsc...@googlegroups.com

taj@mailinator.com (JIRA)

unread,
Dec 17, 2015, 4:30:04 AM12/17/15
to jenkinsc...@googlegroups.com
QA QA started work on Improvement JENKINS-31597
 
Change By: QA QA
Status: Open In Progress

scm_issue_link@java.net (JIRA)

unread,
Dec 19, 2015, 2:42:02 PM12/19/15
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Improvement JENKINS-31597
 
Re: SQLPlus Script Runner Plugin: ORACLE_HOME at job or slave level

Code changed in jenkins
User: Bruno P. Kinoshita
Path:
pom.xml
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/ExternalProgramUtil.java
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/SQLPlusRunner.java
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/SQLPlusRunnerBuilder.java
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/SQLPlusRunnerException.java
src/test/java/org/jenkinsci/plugins/sqlplusscriptrunner/test/TestSQLPlus.java
http://jenkins-ci.org/commit/sqlplus-script-runner-plugin/a8e31456464d4841be0a634b558c697dff81e864
Log:
JENKINS-31597 First tentative of adding support to distributed builds - WIP, not thoroughly tested

scm_issue_link@java.net (JIRA)

unread,
Dec 19, 2015, 2:42:03 PM12/19/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Fernando Boaglio


Path:
pom.xml
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/ExternalProgramUtil.java
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/SQLPlusRunner.java
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/SQLPlusRunnerBuilder.java
src/main/java/org/jenkinsci/plugins/sqlplusscriptrunner/SQLPlusRunnerException.java
src/test/java/org/jenkinsci/plugins/sqlplusscriptrunner/test/TestSQLPlus.java

JENKINS-31597 First tentative of adding support to distributed builds - WIP, not thoroughly tested

fernando@boaglio.com (JIRA)

unread,
Dec 20, 2015, 11:54:04 PM12/20/15
to jenkinsc...@googlegroups.com

fernando@boaglio.com (JIRA)

unread,
Dec 20, 2015, 11:56:01 PM12/20/15
to jenkinsc...@googlegroups.com
Fernando Boaglio updated an issue

fixed version, it works on slaves with ORACLE_HOME autodetection, please try it and give me some feedback

Change By: Fernando Boaglio
Attachment: sqlplus-script-runner.hpi
Add Comment Add Comment
 

fernando@boaglio.com (JIRA)

unread,
Dec 22, 2015, 9:23:03 AM12/22/15
to jenkinsc...@googlegroups.com
Fernando Boaglio resolved as Fixed
 

Fixed on release 1.0.1

Change By: Fernando Boaglio
Status: In Progress Resolved
Resolution: Fixed

fernando@boaglio.com (JIRA)

unread,
Jan 19, 2017, 9:37:03 PM1/19/17
to jenkinsc...@googlegroups.com
Fernando Boaglio closed an issue as Fixed
Change By: Fernando Boaglio
Status: Resolved Closed
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages