Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pipelineJob("Disk Housekeeping") {
description()
keepDependencies(false)
definition {
cpsScm {
"""pipeline {
// agent section specifies where the entire Pipeline will execute in the Jenkins environment
agent { label 'dev' }
triggers {
cron('TZ=America/New_York' + "\\n" + 'H H * * 6')
}
stages {
stage('Docker Prune') {
steps {
sh \"\"\"
#!/usr/bin/env bash
docker system prune -af
\"\"\"
}
}
}
}"""
}
}
disabled(false)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment