Cant build on openshift jenkins

2019-09-21 02:31发布

问题:

I am getting following exception when I try to build project on openshift jenkins

Apr 03, 2013 12:08:27 PM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Provisioning new node for workload = 2 and label = null
Apr 03, 2013 12:08:27 PM hudson.plugins.openshift.OpenShiftCloud provision
INFO: Cancelling build - Label is null
Apr 03, 2013 12:08:27 PM hudson.plugins.openshift.OpenShiftCloud cancelBuild
INFO: Cancelling build
Apr 03, 2013 12:08:27 PM hudson.plugins.openshift.OpenShiftCloud cancelItem
INFO: Cancelling Item 
Apr 03, 2013 12:08:27 PM hudson.plugins.openshift.OpenShiftCloud cancelItem
WARNING: Build null rawbldr has been canceled
Apr 03, 2013 12:08:27 PM hudson.triggers.SafeTimerTask run
SEVERE: Timer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@6d7414 failed
java.lang.UnsupportedOperationException: No Label
    at hudson.plugins.openshift.OpenShiftCloud.provision(OpenShiftCloud.java:391)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:227)
    at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:51)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:308)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

回答1:

We are in midst of upgrade, that may be the cause here. Please try again after the upgrade is done. For up-to-date status check here: https://openshift.redhat.com/app/status



回答2:

Issue was I have to "Restrict where this project can be run" and specify label (Earlier it worked without it..may be something else..)



回答3:

If you want to build something on openshift jenkins it need to be connected with jenkins job workspace (you produce it when enabling in your openshift application by using Enable Jenkins builds option). Then to automatically created jenkins job option Restrict where this project can be run is added and there is placed reference to workspace.

Usually name looks like: {project_name}_build