Permissions to read labels

6 views
Skip to first unread message

dnawarm

unread,
Jan 12, 2021, 12:32:17 PM1/12/21
to Jenkins Users

Hello all,

user requests to list available labels and list agents which have X CPUs and Y GB of RAM. We cannot grant him admin permissions. What jenkins privilege is required to list available labels and list agents with particular tech spec ?

Mark Waite

unread,
Jan 12, 2021, 1:38:51 PM1/12/21
to Jenkins Users
I believe that if you assign the labels as an administrator, then any job that runs is allowed to query the existing labels.

The platformlabeler-plugin automatically assigns operating system labels (like 'amd64-freebsd-12.2-RELEASE-p2', 'amd64-windows-10.0', 'aarch64-Amazon-2', and 's390x-Ubuntu-18.04').  There is an enhancement request to extend the platformlabeler plugin to automatically add more system specific labels (see https://issues.jenkins.io/browse/JENKINS-60903).

If you're interested in contributing to that plugin, others might find it helpful to have more automatically generated labels with system information like memory amount and processor count.

The implied labels plugin allows the administrator to generate new labels based on expressions related to existing labels.  I find the combination of platformlabeler and implied labels to be helpful so that I can present simple labels (like 'FreeBSD-12') while still retaining the full details generated by the platformlabeler plugin.

Mark Waite

On Tue, Jan 12, 2021 at 10:32 AM dnawarm <pb5...@gmail.com> wrote:

Hello all,

user requests to list available labels and list agents which have X CPUs and Y GB of RAM. We cannot grant him admin permissions. What jenkins privilege is required to list available labels and list agents with particular tech spec ?

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3da9d430-f1f5-43e6-bcae-a498de93c1afn%40googlegroups.com.

dnawarm

unread,
Jan 12, 2021, 6:39:25 PM1/12/21
to Jenkins Users
Hi Mark,

you said "any job that runs is allowed to query the existing labels". Do you mean jenkins job or an ordinary user ?
The user wants to add existing label to his jenkinsfile but he needs to know what labels are available. Of course we can tell him but the point is to let them do as much as possible by themselves.

Mark Waite

unread,
Jan 12, 2021, 7:45:22 PM1/12/21
to Jenkins Users
On Tue, Jan 12, 2021 at 4:39 PM dnawarm <pb5...@gmail.com> wrote:
Hi Mark,

you said "any job that runs is allowed to query the existing labels". Do you mean jenkins job or an ordinary user ?
The user wants to add existing label to his jenkinsfile but he needs to know what labels are available. Of course we can tell him but the point is to let them do as much as possible by themselves.


Both.  I can see the labels "s390x", "java", and "s390xdocker" on https://ci.jenkins.io/computer/s390x-agent/ without logging in.  I can use that label in a Jenkinsfile run on ci.jenkins.io and it will be honored.

Mark Waite
 
On Tuesday, January 12, 2021 at 6:38:51 PM UTC Mark Waite wrote:
I believe that if you assign the labels as an administrator, then any job that runs is allowed to query the existing labels.

The platformlabeler-plugin automatically assigns operating system labels (like 'amd64-freebsd-12.2-RELEASE-p2', 'amd64-windows-10.0', 'aarch64-Amazon-2', and 's390x-Ubuntu-18.04').  There is an enhancement request to extend the platformlabeler plugin to automatically add more system specific labels (see https://issues.jenkins.io/browse/JENKINS-60903).

If you're interested in contributing to that plugin, others might find it helpful to have more automatically generated labels with system information like memory amount and processor count.

The implied labels plugin allows the administrator to generate new labels based on expressions related to existing labels.  I find the combination of platformlabeler and implied labels to be helpful so that I can present simple labels (like 'FreeBSD-12') while still retaining the full details generated by the platformlabeler plugin.

Mark Waite

On Tue, Jan 12, 2021 at 10:32 AM dnawarm <pb5...@gmail.com> wrote:

Hello all,

user requests to list available labels and list agents which have X CPUs and Y GB of RAM. We cannot grant him admin permissions. What jenkins privilege is required to list available labels and list agents with particular tech spec ?

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3da9d430-f1f5-43e6-bcae-a498de93c1afn%40googlegroups.com.

--
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 jenkinsci-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages