I'm trying the "Bitbucket Team/Project" (which uses the "multibranch Pipeline").
Using "jenkinsci/blueocean:latest" docker image.
When i create a new ""Bitbucket Team/Project"" item, the BB project is
scanned, project is added and repo too. Repo that have a
"/Jenkinsfile" are picked up and built, everything seems to work as
expected.
Now when i go to one of the generated "multibranch pipeline" job, and
click the "View configuration" (no "Configure" accessible), I land on
a page that allows me to edit the job, but I get a Jenkins screenshot
showing "admin is missing Job/Configure permission" in between
"repository name" and "Behaviors" on the
https://jenkins-url/job/job-name/configure page.
When I manually create a custom multi-branch pipeline job with the
same bitbucket branch source, i do not see this message at all, and
there is nothing b/w "repository name" and "Behaviors".
Did I misconfigured something? The admin account is created suing a
pre-configure groovy hook:
-------------------------------------------------------------
def instance = Jenkins.getInstance()
def user = "admin"
def pass = "..."
def hudsonRealm = new HudsonPrivateSecurityRealm(false)
hudsonRealm.createAccount(user, pass)
instance.setSecurityRealm(hudsonRealm)
def strategy = new FullControlOnceLoggedInAuthorizationStrategy()
strategy.setAllowAnonymousRead(false)
instance.setAuthorizationStrategy(strategy)
instance.save()
-------------------------------------------------------------
Is it the cause of my problem?
Does anyone has example on how to use `RoleBasedAuthorizationStrategy`
from a groovy script?
I was stuck b/c I couldn't call the private `createAdminRole()` method
(and I'm an absolute noob with groovy and jenkins scripting)
Thanks,
Chris