Discussion:
Run script before build is deleted?
James Green
2018-10-11 16:35:20 UTC
Permalink
Is this possible?

What I would like to do: examine the build and discover if there are any
docker images. If there are, delete them from the registry first.

Is this feasible?

Thanks,

James
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jan Monterrubio
2018-10-11 16:58:16 UTC
Permalink
As a post build script, probably.
Post by James Green
Is this possible?
What I would like to do: examine the build and discover if there are any
docker images. If there are, delete them from the registry first.
Is this feasible?
Thanks,
James
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
James Green
2018-10-12 14:38:44 UTC
Permalink
How so? I need this to run as the build gets expired but as it completes.
Post by Jan Monterrubio
As a post build script, probably.
Post by James Green
Is this possible?
What I would like to do: examine the build and discover if there are any
docker images. If there are, delete them from the registry first.
Is this feasible?
Thanks,
James
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jan Monterrubio
2018-10-13 14:36:24 UTC
Permalink
Would the Post Build actions (execute shell) not execute in the right spot?

https://www.oreilly.com/library/view/jenkins-the-definitive/9781449311155/ch05s07.html
Post by James Green
How so? I need this to run as the build gets expired but as it completes.
Post by Jan Monterrubio
As a post build script, probably.
Post by James Green
Is this possible?
What I would like to do: examine the build and discover if there are any
docker images. If there are, delete them from the registry first.
Is this feasible?
Thanks,
James
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
Post by Jan Monterrubio
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JQuDoNxcbxCj4bAEJrnuRDUC_k6BM%3DunV2L2_0BT_hOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Slide
2018-10-13 15:32:03 UTC
Permalink
I think James is looking for something that allows him to run a script or
something before a build is deleted from Jenkins, NOT during a build run.
It would have to be something based on Run listener [1]. I am not aware of
anything off the top of my head, but you could search the jenkinsci org on
GitHub for RunListener and see if anything implements onDeleted.

1 - https://javadoc.jenkins-ci.org/hudson/model/listeners/RunListener.html
Post by Jan Monterrubio
Would the Post Build actions (execute shell) not execute in the right spot?
https://www.oreilly.com/library/view/jenkins-the-definitive/9781449311155/ch05s07.html
Post by James Green
How so? I need this to run as the build gets expired but as it completes.
Post by Jan Monterrubio
As a post build script, probably.
Post by James Green
Is this possible?
What I would like to do: examine the build and discover if there are
any docker images. If there are, delete them from the registry first.
Is this feasible?
Thanks,
James
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
Post by Jan Monterrubio
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JQuDoNxcbxCj4bAEJrnuRDUC_k6BM%3DunV2L2_0BT_hOA%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JQuDoNxcbxCj4bAEJrnuRDUC_k6BM%3DunV2L2_0BT_hOA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVe5dRdtJRgjWPb8_8hLB4SzHU6Gd9NzEaDrtH0iPfF7BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
James Green
2018-10-24 07:51:23 UTC
Permalink
I filed this as https://issues.jenkins-ci.org/browse/JENKINS-54164
Post by Slide
I think James is looking for something that allows him to run a script or
something before a build is deleted from Jenkins, NOT during a build run.
It would have to be something based on Run listener [1]. I am not aware of
anything off the top of my head, but you could search the jenkinsci org on
GitHub for RunListener and see if anything implements onDeleted.
1 - https://javadoc.jenkins-ci.org/hudson/model/listeners/RunListener.html
Post by Jan Monterrubio
Would the Post Build actions (execute shell) not execute in the right spot?
https://www.oreilly.com/library/view/jenkins-the-definitive/9781449311155/ch05s07.html
Post by James Green
How so? I need this to run as the build gets expired but as it completes.
Post by Jan Monterrubio
As a post build script, probably.
Post by James Green
Is this possible?
What I would like to do: examine the build and discover if there are
any docker images. If there are, delete them from the registry first.
Is this feasible?
Thanks,
James
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bazo%2Bk16XFda7qxzrcfeZvh0_4iKqFK8vK3bLfapN1eszQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
Post by Jan Monterrubio
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9%2BS2dT1YfUzo%2Bsd%2BPg%2BS9yCDJHXvGUR19CK3ciSHDq-HA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BawDi3Ynfc5Fw0tk50JFqown0MU6v%3DurKczUC1FAwGZcWg%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JQuDoNxcbxCj4bAEJrnuRDUC_k6BM%3DunV2L2_0BT_hOA%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JQuDoNxcbxCj4bAEJrnuRDUC_k6BM%3DunV2L2_0BT_hOA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVe5dRdtJRgjWPb8_8hLB4SzHU6Gd9NzEaDrtH0iPfF7BQ%40mail.gmail.com
<https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVe5dRdtJRgjWPb8_8hLB4SzHU6Gd9NzEaDrtH0iPfF7BQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2BaxDsj5y-cYiNuezNkLKtd%3DWef_h9WbcpZ9zRFLH331iwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...