jenkinsci / jenkinsci/docker-plugin

do not push agent's running docker container when the job failed

Open
#931 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
498
Forks
324
Avg merge
1d 2h
Merged PRs (30d)
2

Description

### What feature do you want to see added?

The docker plugin incorporates a great feature that I use to automatically commit the docker container that my jenkins job has started.

![image](https://user-images.githubusercontent.com/6780796/206657869-383a8d3d-7d9f-40c0-85f4-dd44410406c2.png)

However, sometimes my job may fail because I am getting some resources from the internet that may be unavailable at the time. When this happens, the incomplete image is still pushed to my docker registry. I am using this funtionality to build a fresh image daily that can be used as a base image for starting other builds. This image now ends up broken and has overwritten the working image from the day before.

The docker plugin configuration suggests that the push should only happen on a successful build but his does not seem to be the case

![image](https://user-images.githubusercontent.com/6780796/206658551-6f0d350e-bf96-4e08-8b47-6890fdea3c55.png)

I am not entirely sure if this is a bug or a feature request but it does seem like a valid issue to me

### Upstream changes

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.