We have been using groovy script to read the build queue state:
def builder = new groovy.json.JsonBuilder()
builder {
queueItems(Jenkins.instance.queue.items.collect { obj ->
[
id: obj.id,
name: obj.task.name,
isStuck: obj.stuck,
isBlocked: obj.blocked,
isDisabled: obj.task.disabled,
inQueueSince: obj.inQueueSince,
why: obj.why,
causesDescription: obj.causesDescription,
queueItemUrl: obj.url,
taskUrl: obj.task.url
]
})
}
println builder.toPrettyString()
Then we add Azure AD plugin. It requires an account with the hudson.model.Hudson.Administer
permission to run a script.
We use a tech account, but the problem is that everyone can logon interactively using this login and became Jenkins admin.
Is it possible to have this account enabled, but restrict interactive logon to Jenkins?