Skip to content

Commit

Permalink
Merge pull request #22967 from rhatdan/build
Browse files Browse the repository at this point in the history
Remove references to --pull=true and --pull=false
  • Loading branch information
openshift-merge-bot[bot] authored Jun 21, 2024
2 parents 794c139 + 6409177 commit 42a01c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/podman/common/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func DefineBuildFlags(cmd *cobra.Command, buildOpts *BuildFlagsWrapper, isFarmBu
if err := flag.Value.Set("missing"); err != nil {
logrus.Errorf("Unable to set --pull to 'missing': %v", err)
}
flag.Usage = `Pull image policy ("always/true"|"missing"|"never/false"|"newer")`
flag.Usage = `Pull image policy ("always"|"missing"|"never"|"newer")`
flags.AddFlagSet(&budFlags)

// Add the completion functions
Expand Down
6 changes: 3 additions & 3 deletions docs/source/markdown/options/pull.image.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
####> are applicable to all of those.
#### **--pull**=*policy*

Pull image policy. The default is **always**.
Pull image policy. The default is **missing**.

- **always**, **true**: Always pull the image and throw an error if the pull fails.
- **always**: Always pull the image and throw an error if the pull fails.
- **missing**: 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.
- **never**, **false**: Never pull the image but use the one from the local containers storage. Throw an error when no image is found.
- **never**: Never pull the image but use the one from the local containers storage. Throw an error when no image is found.
- **newer**: 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.
2 changes: 0 additions & 2 deletions docs/source/markdown/podman-build.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ the help of emulation provided by packages like `qemu-user-static`.

@@option pull.image

Pull image policy. The default is **missing**.

@@option quiet

@@option retry
Expand Down
5 changes: 5 additions & 0 deletions test/system/070-build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1169,4 +1169,9 @@ function teardown() {
basic_teardown
}

@test "podman build --help defaults" {
run_podman build --help
assert "$output" =~ "--pull.*(default \"missing\")" "pull should default to missing"
}

# vim: filetype=sh

0 comments on commit 42a01c0

Please sign in to comment.