使用现有存储库中的分支创建 Openshift 应用程序(使用“rhc create”)



OpenShift Web 控制台允许使用现有远程存储库中的分支/标签创建一个新应用程序,我不知道如何通过 rhc create 使用。

相关的命令行选项--from-code URL适用于默认存储库路径,但如何判断要使用哪个特定分支?我在 OpenShift 文档或任何其他 Web 资源中找不到任何内容。

我尝试了以下和其他一些变体,但没有成功:

rhc app create my_new_app_name python-3.3 postgresql-9.2 --from-code https://github.com/my_user/my_repository/tree/my_branch

rhc app create my_new_app_name python-3.3 postgresql-9.2 --from-code https://github.com/my_user/my_repository.git/my_branch

结果消息:

Source code repository could not be cloned: 'https://github.com/my_user/my_repository.git/my_branch'. Please verify the repository is correct and contact support.

我需要使用 rhc create 来创建新应用程序,因为这允许使用多个墨盒创建应用程序(此处为 python-3.3postgresql-9.2 ),这无法通过 Web 控制台实现。

你很接近。您可以通过执行以下操作从分支创建应用程序:

rhc app create my_new_app_name python-3.3 postgresql-9.2 --from-code https://github.com/my_user/my_repository#mybranch

最新更新