We build the custom image for agents and you can find Packer and Ansible files in pmm-infra repo.
You can use the following tags for agents:
agent-amd64-ol9
- short-lived agent based on Oracle Linux 9. After completing one task, the agent dies and a new one is startedagent-arm64-ol9
- the same as previous but arm64 archcli
- long-lived agents for tasks that do not require interaction with the file system. For example: run awc-cli command. These agents used ARM64 arch and read-only filesystem.
We have runPython helper and if you want to use it:
- Create your Python script in resources directory.
- Use
runPython('your_script_name')
orrunPython('your_script_name', 'your_scripts_args')
.
- All pipelines should be stored in this repository.
- If your bash code is longer than 10 lines it maybe worth using Python.
- Make sure the pipeline has an
options
block defining the number of pipeline builds Jenkins should keep, which will prevent from disk memory exhaustion. Example:
pipeline {
...
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
}
...
}
- The pipelines running on long-lived agents should also clean up the working directory either on start or during the
post always
stage:
pipeline {
...
post {
always {
...
deleteDir()
}
}
}