Skip to content

Commit a7b2102

Browse files
authored
Merge pull request #125 from pn-santos/version-updates
Version updates
2 parents 6763cba + d53e0bb commit a7b2102

File tree

15 files changed

+167
-1290
lines changed

15 files changed

+167
-1290
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ jobs:
66
test:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v4
1010
with: {submodules: true}
1111
- run: scripts/test
1212

1313
build-image:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v4
1717
with: {submodules: true}
1818
- run: scripts/build
1919
- run: scripts/build-image
20-
- uses: actions/upload-artifact@v1
20+
- uses: actions/upload-artifact@v4
2121
with:
2222
name: image
2323
path: image
@@ -26,9 +26,11 @@ jobs:
2626
needs: [build-image]
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v1
30-
- uses: actions/download-artifact@v1
31-
with: {name: image}
29+
- uses: actions/checkout@v4
30+
- uses: actions/download-artifact@v4
31+
with:
32+
name: image
33+
path: image
3234
- uses: docker://concourse/registry-image-resource
3335
with: {entrypoint: scripts/push-image}
3436
env:

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ jobs:
66
test:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v4
1010
with: {submodules: true}
1111
- run: scripts/test
1212

1313
build-image:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v4
1717
with: {submodules: true}
1818
- run: scripts/build
1919
- run: scripts/build-image

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# syntax = docker/dockerfile:experimental
1+
# syntax = docker/dockerfile:1.11
22

33
FROM concourse/golang-builder AS builder
44
WORKDIR /src
55
COPY go.mod /src/go.mod
66
COPY go.sum /src/go.sum
77
RUN --mount=type=cache,target=/root/.cache/go-build go get -d ./...
88
COPY . /src
9-
ENV CGO_ENABLED 0
9+
ENV CGO_ENABLED=0
1010
RUN go build -o /assets/task ./cmd/task
1111
RUN go build -o /assets/build ./cmd/build
1212

13-
FROM moby/buildkit:v0.11.0 AS task
13+
FROM moby/buildkit:v0.17.2 AS task
1414
COPY --from=builder /assets/task /usr/bin/
1515
COPY --from=builder /assets/build /usr/bin/
1616
COPY bin/setup-cgroups /usr/bin/

buildkitd.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package task
33
import (
44
"fmt"
55
"io"
6-
"io/ioutil"
76
"net/url"
87
"os"
98
"os/exec"
@@ -101,7 +100,7 @@ func SpawnBuildkitd(req Request, opts *BuildkitdOpts) (*Buildkitd, error) {
101100
}
102101

103102
for {
104-
err := buildctl(addr, ioutil.Discard, "debug", "workers")
103+
err := buildctl(addr, io.Discard, "debug", "workers")
105104
if err == nil {
106105
break
107106
}
@@ -149,8 +148,7 @@ func generateConfig(req Request, configPath string) error {
149148
var config BuildkitdConfig
150149

151150
if len(req.Config.RegistryMirrors) > 0 {
152-
var registryConfigs map[string]RegistryConfig
153-
registryConfigs = make(map[string]RegistryConfig)
151+
var registryConfigs = make(map[string]RegistryConfig)
154152
registryConfigs["docker.io"] = RegistryConfig{
155153
Mirrors: req.Config.RegistryMirrors,
156154
}

buildkitd_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package task_test
22

33
import (
4-
"io/ioutil"
54
"os"
65
"path/filepath"
76
"testing"
@@ -30,7 +29,7 @@ func (s *BuildkitdSuite) TearDownSuite() {
3029

3130
func (s *BuildkitdSuite) SetupTest() {
3231
var err error
33-
s.outputsDir, err = ioutil.TempDir("", "oci-build-task-test")
32+
s.outputsDir, err = os.MkdirTemp("", "oci-build-task-test")
3433
s.NoError(err)
3534

3635
s.req = task.Request{
@@ -64,10 +63,10 @@ func (s *BuildkitdSuite) TestGenerateConfig() {
6463
})
6564
s.NoError(err)
6665

67-
configContent, err := ioutil.ReadFile(s.configPath("mirrors.toml"))
66+
configContent, err := os.ReadFile(s.configPath("mirrors.toml"))
6867
s.NoError(err)
6968

70-
expectedContent, err := ioutil.ReadFile("testdata/buildkitd-config/mirrors.toml")
69+
expectedContent, err := os.ReadFile("testdata/buildkitd-config/mirrors.toml")
7170
s.NoError(err)
7271

7372
s.Equal(expectedContent, configContent)

go.mod

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
11
module github.com/concourse/oci-build-task
22

3-
go 1.12
3+
go 1.23
44

55
require (
6-
github.com/BurntSushi/toml v0.4.1
7-
github.com/VividCortex/ewma v1.1.1 // indirect
6+
github.com/BurntSushi/toml v1.4.0
87
github.com/concourse/go-archive v1.0.1
9-
github.com/fatih/color v1.13.0
10-
github.com/google/go-containerregistry v0.9.0
8+
github.com/fatih/color v1.18.0
9+
github.com/google/go-containerregistry v0.20.2
1110
github.com/julienschmidt/httprouter v1.3.0
1211
github.com/pkg/errors v0.9.1
13-
github.com/sirupsen/logrus v1.8.1
14-
github.com/stretchr/testify v1.7.0
12+
github.com/sirupsen/logrus v1.9.3
13+
github.com/stretchr/testify v1.9.0
1514
github.com/u-root/u-root v7.0.0+incompatible
1615
github.com/vbauerster/mpb v3.4.0+incompatible
1716
github.com/vrischmann/envconfig v1.3.0
18-
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
17+
)
18+
19+
require (
20+
github.com/VividCortex/ewma v1.2.0 // indirect
21+
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
22+
github.com/davecgh/go-spew v1.1.1 // indirect
23+
github.com/docker/cli v27.2.1+incompatible // indirect
24+
github.com/docker/distribution v2.8.3+incompatible // indirect
25+
github.com/docker/docker-credential-helpers v0.8.2 // indirect
26+
github.com/klauspost/compress v1.17.11 // indirect
27+
github.com/kr/pretty v0.3.1 // indirect
28+
github.com/mattn/go-colorable v0.1.13 // indirect
29+
github.com/mattn/go-isatty v0.0.20 // indirect
30+
github.com/mitchellh/go-homedir v1.1.0 // indirect
31+
github.com/onsi/ginkgo v1.16.5 // indirect
32+
github.com/onsi/gomega v1.27.8 // indirect
33+
github.com/opencontainers/go-digest v1.0.0 // indirect
34+
github.com/opencontainers/image-spec v1.1.0 // indirect
35+
github.com/pmezard/go-difflib v1.0.0 // indirect
36+
github.com/vbatts/tar-split v0.11.6 // indirect
37+
golang.org/x/crypto v0.28.0 // indirect
38+
golang.org/x/sync v0.8.0 // indirect
39+
golang.org/x/sys v0.26.0 // indirect
40+
golang.org/x/term v0.25.0 // indirect
41+
gopkg.in/yaml.v3 v3.0.1 // indirect
1942
)

0 commit comments

Comments
 (0)