[JIRA] (JENKINS-59566) Automatically label Scientific Linux agents

22 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 27, 2019, 1:20:02 PM9/27/19
to jenkinsc...@googlegroups.com
Mark Waite created an issue
 
Jenkins / Improvement JENKINS-59566
Automatically label Scientific Linux agents
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: platformlabeler-plugin
Created: 2019-09-27 17:19
Labels: hacktoberfest newbie-friendly
Priority: Minor Minor
Reporter: Mark Waite

Automatically label Red Hat Enterprise Linux agents with an easy to read label that includes the architecture, operating system name, and operating system version. Include a sample /etc/os-release file in the test suite and include the output of lsb_release -a in the test suite so that others can confirm the label operates as expected without installing their own copy of Red Hat Enterprise Linux.

Refer to pull request 98 for an example of the files to modify.

Refer to generate_lsb_release_output.sh. and generate_os_release_output.sh for instructions to create the data files used to test operating system version reporting.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 27, 2019, 1:21:03 PM9/27/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
Change By: Mark Waite
Automatically label Red Hat Enterprise Scientific Linux agents with an easy to read label that includes the architecture, operating system name, and operating system version.  Include a sample /etc/os-release file in the test suite and include the output of {{lsb_release -a}} in the test suite so that others can confirm the label operates as expected without installing their own copy of Red Hat Enterprise Scientific Linux.

Refer to [pull request 98|https://github.com/jenkinsci/platformlabeler-plugin/pull/98] for an example of the files to modify.

Refer to [generate_lsb_release_output.sh|https://github.com/jenkinsci/platformlabeler-plugin/blob/master/src/test/resources/org/jvnet/hudson/plugins/platformlabeler/generate_lsb_release_output.sh]. and [generate_os_release_output.sh|https://github.com/jenkinsci/platformlabeler-plugin/blob/master/src/test/resources/org/jvnet/hudson/plugins/platformlabeler/generate_os_release_output.sh] for instructions to create the data files used to test operating system version reporting.
  Refer to the docker image on [hub.docker.com|https://hub.docker.com/r/scientificlinux/sl/tags].

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 27, 2019, 1:29:02 PM9/27/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
Automatically label Scientific Linux agents with an easy to read label that includes the architecture, operating system name, and operating system version.  Include a sample /etc/os-release file in the test suite and include the output of {{lsb_release -a}} in the test suite so that others can confirm the label operates as expected without installing their own copy of Scientific Linux.


Refer to [pull request 98|https://github.com/jenkinsci/platformlabeler-plugin/pull/98] for an example of the files to modify.

mark.hayen@gmail.com (JIRA)

unread,
Oct 5, 2019, 5:24:02 AM10/5/19
to jenkinsc...@googlegroups.com
Mark Hayen assigned an issue to Mark Hayen
Change By: Mark Hayen
Assignee: Mark Hayen

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 5, 2019, 5:57:02 AM10/5/19
to jenkinsc...@googlegroups.com
Mark Waite commented on Improvement JENKINS-59566
 
Re: Automatically label Scientific Linux agents

Thanks Mark Hayen for taking this one! Let me know if you have questions or encounter surprises.

mark.hayen@gmail.com (JIRA)

unread,
Oct 5, 2019, 1:00:03 PM10/5/19
to jenkinsc...@googlegroups.com

Hi Mark

Getting the hang of it slowly but surely.

One question though, the Scientific Linux version 6.10 doesn't seem to have a /etc/os-release file.

How to proceed? Just not include the os-release test file?

 

Mark

 

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 5, 2019, 1:28:03 PM10/5/19
to jenkinsc...@googlegroups.com

Interesting. If it has an lsb_relase command available, I'd use that as the first point of reference. If the lsb_release command is not available or is commonly not installed, is there another file or command which can identify Scientific Linux?

mark.hayen@gmail.com (JIRA)

unread,
Oct 5, 2019, 1:32:03 PM10/5/19
to jenkinsc...@googlegroups.com

It does have the lsb_release command available

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 5, 2019, 1:38:03 PM10/5/19
to jenkinsc...@googlegroups.com

That's good. Capture the lsb_release output since that is the first preference for the labels that are assigned. If there is an alternate file or alternate output ( like uname -a ) that can be reliably used to detect Scientific Linux, you could consider adding that as a general check in the code. I've generally preferred to keep the checks simple (lsb_release first, /etc/os-release second, uname output, etc.)

mark.hayen@gmail.com (JIRA)

unread,
Oct 5, 2019, 7:06:03 PM10/5/19
to jenkinsc...@googlegroups.com

Hi,

I created a pull-request https://github.com/jenkinsci/platformlabeler-plugin/pull/101

Looking forward to hear your remarks and opinion on using redhat-release file

Mark

mark.hayen@gmail.com (JIRA)

unread,
Oct 6, 2019, 9:32:02 AM10/6/19
to jenkinsc...@googlegroups.com

Mark,

I've updated my pullrequest

 

Mark

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 7, 2019, 1:05:02 PM10/7/19
to jenkinsc...@googlegroups.com
Change By: Mark Waite
Status: Open Fixed but Unreleased
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 7, 2019, 2:13:03 PM10/7/19
to jenkinsc...@googlegroups.com
 

Included in platformlabeler release 3.5 Oct 7, 2019

Change By: Mark Waite
Status: Fixed but Unreleased Closed
Reply all
Reply to author
Forward
0 new messages