build - OpenShift:构建失败,“输出参考无效”
问题描述
我正在使用以下 YAML 创建构建配置。然后,我使用oc
. 因此,运行以下命令。
oc create -f mybuildconfig.yaml
oc start-build bc/ns-bc-myproject --wait
构建配置 YAML:
apiVersion: v1
kind: BuildConfig
metadata:
labels:
build: myproject
name: ns-bc-myproject
namespace: ns
spec:
output:
to:
kind: ImageStreamTag
name: 'ns-is-myproject:latest'
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: dev_1.0
uri: 'https://github.com/ns/myproject.git'
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: 'nodejs:10'
namespace: openshift
type: Source
successfulBuildsHistoryLimit: 5
构建永远不会通过;它一直失败,消息为无效的输出参考。什么不见了?
解决方案
您需要在构建配置将图像推送到的命名空间中创建一个图像流。
像这样的东西会为你工作:
- apiVersion: v1
kind: ImageStream
metadata:
labels:
application: ns-is-myproject
name: ns-is-myproject
namespace: ns-is-myproject
推荐阅读
- php - 我在将下拉值插入数据库时遇到问题
- javascript - 在函数中使用 id 时替代 eval
- c++ - 欧拉计划:找出 1000 位数字中乘积最大的 13 个相邻数字
- typescript - 使用自己的 Monad 时 Ramda 链的打字稿类型
- javascript - React 输入会在第一次单击时保存输入,然后在第二次单击时将其显示在 UI 中……为什么?!!!以及如何解决它
- leaflet - 如何从自定义 OSM 切片服务器中提取切片?我的 URL 字符串似乎不起作用
- python - 返回每个组和组内每个零的 1 前 0 的计数
- ruby-on-rails - 捆绑更新和安装在 Rails 5 上永远挂起
- sql - 在postgresql中选择前缀由点分隔的值
- servlets - 嵌入 Guice 和 Jetty 的 Servlet