-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring the Jenkins Controller's Node default configurations
Inform the Jenkins administrator to ensure that the necessary environment variables and paths are set up correctly on the Jenkins agent nodes. This can be done by configuring the environment directly in the Jenkins agent configuration or by using a global environment script that is sourced by the Jenkins agent.
-
Go to Jenkins Web Interface:
- Open the Jenkins web interface.
-
Navigate to the Node Configuration:
- Go to
Manage Jenkins
>Manage Nodes and Clouds
. - Select the node you want to configure.
- Go to
-
Configure Node Properties:
- Click on
Configure
for the selected node. - In the
Node Properties
section, check theEnvironment Variables
option. - Add the necessary environment variables, such as
MODULE_GWSETUP_PATH
.
- Click on
-
Create a Global Environment Script:
- Create a script that sets up the necessary environment variables and paths. For example, create a script named
setup_environment.sh
:#!/bin/bash export MODULE_GWSETUP_PATH="$HOMEgfs/modulefiles" module use "${MODULE_GWSETUP_PATH}" module load "module_gwsetup.gaea"
- Create a script that sets up the necessary environment variables and paths. For example, create a script named
-
Ensure the Script is Sourced by Jenkins Agent:
- Inform the Jenkins administrator to source this script in the shell initialization files (e.g.,
.bashrc
,.bash_profile
, or.profile
) on the Jenkins agent nodes. For example, add the following line to.bashrc
:source /path/to/setup_environment.sh
- Inform the Jenkins administrator to source this script in the shell initialization files (e.g.,
-
Go to Jenkins Web Interface:
- Open the Jenkins web interface.
-
Navigate to Global Tool Configuration:
- Go to
Manage Jenkins
>Global Tool Configuration
.
- Go to
-
Add a Custom Tool:
- Add a custom tool that sets up the necessary environment. For example, you can add a custom tool named
ModuleSetup
and specify the installation script or command to set up the environment.
- Add a custom tool that sets up the necessary environment. For example, you can add a custom tool named
You can inform the Jenkins administrator by providing clear instructions on what needs to be done. Here is an example message you can send:
Subject: Environment Setup for Jenkins Agent Nodes
Hi [Jenkins Administrator],
To ensure that the Jenkins agent nodes have access to the necessary utilities for our CI pipeline, please set up the following environment variables and paths on the agent nodes:
-
Environment Variables:
-
MODULE_GWSETUP_PATH
: Set this variable to the path where themodule_gwsetup
utility is located.
-
-
Module Setup:
- Ensure that the
module_gwsetup
utility is loaded in the environment. You can do this by adding the following lines to the shell initialization files (e.g.,.bashrc
,.bash_profile
, or.profile
) on the agent nodes:export MODULE_GWSETUP_PATH="/path/to/module_gwsetup" module use "${MODULE_GWSETUP_PATH}" module load "module_gwsetup.gaea"
- Ensure that the
Alternatively, you can create a global environment script and source it in the shell initialization files. Here is an example script (setup_environment.sh
):
#!/bin/bash
export MODULE_GWSETUP_PATH="/path/to/module_gwsetup"
module use "${MODULE_GWSETUP_PATH}"
module load "module_gwsetup.gaea"
Please ensure that this script is sourced in the shell initialization files:
source /path/to/setup_environment.sh
Thank you for your assistance.
Best regards,
[Your Name]
By following these methods, you can ensure that the necessary environment is set up on the Jenkins agent nodes without relying on the launch_java_agent.sh
script.