2.9. 从 Business Central 提取源代码,以便在 S2I 构建中使用
如果您计划使用 Source-to-image (S2I)过程创建不可变 KIE 服务器,则必须在 Git 存储库中提供您的服务的源代码。如果您使用 Business Central 编写服务,您可以提取服务的源代码并将其放在单独的 Git 存储库中,如 GitHub 或 GitLab 的内部安装,以便在 S2I 构建中使用。
如果您不打算使用 S2I 进程,或者您没有使用 Business Central 编写服务,请跳过这个过程。
流程
使用以下命令提取源代码:
git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>
git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在这个命令中,替换以下变量:
-
<business-central-host
> 带有运行 Business Central 的主机 -
<
myspace>,项目所在的 Business Central 空间的名称 -
<myproject
> 带有项目名称
注意要查看 Business Central 中项目的完整 Git URL,请点击 Menu
Design < MyProject> Settings。 注意如果您将自签名证书用于 HTTPS 通信,命令可能会失败,并显示
SSL 证书问题
错误消息。在这种情况下,在git
中禁用 SSL 证书验证,例如使用GIT_SSL_NO_VERIFY
环境变量:env GIT_SSL_NO_VERIFY=true git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>
env GIT_SSL_NO_VERIFY=true git clone https://<business-central-host>:443/git/<MySpace>/<MyProject>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
- 将源代码上传到 S2I 构建的另一个 Git 存储库,如 GitHub 或 GitLab。