Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from lgranie/lgranie/issue95
Lgranie/issue95
- Loading branch information
Showing
10 changed files
with
87 additions
and
127 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
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
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
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
48 changes: 48 additions & 0 deletions
48
src/main/java/nl/lexemmens/podman/enumeration/PullPolicy.java
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package nl.lexemmens.podman.enumeration; | ||
|
||
/** | ||
* Defines the pullpolicy of the built image's manifest and configuration data. Recognised values include oci and docker. | ||
* @see <a href="www.mankier.com/1/podman-build">Manual of podman build</a> | ||
*/ | ||
public enum PullPolicy { | ||
|
||
/** | ||
* Always pull the image and throw an error if the pull fails. | ||
*/ | ||
ALWAYS("always"), | ||
TRUE("true"), | ||
|
||
/** | ||
* Only pull the image when it does not exist in the local containers storage. Throw an error if no image is found and the pull fails. | ||
*/ | ||
MISSING("missing"), | ||
|
||
/** | ||
* Never pull the image but use the one from the local containers storage. Throw an error when no image is found. | ||
*/ | ||
NEVER("never"), | ||
FALSE("false"), | ||
|
||
/** | ||
* Pull if the image on the registry is newer than the one in the local containers storage. An image is considered to be newer when the digests are different. Comparing the time stamps is prone to errors. Pull errors are suppressed if a local image was found. | ||
*/ | ||
NEWER("newer"); | ||
|
||
private final String value; | ||
|
||
/** | ||
* Constructor | ||
* @param pullPolicy The pullpolicy to set | ||
*/ | ||
PullPolicy(String value) { | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* Returns the selected pullpolicy | ||
* @return the selected pullpolicy | ||
*/ | ||
public String getValue() { | ||
return value; | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.