0

从 Jenkins Job 执行 PowerBuilder 自动构建时,我收到下面提到的错误。

D:\Jenkins\jobs\RxProcessing Build\workspace>"C:\Program Files (x86)\Sybase\Shared\PowerBuilder\orcascr125.exe"
"C:\SVN_PSV\Trunk\AutoBuild\GetLatest.dat" 
Sybase (R) OrcaScript interpreter version 12.5
Using ANSI source file C:\SVN_PSV\Trunk\AutoBuild\GetLatest.dat.
Start Session
scc get connect properties "C:\SVN_PSV\Trunk\PB125\PfW\xxxx32.pbw"
   Orca error in 'scc get connect properties'. Result Code -23.
   Unable to read SCC connect properties for C:\SVN_PSV\Trunk\PB125\PfW\xxxx32.pbw
   An error occurred reading the Windows registry entry.
Last Command Failed.
scc close 
You must successfully issue scc connect before you can call this method.
End Session

当以下命令文件直接在命令提示符下执行时没有给出任何此类错误。仅在从 Jenkins Job 执行此 CMD 文件时才会发生错误。

以下是调用 Orca Script 的命令文件内容。

attrib -R "C:\SVN_PSV\Trunk\PB125\*.*" /S /D
attrib -R "C:\SVN_PSV\Trunk\PB125\PfW\*.*" /S
attrib -R "C:\SVN_PSV\Trunk\PB125\PFC\*.*" /S
attrib -R "C:\SVN_PSV\Trunk\PB125\Shared\*.*" /S
"C:\Program Files (x86)\Sybase\Shared\PowerBuilder\orcascr125.exe"     "C:\SVN_PSV\Trunk\AutoBuild\GetLatest.dat"
attrib -R "C:\SVN_PSV\Trunk\PB125\*.*" /S /D
attrib -R "C:\SVN_PSV\Trunk\PB125\PfW\*.*" /S
attrib -R "C:\SVN_PSV\Trunk\PB125\PFC\*.*" /S
attrib -R "C:\SVN_PSV\Trunk\PB125\Shared\*.*" /S
"C:\Program Files (x86)\Sybase\Shared\PowerBuilder\orcascr125.exe" "C:\SVN_PSV\Trunk\AutoBuild\SolBuild.dat"
pause

Orca 脚本:GetLatest.dat:

start session
scc get connect properties "C:\SVN_PSV\Trunk\PB125\PfW\xxxx32.pbw"
scc set connect property provider "PushOk SVNSCC"
scc set connect property userid "build"
scc set connect property password "*********"
scc set connect property logfile     "C:\SVN_PSV\Trunk\AutoBuild\pbscc120.log"
scc set connect property logappend True
scc connect
SCC set connect property localprojpath "C:\SVN_PSV\Trunk\PB125"
scc set target "C:\SVN_PSV\Trunk\PB125\PfW\xxxx.pbt" "refresh_all"
;SCC set target "C:\SVN_PSV\Trunk\PB125\PfW\xxxx.pbt" "OUTOFDATE   EXCLUDE_CHECKOUT"
SCC refresh target "full"
;SCC refresh target incremental
SCC Close
end session

请帮我删除这个错误代码-23。

电源生成器 12.5

詹金斯 1.617 版

4

1 回答 1

0

不要打扰 SCC 命令和 PushOK。只需在作业配置的 Source Code Management 部分中选择 Subversion Modules。然后在您的 OrcaScript 中创建库并导入文件。这是我在 PBOrca 中使用的,我推荐使用 PowerBuilder 附带的 OrcaScript。

# Imports and migrates the target
# This script expects that the project and all required resources are present in the WORKSPACE folder
# Variables
# these are required in the environment
# WORKSPACE - full path to the root of the project. Jenkins sets this in a Jenkins build
# ORCADLL   - name of the ORCA dll to use, e.g. pborc125.dll
#
# these are loaded from the config section of build.ini
# TARGETNAME - name of the target to build, e.g. sample.pbt
#
session begin %%ORCADLL%%

profile string %%WORKSPACE%%\build.ini, config, targetname

cd %%WORKSPACE%%

timestamp
echo creating PBLs
target create lib .\%%TARGETNAME%%
target set liblist .\%%TARGETNAME%%

# set default pb application to allow us to import target
set application  ,

timestamp
echo Importing target %%TARGETNAME%%
target import .\%%TARGETNAME%%, .\

#end orca session and switch to the target we just imported
timestamp
echo Finished importing %%TARGETNAME%%
session end 
session begin %%ORCADLL%%

# set liblist and application from target
target set liblist .\%%TARGETNAME%%
target set app .\%%TARGETNAME%%

timestamp
echo Migrating target %%TARGETNAME%%
build app migrate

timestamp
echo Finished Migrating target %%TARGETNAME%%
session end 

Jenkins 配置如下所示: Jenkins 源代码管理部分

Jenkins 构建触发器部分

于 2016-09-20T17:58:46.823 回答