Skip to content

Files

Latest commit

 

History

History

pmm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PMM Jenkins Guide

Important directories in repo

Agents

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 started
  • agent-arm64-ol9 - the same as previous but arm64 arch
  • cli - 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.

Tips

You can run Python scripts as part of pipeline

We have runPython helper and if you want to use it:

  1. Create your Python script in resources directory.
  2. Use runPython('your_script_name') or runPython('your_script_name', 'your_scripts_args').

The Zen of Jenkinsfile

  1. All pipelines should be stored in this repository.
  2. If your bash code is longer than 10 lines it maybe worth using Python.
  3. 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'))
  }
  ...
}
  1. 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()
    }
  }
}