问题描述
我的目标是从git(但仅从特定分支)构建容器映像。为此,我必须在build.yaml
中指定git分支的uri:
spec:
output:
to:
kind: imagestreamTag
name: superset-custom-exporter:latest
source:
git:
uri: https://gitlab.cee.domain.com/repo-org/repo-name.git
type: Git
这将获取master分支,但是,我想要superset-custom-exporter
分支。我该怎么办?
我尝试通过网络和通过命令git clone
测试某些URL [1],所有这些都失败了。
解决方法
您可以使用ref
属性来指定分支名称(或任何其他提交名称):
source:
git:
uri: https://gitlab.cee.domain.com/repo-org/repo-name.git
ref: superset-custom-exporter
type: Git