After a googling and trying to use internal snippet generator for pipeline
script-configuration in Jenkins 2.7.4 I'm failed to obtain the code.
Instead of auth matrix with permissions declaratiuon and SCM poll scedule
it produces useless:
properties([<object of type hudson.security.AuthorizationMatrixProperty>,
pipelineTriggers([<object of type hudson.triggers.SCMTrigger>])])
*How should the code for auth matrix and SCM polling schedule looks like?*
Valid syntax is ( not SCMPoll method from documentation), but what the
second arg should I provide?
triggers {
scm(['* * * * *'])
}
Also I tried to use *triggers *and *scm('* * * * *') or/and SCMPoll* too,
but the documentation is speaking about an unexistent things for 2.7.4
(described SCMPoll is not implemnted and is not recognized by Jenkins,
occasionally I found supported scm method in error messages, but it should
have second argument, not documented at all everywhere) - *where actual
documentation
can be found!!!???*
Here is my Jenkins file:
pipeline {
parameters {
booleanParam(defaultValue: false, description: 'Be verbose with
output.', name: 'is_verbose')
}
options {
disableConcurrentBuilds()
}
triggers {
scm(['* * * * *'])
}
stages {
stage('Preparation') {
steps {
deleteDir()
dir ('conf') {
git url: 'git@gitrepo:conf/prj',
branch: '1.0.0',
credentialsId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
poll: false;
}
dir ('obj') {
git url: 'git@gitrepo:obj/prj',
branch: '1.0.0',
credentialsId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
poll: true;
}
}
}
stage('Build') {
steps {
echo "BUILD START"
}
}
}
}
P.S. It seems to be a bug. Internal methods to be called by the generator
are producing object's singnature instead of valuable expected string.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/d7131762-0943-40aa-9282-04d2dc845b23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.