我已经安装了Openshift 3.9。
我为cicd演示开发了php管道。当我尝试使用可用的openshift图像cakephp-mysql-persistent绑定应用程序时。
stage('Build Image') {
openshift.withCluster() {
openshift.withProject(env.DEV_PROJECT) {
openshift.newBuild("--name=php", "--image-stream=cakephp-mysql-persistent:latest", "--binary=true")
}}}
失败,并显示错误消息
ERROR: new-build returned an error;
{reference={}, err=error: unable to locate any images in image streams with name "cakephp-mysql-persistent:latest"
The 'oc new-build' command will match arguments to the following types:
1. Images tagged into image streams in the current project or the 'openshift' project
- if you don't specify a tag, we'll add ':latest'
2. Images in the Docker Hub, on remote registries, or on the local Docker engine
3. Git repository URLs or local paths that point to Git repositories
--allow-missing-images can be used to force the use of an image that was not matched
See 'oc new-build -h' for examples., verb=new-build, cmd=oc --server=https://172.30.0.1:443 --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --namespace=${DEV_PROJECT} --token=XXXXX new-build --name=php --image-stream=cakephp-mysql-persistent:latest --binary=true -o=name , out=, status=1}
Finished: FAILURE
事实上,我无法拉出openshift控制台中可用的任何openshift图像。但是当我尝试使用--image-stream = php:latest时,它可以工作。 谁能让我知道我在想什么?