How should pipeline/jenkinsfile syntax look to be triggered by parameterized trigger via curl for example?
I'm having the pipeline that starts with:
pipeline{
parameters {
string(name: 'mycommitid', defaultValue: 'nocommit', description: 'my parameterized build')
}
properties([
parameters([
string(defaultValue: 'nocommit', description: 'fas', name: 'mycommitid')
])
])
node{...}
}
By setting this in the code my pipeline won't be triggered, only if I set it manually in build triggers section in jenkins. But the goal is to use it in the multibranch pipelines and jenkinsfiles.
The output I'm getting is (the hash here is some random number i typed as example):
git rev-parse 4364576456fgds467734ss344c^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE
And having the commit passed, how do you advise should I build only that single revision?