Skip to content

Commit

Permalink
Bump pipeline from 1.31.0 to 1.32.0 (#225)
Browse files Browse the repository at this point in the history
* Bump pipeline from 1.31.0 to 1.32.0

Bumps pipeline from 1.31.0 to 1.32.0.

Signed-off-by: GitHub <[email protected]>

* Update lint tools & linter definitions

Signed-off-by: Daniel Mikusa <[email protected]>

* Fix linter errors

Signed-off-by: Daniel Mikusa <[email protected]>

* Regenerate mocks with latest version of `mockery`

Signed-off-by: Daniel Mikusa <[email protected]>

* Remove usage of ioutil/*

Signed-off-by: Daniel Mikusa <[email protected]>

---------

Signed-off-by: GitHub <[email protected]>
Signed-off-by: Daniel Mikusa <[email protected]>
Co-authored-by: buildpack-bot <[email protected]>
Co-authored-by: Daniel Mikusa <[email protected]>
  • Loading branch information
3 people authored Apr 12, 2023
1 parent f10dc66 commit d7fde7b
Show file tree
Hide file tree
Showing 31 changed files with 605 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .github/pipeline-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.31.0
1.32.0
4 changes: 2 additions & 2 deletions .github/workflows/pb-minimal-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v3
- uses: mheap/github-action-required-labels@v4
with:
count: 1
labels: semver:major, semver:minor, semver:patch
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v3
- uses: mheap/github-action-required-labels@v4
with:
count: 1
labels: type:bug, type:dependency-upgrade, type:documentation, type:enhancement, type:question, type:task
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pb-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
restore-keys: ${{ runner.os }}-go-
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
- name: Install richgo
run: |
#!/usr/bin/env bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pb-update-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
- uses: actions/checkout@v3
- name: Update Go Version & Modules
id: update-go
Expand Down Expand Up @@ -49,8 +49,8 @@ jobs:
echo "commit-body=${COMMIT_BODY}" >> "$GITHUB_OUTPUT"
echo "commit-semver=${COMMIT_SEMVER}" >> "$GITHUB_OUTPUT"
env:
GO_VERSION: "1.18"
- uses: peter-evans/create-pull-request@v4
GO_VERSION: "1.20"
- uses: peter-evans/create-pull-request@v5
with:
author: ${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }} <${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }}@users.noreply.github.com>
body: |-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pb-update-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version: "1.20"
- name: Install octo
run: |
#!/usr/bin/env bash
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
env:
DESCRIPTOR: .github/pipeline-descriptor.yml
GITHUB_TOKEN: ${{ secrets.IMPLEMENTATION_GITHUB_TOKEN }}
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
author: ${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }} <${{ secrets.IMPLEMENTATION_GITHUB_USERNAME }}@users.noreply.github.com>
body: |-
Expand Down
7 changes: 3 additions & 4 deletions build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -226,7 +225,7 @@ version = "1.1.1"
envVar := e
context(fmt.Sprintf("when %s is unset", envVar), func() {
it.Before(func() {
Expect(ioutil.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
Expect(os.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
[]byte(`
api = "0.8"
Expand Down Expand Up @@ -271,7 +270,7 @@ version = "1.1.1"
var ctx libcnb.BuildContext

it.Before(func() {
Expect(ioutil.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
Expect(os.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
[]byte(`
api = "0.8"
Expand Down Expand Up @@ -471,7 +470,7 @@ version = "1.1.1"
err := buildpackTOML.Execute(&b, map[string]string{"APIVersion": "0.8"})
Expect(err).ToNot(HaveOccurred())

Expect(ioutil.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"), b.Bytes(), 0600)).To(Succeed())
Expect(os.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"), b.Bytes(), 0600)).To(Succeed())

buildFunc = func(libcnb.BuildContext) (libcnb.BuildResult, error) {
return libcnb.BuildResult{
Expand Down
2 changes: 1 addition & 1 deletion buildpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
. "github.com/onsi/gomega"
)

func testBuildpackTOML(t *testing.T, context spec.G, it spec.S) {
func testBuildpackTOML(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect
)
Expand Down
5 changes: 2 additions & 3 deletions detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package libcnb_test

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -195,7 +194,7 @@ version = "1.1.1"
envVar := e
context(fmt.Sprintf("when %s is unset", envVar), func() {
it.Before(func() {
Expect(ioutil.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
Expect(os.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
[]byte(`
api = "0.8"
Expand Down Expand Up @@ -227,7 +226,7 @@ version = "1.1.1"
var ctx libcnb.DetectContext

it.Before(func() {
Expect(ioutil.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
Expect(os.WriteFile(filepath.Join(buildpackPath, "buildpack.toml"),
[]byte(`
api = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/buildpacks/libcnb"
)

func testEnvironment(t *testing.T, context spec.G, it spec.S) {
func testEnvironment(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
3 changes: 1 addition & 2 deletions example_build_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package libcnb_test

import (
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -36,7 +35,7 @@ func resolve(plan libcnb.BuildpackPlan, name string) libcnb.BuildpackPlanEntry {

func populateLayer(layer libcnb.Layer, version string) (libcnb.Layer, error) {
exampleFile := filepath.Join(layer.Path, "example.txt")
ioutil.WriteFile(exampleFile, []byte(version), 0600)
os.WriteFile(exampleFile, []byte(version), 0600)
layer.SharedEnvironment.Default("EXAMPLE_FILE", exampleFile)

// Provide an SBOM
Expand Down
2 changes: 1 addition & 1 deletion exec_d_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/buildpacks/libcnb/mocks"
)

func testExecD(t *testing.T, context spec.G, it spec.S) {
func testExecD(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/buildpacks/libcnb

go 1.18
go 1.20

require (
github.com/BurntSushi/toml v1.2.1
Expand All @@ -15,11 +15,10 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/text v0.9.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg=
Expand All @@ -42,8 +42,8 @@ golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 0 additions & 3 deletions golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- dogsled
- exportloopref
- gocritic
Expand All @@ -18,12 +17,10 @@ linters:
- nakedret
- revive
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unused
- varcheck
- whitespace

linters-settings:
Expand Down
2 changes: 1 addition & 1 deletion internal/config_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/buildpacks/libcnb/internal"
)

func testConfigMap(t *testing.T, context spec.G, it spec.S) {
func testConfigMap(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
2 changes: 1 addition & 1 deletion internal/environment_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/buildpacks/libcnb/internal"
)

func testEnvironmentWriter(t *testing.T, context spec.G, it spec.S) {
func testEnvironmentWriter(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
2 changes: 1 addition & 1 deletion internal/execd_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/buildpacks/libcnb/internal"
)

func testExecDWriter(t *testing.T, context spec.G, it spec.S) {
func testExecDWriter(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
2 changes: 1 addition & 1 deletion internal/exit_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/buildpacks/libcnb/internal"
)

func testExitHandler(t *testing.T, context spec.G, it spec.S) {
func testExitHandler(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
2 changes: 1 addition & 1 deletion internal/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewPlainDirectoryContentFormatter() *PlainDirectoryContentFormatter {
return &PlainDirectoryContentFormatter{}
}

func (p *PlainDirectoryContentFormatter) File(path string, info os.FileInfo) (string, error) {
func (p *PlainDirectoryContentFormatter) File(path string, _ os.FileInfo) (string, error) {
rel, err := filepath.Rel(p.rootPath, path)
if err != nil {
return "", fmt.Errorf("unable to calculate relative path %s -> %s\n%w", p.rootPath, path, err)
Expand Down
2 changes: 1 addition & 1 deletion internal/toml_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/buildpacks/libcnb/internal"
)

func testTOMLWriter(t *testing.T, context spec.G, it spec.S) {
func testTOMLWriter(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
11 changes: 1 addition & 10 deletions layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package libcnb_test

import (
"io/ioutil"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -85,15 +84,7 @@ func testLayer(t *testing.T, context spec.G, it spec.S) {
var layer libcnb.Layer

it.Before(func() {
var err error
path, err = ioutil.TempDir("", "layers")
Expect(err).NotTo(HaveOccurred())

layers = libcnb.Layers{Path: path}
})

it.After(func() {
Expect(os.RemoveAll(path)).To(Succeed())
layers = libcnb.Layers{Path: t.TempDir()}
})

context("when there is no previous build", func() {
Expand Down
22 changes: 20 additions & 2 deletions log/mocks/directory_content_formatter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion log/mocks/logger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/buildpacks/libcnb/mocks"
)

func testMain(t *testing.T, context spec.G, it spec.S) {
func testMain(t *testing.T, _ spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect

Expand Down
Loading

0 comments on commit d7fde7b

Please sign in to comment.