0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-22 00:00:40 +00:00

fix: only set max-concurrent-uploads if defined (#21)

This commit is contained in:
Robert Kaussow 2023-09-05 08:59:38 +02:00 committed by GitHub
parent b419036322
commit 742af367bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 7 deletions

View File

@ -7,7 +7,7 @@ when:
steps: steps:
dryrun: dryrun:
image: quay.io/thegeeklab/wp-docker-buildx:1 image: quay.io/thegeeklab/wp-docker-buildx:1.0.2
settings: settings:
containerfile: Containerfile.multiarch containerfile: Containerfile.multiarch
dry_run: true dry_run: true
@ -21,7 +21,7 @@ steps:
publish-dockerhub: publish-dockerhub:
group: container group: container
image: quay.io/thegeeklab/wp-docker-buildx:1 image: quay.io/thegeeklab/wp-docker-buildx:1.0.2
settings: settings:
auto_tag: true auto_tag: true
containerfile: Containerfile.multiarch containerfile: Containerfile.multiarch
@ -42,7 +42,7 @@ steps:
publish-quay: publish-quay:
group: container group: container
image: quay.io/thegeeklab/wp-docker-buildx:1 image: quay.io/thegeeklab/wp-docker-buildx:1.0.2
settings: settings:
auto_tag: true auto_tag: true
containerfile: Containerfile.multiarch containerfile: Containerfile.multiarch

View File

@ -95,7 +95,6 @@ properties:
By default the Docker daemon will push five layers of an image at a time. If you are on a low bandwidth connection this may cause By default the Docker daemon will push five layers of an image at a time. If you are on a low bandwidth connection this may cause
timeout issues and you may want to lower with this option. timeout issues and you may want to lower with this option.
type: string type: string
defaultValue: 5
required: false required: false
- name: containerfile - name: containerfile

View File

@ -125,8 +125,8 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
&cli.StringFlag{ &cli.StringFlag{
Name: "containerfile", Name: "containerfile",
EnvVars: []string{"PLUGIN_CONTAINERFILE"}, EnvVars: []string{"PLUGIN_CONTAINERFILE"},
Usage: "max concurrent uploads", Usage: "containerfile to use for the image build",
Value: "5", Value: "Containerfile",
Destination: &settings.Build.Containerfile, Destination: &settings.Build.Containerfile,
Category: category, Category: category,
}, },

View File

@ -214,7 +214,6 @@ func hasProxyBuildArg(build *Build, key string) bool {
func commandDaemon(daemon Daemon) *execabs.Cmd { func commandDaemon(daemon Daemon) *execabs.Cmd {
args := []string{ args := []string{
"--data-root", daemon.StoragePath, "--data-root", daemon.StoragePath,
"--max-concurrent-uploads", daemon.MaxConcurrentUploads,
"--host=unix:///var/run/docker.sock", "--host=unix:///var/run/docker.sock",
} }
@ -254,6 +253,10 @@ func commandDaemon(daemon Daemon) *execabs.Cmd {
args = append(args, "--experimental") args = append(args, "--experimental")
} }
if daemon.MaxConcurrentUploads != "" {
args = append(args, "--max-concurrent-uploads", daemon.MaxConcurrentUploads)
}
return execabs.Command(dockerdBin, args...) return execabs.Command(dockerdBin, args...)
} }