下载JENKINS Jenkins
下载 java SDK(目前只支持8和11) 如出现启动失败/找不到/PID。一般都是JAVA版本太高,环境变量配置失败
启动JENKINS LOCALHOST:8080 按照指示激活
按照默认配置就好
选择 manager jenkins=》manager pluger =》可选插件=》subversion
新建ITEM freeproject 源码管理选择SVN
触发器 轮询
增加构建命令=》command 输入CMD 命令 =》停止IIS程序池 执行编译,发布=>启动iIS程序池
C:\Windows\System32\inetsrv\appcmd.exe stop apppool /apppool.name:Industrial.API
C:\Windows\System32\inetsrv\appcmd.exe stop apppool /apppool.name:Industrial.PadWebApi
dotnet build %WORKSPACE%\trunk\Wot.IndustrialManager\Wot.IndustrialManager.sln
dotnet publish %WORKSPACE%\trunk\Wot.IndustrialManager\Wot.WebApi\Wot.WebApi.csproj -c release -o E:\API\publish --self-contained false
dotnet publish %WORKSPACE%\trunk\Wot.IndustrialManager\Wot.PadWebApi\Wot.PadWebApi.csproj -c release -o E:\PadWebApi\publish --self-contained false
C:\Windows\System32\inetsrv\appcmd.exe start apppool /apppool.name:Industrial.API
C:\Windows\System32\inetsrv\appcmd.exe start apppool /apppool.name:Industrial.PadWebApi
NODE.JS同理
C:\Windows\System32\inetsrv\appcmd.exe stop apppool /apppool.name:Industrial.UI
C:\Windows\System32\inetsrv\appcmd.exe stop apppool /apppool.name:Industrial.PadWebApi
cd %WORKSPACE%\trunk\admin-industrial\
call cnpm run build
C:\Windows\System32\XCopy.exe /e/y %WORKSPACE%\trunk\admin-industrial\dist E:\Industrial.UI\dist
cd %WORKSPACE%\trunk\admin-industrial-ipad\
call cnpm run build
C:\Windows\System32\XCopy.exe /e/y %WORKSPACE%\trunk\admin-industrial-ipad\dist E:\Industrial.UI\paddist
C:\Windows\System32\inetsrv\appcmd.exe start apppool /apppool.name:Industrial.UI
C:\Windows\System32\inetsrv\appcmd.exe start apppool /apppool.name:Industrial.PadWebApi
如果遇到找不到‘NPM’啥的