sudo dnf install java-21-openjdk java-21-openjdk-devel
On the Jenkins server
ssh-keygen -t ed25519 -C "your_email@example.com" -f <key-name>
ssh-copy-id -i <key-name>.pub user@jenkins_agent_remote_host
eval $(ssh-agent)
ssh-add <key-name>
Examples:
- Add ~/.ssh/id_rsa as a Jenkins credential:
./jenkinsTools/JenkinsTools/AddSshKeyCredential.py \
--url http://localhost:8080 \
--jenkins-user admin \
--jenkins-token API_TOKEN \
--credential-id linux-agent-key \
--ssh-user jenkins \
--private-key ~/.ssh/id_rsa
- Add an encrypted SSH key:
./jenkinsTools/JenkinsTools/AddSshKeyCredential.py \
--url http://jenkins:8080 \
--jenkins-user admin \
--jenkins-token API_TOKEN \
--credential-id secure-key \
--ssh-user jenkins \
--private-key ~/.ssh/id_rsa_secure \
--key-passphrase "mySecretPassphrase"sudo dnf install openssh-server
sudo systemctl enable ssh
sudo systemctl restart ssh
vim /etc/sudoers.d/<username>
File should look like:
<username> ALL=(ALL) NOPASSWD:/usr/bin/py.test
Any packages that are installed with pip on Linux, should also be installed on the system.
For Redhat, Rocky and Alma linux, do the following for this project:
sudo dnf install python3-pytest
sudo dnf install python3-virtualenv
sudo dnf install python3-pip