Bump Buildah to v1.36.0

Bump Buildah to v1.36.0.  This is the final dance step before
Podman v5.1

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
tomsweeneyredhat
2024-05-23 20:27:50 -04:00
parent e53b96cb25
commit f8cc1b4807
16 changed files with 195 additions and 39 deletions

View File

@ -9,7 +9,11 @@ go:
- "1.20"
before_install:
- sudo systemctl stop docker.service && sudo systemctl stop docker.socket
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- yes | sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update -q -y
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker pull busybox
- docker pull centos:7
- chmod -R go-w ./dockerclient/testdata

View File

@ -23,6 +23,7 @@ import (
"github.com/openshift/imagebuilder/signal"
"github.com/openshift/imagebuilder/strslice"
buildkitcommand "github.com/moby/buildkit/frontend/dockerfile/command"
buildkitparser "github.com/moby/buildkit/frontend/dockerfile/parser"
buildkitshell "github.com/moby/buildkit/frontend/dockerfile/shell"
)
@ -130,7 +131,7 @@ func label(b *Builder, args []string, attributes map[string]bool, flagArgs []str
return nil
}
func processHereDocs(originalInstruction string, heredocs []buildkitparser.Heredoc, args []string) ([]File, error) {
func processHereDocs(instruction, originalInstruction string, heredocs []buildkitparser.Heredoc, args []string) ([]File, error) {
var files []File
for _, heredoc := range heredocs {
var err error
@ -138,7 +139,7 @@ func processHereDocs(originalInstruction string, heredocs []buildkitparser.Hered
if heredoc.Chomp {
content = buildkitparser.ChompHeredocContent(content)
}
if heredoc.Expand {
if heredoc.Expand && !strings.EqualFold(instruction, buildkitcommand.Run) {
shlex := buildkitshell.NewLex('\\')
shlex.RawQuotes = true
shlex.RawEscapes = true
@ -202,7 +203,7 @@ func add(b *Builder, args []string, attributes map[string]bool, flagArgs []strin
return fmt.Errorf("ADD only supports the --chmod=<permissions>, --chown=<uid:gid>, and --checksum=<checksum> flags")
}
}
files, err := processHereDocs(original, heredocs, userArgs)
files, err := processHereDocs(buildkitcommand.Add, original, heredocs, userArgs)
if err != nil {
return err
}
@ -256,7 +257,7 @@ func dispatchCopy(b *Builder, args []string, attributes map[string]bool, flagArg
return fmt.Errorf("COPY only supports the --chmod=<permissions> --chown=<uid:gid> and the --from=<image|stage> flags")
}
}
files, err := processHereDocs(original, heredocs, userArgs)
files, err := processHereDocs(buildkitcommand.Copy, original, heredocs, userArgs)
if err != nil {
return err
}
@ -422,7 +423,7 @@ func run(b *Builder, args []string, attributes map[string]bool, flagArgs []strin
}
}
files, err := processHereDocs(original, heredocs, userArgs)
files, err := processHereDocs(buildkitcommand.Run, original, heredocs, userArgs)
if err != nil {
return err
}
@ -606,6 +607,7 @@ func healthcheck(b *Builder, args []string, attributes map[string]bool, flagArgs
flags := flag.NewFlagSet("", flag.ContinueOnError)
flags.String("start-period", "", "")
flags.String("start-interval", "", "")
flags.String("interval", "", "")
flags.String("timeout", "", "")
flRetries := flags.String("retries", "", "")
@ -642,6 +644,12 @@ func healthcheck(b *Builder, args []string, attributes map[string]bool, flagArgs
}
healthcheck.Interval = interval
startInterval, err := parseOptInterval(flags.Lookup("start-interval"))
if err != nil {
return err
}
healthcheck.StartInterval = startInterval
timeout, err := parseOptInterval(flags.Lookup("timeout"))
if err != nil {
return err

View File

@ -12,7 +12,7 @@
#
%global golang_version 1.19
%{!?version: %global version 1.2.7}
%{!?version: %global version 1.2.9}
%{!?release: %global release 1}
%global package_name imagebuilder
%global product_name Container Image Builder