Dav*_*per 5 windows oracle batch-file bamboo
我有一个包含以下内容的批处理文件:
@echo ON
echo "start"
echo "${bamboo.agentWorkingDirectory}"
CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\VsDevCmd.bat"
cd "${bamboo.build.working.directory}/server"
CALL npm install --msvs_version=2012
exit
Run Code Online (Sandbox Code Playgroud)
我使用这个批处理文件通过Bamboo安装oracledb.
当我手动运行这个批处理文件时,一切安装都很好,一切都很开心.但是,当我让Bamboo运行完全相同的批处理文件时,我收到以下错误:
build 15-Oct-2015 16:53:04 E:\bamboo-agent-home\xml-data\build-dir\EC-ECB-BE\server\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
build 15-Oct-2015 16:53:06 Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
build 15-Oct-2015 16:53:06 njsOracle.cpp
build 15-Oct-2015 16:53:06 njsPool.cpp
build 15-Oct-2015 16:53:07 njsConnection.cpp
build 15-Oct-2015 16:53:07 njsMessages.cpp
build 15-Oct-2015 16:53:07 dpiEnv.cpp
build 15-Oct-2015 16:53:07 dpiEnvImpl.cpp
build 15-Oct-2015 16:53:07 dpiException.cpp
build 15-Oct-2015 16:53:07 dpiExceptionImpl.cpp
build 15-Oct-2015 16:53:07 dpiConnImpl.cpp
build 15-Oct-2015 16:53:07 dpiDateTimeArrayImpl.cpp
build 15-Oct-2015 16:53:07 dpiPoolImpl.cpp
build 15-Oct-2015 16:53:07 dpiStmtImpl.cpp
build 15-Oct-2015 16:53:07 dpiUtils.cpp
build 15-Oct-2015 16:53:07 e:\bamboo-agent-home\xml-data\build-dir\ec-ecb-be\server\node_modules\oracledb\src\njs\src\njsConnection.h(54): fatal error C1083: Cannot open include file: 'node.h': No such file or directory (..\src\njs\src\njsConnection.cpp) [E:\bamboo-agent-home\xml-data\build-dir\EC-ECB-BE\server\node_modules\oracledb\build\oracledb.vcxproj]
build 15-Oct-2015 16:53:07 ..\src\njs\src\njsPool.cpp(51): fatal error C1083: Cannot open include file: 'node.h': No such file or directory [E:\bamboo-agent-home\xml-data\build-dir\EC-ECB-BE\server\node_modules\oracledb\build\oracledb.vcxproj]
build 15-Oct-2015 16:53:07 ..\src\njs\src\njsOracle.cpp(51): fatal error C1083: Cannot open include file: 'node.h': No such file or directory [E:\bamboo-agent-home\xml-data\build-dir\EC-ECB-BE\server\node_modules\oracledb\build\oracledb.vcxproj]
error 15-Oct-2015 16:53:08 gyp ERR! build error
error 15-Oct-2015 16:53:08 gyp ERR! stack Error: `msbuild` failed with exit code: 1
error 15-Oct-2015 16:53:08 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23)
error 15-Oct-2015 16:53:08 gyp ERR! stack at ChildProcess.emit (events.js:110:17)
error 15-Oct-2015 16:53:08 gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
error 15-Oct-2015 16:53:08 gyp ERR! System Windows_NT 6.1.7601
error 15-Oct-2015 16:53:08 gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
error 15-Oct-2015 16:53:08 gyp ERR! cwd E:\bamboo-agent-home\xml-data\build-dir\EC-ECB-BE\server\node_modules\oracledb
error 15-Oct-2015 16:53:08 gyp ERR! node -v v0.12.7
error 15-Oct-2015 16:53:08 gyp ERR! node-gyp -v v2.0.1
error 15-Oct-2015 16:53:08 gyp ERR! not ok
error 15-Oct-2015 16:53:08 npm ERR! Windows_NT 6.1.7601
error 15-Oct-2015 16:53:08 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--msvs_version=2012"
error 15-Oct-2015 16:53:08 npm ERR! node v0.12.7
error 15-Oct-2015 16:53:08 npm ERR! npm v2.11.3
Run Code Online (Sandbox Code Playgroud)
常规窗口环境和我刚刚没有设置的竹子环境之间必定存在差异.我在Bamboo任务中设置了以下环境变量:
TEMP="C:\temp" TMP="C:\temp" GYP_MSVS_VERSION="2012"
OCI_LIB_DIR="C:\oracle\instantclient\sdk\lib\msvc"
OCI_INC_DIR="C:\oracle\instantclient\sdk\include"
Run Code Online (Sandbox Code Playgroud)
如果有人可以提供帮助,那将非常感激.
跑步:node "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\n\xe2\x80\x8c\xe2\x80\x8bode-gyp.js" rebuild。\n这应该会产生错误。
如果它没有产生错误,npm_config_node_gyp则可能会被 Bamboo 修改为 cwd。在这种情况下,请将正确的值设置为环境变量。
如果确实出现错误,请检查目录中的node.h文件或文件夹,希望它不存在,重新安装应该可以使其工作。src%USERPROFILE%/.node-gyp/node-gyp
| 归档时间: |
|
| 查看次数: |
655 次 |
| 最近记录: |