TeamCity Linux Properties
Linux Properties is a TeamCity plugin that provides additional configuration parameters to identify a Linux distribution that a build agent is running on.
Installation
-
Download the plugin file from https://github.com/rodm/teamcity-linux-properties-plugin/releases/latest (see Downloads section at the bottom of the page).
-
Go to the Plugins List page of your TeamCity installation and click on the link Upload plugin zip to install the downloaded plugin file.
-
Restart TeamCity.
Using the plugin
The plugin provides the following additional build agent configuration parameters that can be used when defining
Agent Requirements. The parameters are populated using the values taken from the /etc/os-release
file.
-
linux.os.name - The name of the Linux distribution taken from the NAME variable
-
linux.os.version - The version of the Linux distribution taken from the
VERSION
orVERSION_ID
variable -
linux.os.description - The full name of the Linux distribution taken from the
PRETTY_NAME
variable
For CentOS and RedHat Linux the values are extracted from the /etc/centos-release
and /etc/redhat-release
files.
How to build the plugin
The build uses Gradle, the following tasks can be used to build the plugin and deploy it to a local TeamCity Server for testing.
Build the plugin
./gradlew build
The plugin is packaged into a zip file and found in the following directory build/distributions/
Start the TeamCity Server
./gradlew startTeamcity2018.1Server
Start the Build Agent
./gradlew startTeamcity2018.1Agent
Stop the TeamCity Server
./gradlew stopTeamcity2018.1Server
Stop the Build Agent
./gradlew stopTeamcity2018.1Agent
Compatibility
The plugin is compatible with TeamCity 2018.1 and later.
License
This plugin is available under the Apache License, Version 2.0.