forked from mantidproject/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
- name: Clean jenkins agents by removing workspaces. | ||
- name: Playbook to clean jenkins agents by removing workspaces. | ||
hosts: all | ||
|
||
# Tags available: pr, nightly, package, docs | ||
roles: | ||
- role: clean-agent | ||
become: yes | ||
tasks: | ||
- name: Remove PR directories | ||
community.docker.docker_container_exec: | ||
container: "{{ agent_name }}" | ||
command: bash -l -c "rm -rf pull_requests*" | ||
chdir: "/jenkins_workdir/workspace" | ||
become: yes | ||
tags: [never, pr] | ||
|
||
- name: Remove Nightly directories | ||
community.docker.docker_container_exec: | ||
container: "{{ agent_name }}" | ||
command: bash -l -c "rm -rf *_nightly_deployment*" | ||
chdir: "/jenkins_workdir/workspace" | ||
become: yes | ||
tags: [never, nightly] | ||
|
||
- name: Remove Packages from Branch directories | ||
community.docker.docker_container_exec: | ||
container: "{{ agent_name }}" | ||
command: bash -l -c "rm -rf build_packages_from_branch*" | ||
chdir: "/jenkins_workdir/workspace" | ||
become: yes | ||
tags: [never, package] | ||
|
||
- name: Remove Docs Build directories | ||
community.docker.docker_container_exec: | ||
container: "{{ agent_name }}" | ||
command: bash -l -c "rm -rf build_and_publish_docs*" | ||
chdir: "/jenkins_workdir/workspace" | ||
become: yes | ||
tags: [never, docs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
Linux/jenkins-node/ansible/roles/clean-agent/tasks/main.yml
This file was deleted.
Oops, something went wrong.