diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 562130d09f3..70f95716062 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,9 @@ # Contributing -By participating to this project, you agree to abide our [code of conduct](https://github.com/goreleaser/.github/blob/main/CODE_OF_CONDUCT.md). +By participating in this project, you agree to abide our +[code of conduct](https://github.com/goreleaser/.github/blob/main/CODE_OF_CONDUCT.md). -## Setup your machine +## Set up your machine `goreleaser` is written in [Go](https://golang.org/). @@ -13,7 +14,6 @@ Prerequisites: Other things you might need to run the tests: -- [Buildpacks](https://buildpacks.io/) - [cosign](https://github.com/sigstore/cosign) - [Docker](https://www.docker.com/) - [GPG](https://gnupg.org) diff --git a/internal/pipe/docker/api_buildpack.go b/internal/pipe/docker/api_buildpack.go deleted file mode 100644 index e77425ace1e..00000000000 --- a/internal/pipe/docker/api_buildpack.go +++ /dev/null @@ -1,42 +0,0 @@ -package docker - -import ( - "fmt" - "strings" - - "github.com/goreleaser/goreleaser/pkg/context" -) - -// deprected: should not be used anymore. -type buildPackImager struct{} - -func (i buildPackImager) Push(ctx *context.Context, image string, flags []string) error { - return dockerImager{}.Push(ctx, image, flags) -} - -func (i buildPackImager) Build(ctx *context.Context, root string, images, flags []string) error { - if err := runCommand(ctx, "", "pack", i.buildCommand(images, flags)...); err != nil { - return fmt.Errorf("failed to build %s: %w", images[0], err) - } - return nil -} - -func (i buildPackImager) buildCommand(images, flags []string) []string { - base := []string{"build", images[0]} - for j := 1; j < len(images); j++ { - base = append(base, "-t", images[j]) - } - - builderConfigured := false - for _, flag := range flags { - if strings.HasPrefix(flag, "-B") || strings.HasPrefix(flag, "--builder") { - builderConfigured = true - } - } - - if !builderConfigured { - flags = append(flags, "--builder=gcr.io/buildpacks/builder:v1") - } - - return append(base, flags...) -} diff --git a/internal/pipe/docker/api_docker.go b/internal/pipe/docker/api_docker.go index 02c546a255c..fe791e65a8c 100644 --- a/internal/pipe/docker/api_docker.go +++ b/internal/pipe/docker/api_docker.go @@ -13,7 +13,6 @@ func init() { registerImager(useBuildx, dockerImager{ buildx: true, }) - registerImager(useBuildPacks, buildPackImager{}) } type dockerManifester struct{} diff --git a/internal/pipe/docker/docker.go b/internal/pipe/docker/docker.go index 5dd7d992131..c4da6a35e6e 100644 --- a/internal/pipe/docker/docker.go +++ b/internal/pipe/docker/docker.go @@ -9,7 +9,6 @@ import ( "github.com/caarlos0/log" "github.com/goreleaser/goreleaser/internal/artifact" - "github.com/goreleaser/goreleaser/internal/deprecate" "github.com/goreleaser/goreleaser/internal/gio" "github.com/goreleaser/goreleaser/internal/ids" "github.com/goreleaser/goreleaser/internal/pipe" @@ -22,9 +21,8 @@ import ( const ( dockerConfigExtra = "DockerConfig" - useBuildx = "buildx" - useDocker = "docker" - useBuildPacks = "buildpacks" // deprecated: should not be used anymore + useBuildx = "buildx" + useDocker = "docker" ) // Pipe for docker. @@ -54,9 +52,6 @@ func (Pipe) Default(ctx *context.Context) error { if docker.Dockerfile == "" { docker.Dockerfile = "Dockerfile" } - if docker.Use == useBuildPacks { - deprecate.Notice(ctx, "dockers.use: buildpacks") - } if docker.Use == "" { docker.Use = useDocker } @@ -159,15 +154,6 @@ func process(ctx *context.Context, docker config.Docker, artifacts []*artifact.A log := log.WithField("image", images[0]) log.Debug("tempdir: " + tmp) - if docker.Use != useBuildPacks { - dockerfile, err := tmpl.New(ctx).Apply(docker.Dockerfile) - if err != nil { - return err - } - if err := gio.Copy(dockerfile, filepath.Join(tmp, "Dockerfile")); err != nil { - return fmt.Errorf("failed to copy dockerfile: %w", err) - } - } for _, file := range docker.Files { if err := os.MkdirAll(filepath.Join(tmp, filepath.Dir(file)), 0o755); err != nil { return fmt.Errorf("failed to copy extra file '%s': %w", file, err) diff --git a/internal/pipe/docker/docker_test.go b/internal/pipe/docker/docker_test.go index 9b7ee7497a8..eb5dace1d8c 100644 --- a/internal/pipe/docker/docker_test.go +++ b/internal/pipe/docker/docker_test.go @@ -982,9 +982,6 @@ func TestRunPipe(t *testing.T) { for name, docker := range table { for imager := range imagers { - if imager == useBuildPacks { - continue // deprecated - } t.Run(name+" on "+imager, func(t *testing.T) { folder := t.TempDir() dist := filepath.Join(folder, "dist") diff --git a/www/docs/contributing.md b/www/docs/contributing.md index 562130d09f3..70f95716062 100644 --- a/www/docs/contributing.md +++ b/www/docs/contributing.md @@ -1,8 +1,9 @@ # Contributing -By participating to this project, you agree to abide our [code of conduct](https://github.com/goreleaser/.github/blob/main/CODE_OF_CONDUCT.md). +By participating in this project, you agree to abide our +[code of conduct](https://github.com/goreleaser/.github/blob/main/CODE_OF_CONDUCT.md). -## Setup your machine +## Set up your machine `goreleaser` is written in [Go](https://golang.org/). @@ -13,7 +14,6 @@ Prerequisites: Other things you might need to run the tests: -- [Buildpacks](https://buildpacks.io/) - [cosign](https://github.com/sigstore/cosign) - [Docker](https://www.docker.com/) - [GPG](https://gnupg.org) diff --git a/www/docs/deprecations.md b/www/docs/deprecations.md index 54625319c3c..9c37e251a24 100644 --- a/www/docs/deprecations.md +++ b/www/docs/deprecations.md @@ -54,17 +54,6 @@ nFPM will soon make mandatory setting the maintainer field. - maintainer: 'Name ' ``` - - -### dockers.use: buildpacks - -> since 2022-03-16 (v1.7.0) - -This will be removed soon due to some issues: - -- The binary gets rebuild again during the buildpacks build; -- There is no ARM support. - ### variables > since 2022-01-20 (v1.4.0) @@ -91,6 +80,15 @@ On [GoReleaser PRO](/pro/) custom variables should now be prefixed with `.Var`. The following options were deprecated in the past and were already removed. +### dockers.use: buildpacks + +> since 2022-03-16 (v1.7.0), removed 2022-09-28 (v1.12.0) + +This was removed due to some issues: + +- The binary gets rebuild again during the buildpacks build; +- There is no ARM support. + ### rigs > since 2022-03-21 (v1.8.0), removed 2022-08-16 (v1.11.0)