To follow up from this... I noticed that the libraries where configured to use the "Legacy SCM" method in Jenkins global configuration. When set up I didn't realized that "Helix" is an alias for Perforce. So I have now tried changing to "Modern SCM" method, using "now" as the version (successfully identified by Jenkins). However I now get a different error when the implicit library is loaded:
Obtained Jenkinsfile from af39698113dd5a786c3f362f93c33eacb0b455ca
Running in Durability level: MAX_SURVIVABILITY
Loading library bgc2-jenkins@now
... p4 changes -m1 //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/.../.___ +
... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ +
P4: Unable to use Workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.
... p4 info +
... p4 client -o jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenki___ +
P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.
ERROR: P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Wildcards (*, %%%%x, ...) not allowed in 'jenkins-library.DistributedDevelopment.generic.jenkins.libs.bgc2-jenkins-1.0....'.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: Loading libraries failed
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:325)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
Again, the Jenkins extension library is held in Perforce – while the project being built is held in GIT. However I see the same error when building another project also hosted in Perforce. Configuration of the shared library is as follows:
- Name = bgc2-jenkins
- Default version = now (currently maps to revision 4171459)
- Load implicitly = true
- Allow default version to be overridden = true
- Include @Library changes in the job recent changes = true
- Retrieval method = Modern SCM:
- Helix Library
- Perforce Credentials = (same as used for source code)
- Character Set = none
- Library Depot Path = //DistributedDevelopment/generic/jenkins/libs/bgc2-jenkins-1.0/...
|