diff --git a/.gitignore b/.gitignore index c5e9d24..afd7d10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /release/ +/vendor/ plugin-docker-buildx diff --git a/.woodpecker/main.yml b/.woodpecker.yml similarity index 80% rename from .woodpecker/main.yml rename to .woodpecker.yml index f83ed32..6afccf2 100644 --- a/.woodpecker/main.yml +++ b/.woodpecker.yml @@ -2,9 +2,18 @@ branches: main variables: - &platforms 'linux/amd64,linux/arm64' + - &golang 'golang:1.18' pipeline: - dryrun: + vendor: + image: *golang + commands: go mod vendor + + test: + image: *golang + commands: go test -cover ./... + + publish-dryrun: image: woodpeckerci/plugin-docker-buildx:v20.10.18 settings: platforms: *platforms diff --git a/plugin/impl.go b/plugin/impl.go index 1d271b3..5866a14 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -130,7 +130,7 @@ func (p *Plugin) writeBuildkitConfig() error { caPath := fmt.Sprintf("/etc/docker/certs.d/%s/ca.crt", registry) ca, err := os.Open(caPath) if err != nil && !os.IsNotExist(err) { - logrus.Warnf("error reading %s: %w", caPath, err) + logrus.Warnf("error reading %s: %v", caPath, err) } else if err == nil { ca.Close() p.settings.Daemon.BuildkitConfig = fmt.Sprintf(buildkitConfigTemplate, registry, caPath)