Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cailafinn committed Jan 14, 2025
1 parent 7dc3e11 commit 88b4e6c
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions Linux/jenkins-node/ansible/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,27 @@ ansible-playbook -i inventory.txt jenkins-agent-staging.yml -u FedID -K -t agent

## Cleaning nodes

Before cleaning any nodes mark them temporarily offline on Jenkins and ensure no jobs are running on them before cleaning.
- Before cleaning any nodes mark them temporarily offline on Jenkins and ensure no jobs are running on them before cleaning.

The easiest way to clean nodes is using a groovy script on Jenkins. Use the links below for guidance
- [`Remove directories across multiple nodes`](https://developer.mantidproject.org/JenkinsConfiguration.html#remove-directories-across-multiple-nodes)
- [`Remove directories from single node`](https://developer.mantidproject.org/JenkinsConfiguration.html#remove-directories-from-single-node)
- Update the `inventory.txt` file as above, including only the nodes you need to clean.

If this does not work you may need to spin up a new docker container. Use the instructions for Changing docker image below.
- The tasks in the cleaning role are defined by tags:

- `pr`: Pull Requests.
- `nightly`: Nightly deployments for main and release next.
- `package`: Build Packages from Branch
- `docs`: Docs build and publish.

- Run the following with the desired tags, uses a comma-separated list. **If no tags are provided all workspaces will be deleted.**:
```sh
ansible-playbook -i inventory.txt clean-jenkins-agents.yml -u FedID -K -t pr,nightly,package,docs
```

- Mark the shutdown nodes back online.

### Troubleshooting

- If this does not work you may need to spin up a new docker container. Use the instructions for Changing docker image below.

## Changing docker image

Expand Down

0 comments on commit 88b4e6c

Please sign in to comment.