Hello,
I am getting the below error when trying to use the pipelineTriggers property “$class: ‘RemoteBuildTrigger’” in the scripted pipeline job in the following code.
I am using [Jenkins 2.346.2].
Can someone please help me to resolve this error?
timestamps {
node() {
properties([
pipelineTriggers([
[$class: 'RemoteBuildTrigger', remoteBuildToken: 'XXXXX']
]),
disableConcurrentBuilds(),
[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: true],
parameters([
string(
defaultValue: '',
description: '',
name: 'Repo URL'
)
])
])
stage('Prepare') {
echo "Prepare stage"
}
}
}
Error:
java.lang.UnsupportedOperationException: no known implementation of class hudson.triggers.Trigger is named RemoteBuildTrigger
at org.jenkinsci.plugins.structs.describable.DescribableModel.resolveClass(DescribableModel.java:549)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:473)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerceList(DescribableModel.java:585)
at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:458)
at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:409)
at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:329)
Caused: java.lang.IllegalArgumentException: Could not instantiate {triggers=[{$class=RemoteBuildTrigger, remoteBuildToken=XXXXX}]} for org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty