Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have a function to report disk usage and %age free as a message in a build log #246

Open
jstrachan opened this issue Jun 21, 2017 · 0 comments

Comments

@jstrachan
Copy link
Contributor

jstrachan commented Jun 21, 2017

right now its easy to run out of PV space for your /root/.mvnrepository/ directory.

So it'd be nice if we had a little function in the pipeline library that would find out the disk space and %age free and log it to the build log (maybe with a nice big WARNING if its, say, less than 20% free).

We could then include this function call into the standard pipellines / functions. e.g. for all java projects we should check the disk before we start and after a release? Maybe at the end of the pipeline too (in case integration tests clog things up too much).

So maybe the function looks like...

// in the pipeline library...
def checkDiskUsage(operation, folderName, folderPath) { ... }

// in the jenkinsfile or pipeline library functions....
checkDiskUsage("Starting release", "maven repo", "/root/.mvnrepository")
....
checkDiskUsage("Completed release", "maven repo", "/root/.mvnrepository")
...
checkDiskUsage("Finished pipeline", "maven repo", "/root/.mvnrepository")

We may want to output this data into Elasticsearch / Prometheus too; including more metadata like the namespace / job name / build number too etc?

Then we can start doing tools to visualise the users disk over time and so forth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant