Skip to content

Commit

Permalink
feat: permanently remove buildpacks (#3414)
Browse files Browse the repository at this point in the history
removing for good!

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Oct 5, 2022
1 parent 7c42c80 commit 24178b1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 79 deletions.
6 changes: 3 additions & 3 deletions 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/).

Expand All @@ -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)
Expand Down
42 changes: 0 additions & 42 deletions internal/pipe/docker/api_buildpack.go

This file was deleted.

1 change: 0 additions & 1 deletion internal/pipe/docker/api_docker.go
Expand Up @@ -13,7 +13,6 @@ func init() {
registerImager(useBuildx, dockerImager{
buildx: true,
})
registerImager(useBuildPacks, buildPackImager{})
}

type dockerManifester struct{}
Expand Down
18 changes: 2 additions & 16 deletions internal/pipe/docker/docker.go
Expand Up @@ -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"
Expand All @@ -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.
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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)

This comment has been minimized.

Copy link
@caarlos0

caarlos0 Oct 5, 2022

Author Member

oops

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)
Expand Down
3 changes: 0 additions & 3 deletions internal/pipe/docker/docker_test.go
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions 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/).

Expand All @@ -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)
Expand Down
20 changes: 9 additions & 11 deletions www/docs/deprecations.md
Expand Up @@ -54,17 +54,6 @@ nFPM will soon make mandatory setting the maintainer field.
- maintainer: 'Name <email>'
```



### 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)
Expand All @@ -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)
Expand Down

0 comments on commit 24178b1

Please sign in to comment.