Skip to content

Known issues and their solution

MrBr-github edited this page Jul 27, 2022 · 3 revisions

Could not find any definition of libraries

Error

ERROR: Could not find any definition of libraries [github.com/Mellanox/ci-demo@master]
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed

Root cause

GitHub Groovy Libraries plugin is missing

It's required to load the ci-demo as shared library. See comments in this file

Solution

Alternative 1

Install GitHub Groovy Libraries plugin

Alternative 2

Define ci-demo as a pipeline library Manage Jenkins -> Configure System -> Global Pipeline Libraries and change the Jenkinsfile from @Library('github.com/Mellanox/ci-demo@master') to @Library('ci-demo@master')

Scripts not permitted to use method hudson.model.Node getNumExecutors.

Error

Scripts not permitted to use method hudson.model.Node getNumExecutors. Administrators can decide whether to approve or reject this signature.
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method hudson.model.Node getNumExecutors

Root Cause

Jenkins sandbox limits script execution due to security reasons

Solution

Go to Manage Jenkins -> In-process Script Approval

Approve the hudson.model.Node getNumExecutors script