Skip to content

Commit aa0d070

Browse files
authored
update to Go 1.24.4 and simplify build (#374)
* update to Go 1.24.4 and simplify build Signed-off-by: Harper, Jason M <[email protected]> * add jq Signed-off-by: Harper, Jason M <[email protected]> --------- Signed-off-by: Harper, Jason M <[email protected]>
1 parent 94cdf91 commit aa0d070

File tree

6 files changed

+37
-63
lines changed

6 files changed

+37
-63
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@ RUN apt-get update --fix-missing \
2323
# Copy the perfspect binary to the container
2424
COPY ./perfspect /usr/bin/perfspect
2525
RUN mkdir -p /output
26-
WORKDIR /output
27-
# ENTRYPOINT ["perfspect"]
28-
# CMD ["-h"]
26+
WORKDIR /output

build.Dockerfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

builder/build.Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ ARG TAG=
1414
FROM ${REGISTRY}${PREFIX}perfspect-tools:${TAG} AS tools
1515

1616
# STAGE 2 - image contains perfspect's Go components build environment
17-
FROM ${REGISTRY}${PREFIX}perfspect-builder:${TAG} AS perfspect
17+
FROM golang:1.24.4@sha256:db5d0afbfb4ab648af2393b92e87eaae9ad5e01132803d80caef91b5752d289c
18+
# copy the tools binaries and source from the previous stage
1819
RUN mkdir /prebuilt
1920
RUN mkdir /prebuilt/tools
2021
COPY --from=tools /bin/ /prebuilt/tools
2122
COPY --from=tools /oss_source.tgz /prebuilt/
2223
COPY --from=tools /oss_source.tgz.md5 /prebuilt/
23-
RUN git config --global --add safe.directory /localrepo
24+
# allow git to operate in the mounted repository regardless of the user
25+
RUN git config --global --add safe.directory /localrepo
26+
# install jq as it is used in the Makefile to create the manifest
27+
RUN apt-get update
28+
RUN apt-get install -y jq

builder/build.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,24 @@ TAG=v1
1010

1111
# build tools image
1212
docker build -f tools/build.Dockerfile --tag perfspect-tools:$TAG ./tools
13-
# Create a temporary container
13+
14+
# Create a temporary container from the tools image
1415
id=$(docker create perfspect-tools:$TAG foo)
1516

16-
# Copy the files from the container to your local disk
17+
# Copy the tools from the temporary container to your local disk
1718
# Note: not used in build process, but useful to have around
1819
docker cp "$id":/bin ./tools
1920

2021
# Remove the temporary container
2122
docker rm "$id"
2223

23-
# build go app builder image
24-
docker build -f build.Dockerfile --tag perfspect-builder:$TAG .
25-
26-
# build perfspect release package builder image
27-
docker build -f builder/build.Dockerfile --build-arg TAG=$TAG --tag perfspect-package-builder:$TAG .
24+
# build the perfspect builder image
25+
docker build -f builder/build.Dockerfile --build-arg TAG=$TAG --tag perfspect-builder:$TAG .
2826

29-
# build perfspect release package
27+
# build perfspect using the builder image
3028
docker container run \
3129
--volume "$(pwd)":/localrepo \
3230
-w /localrepo \
3331
--rm \
34-
perfspect-package-builder:$TAG \
35-
make dist
32+
perfspect-builder:$TAG \
33+
make dist

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ require (
3333
github.com/kr/text v0.2.0 // indirect
3434
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3535
github.com/pmezard/go-difflib v1.0.0 // indirect
36-
github.com/prometheus/client_model v0.6.1 // indirect
37-
github.com/prometheus/common v0.62.0 // indirect
38-
github.com/prometheus/procfs v0.15.1 // indirect
36+
github.com/prometheus/client_model v0.6.2 // indirect
37+
github.com/prometheus/common v0.64.0 // indirect
38+
github.com/prometheus/procfs v0.16.1 // indirect
3939
github.com/richardlehane/mscfb v1.0.4 // indirect
4040
github.com/richardlehane/msoleps v1.0.4 // indirect
41-
github.com/tiendc/go-deepcopy v1.6.0 // indirect
41+
github.com/tiendc/go-deepcopy v1.6.1 // indirect
4242
github.com/xuri/efp v0.0.1 // indirect
4343
github.com/xuri/nfp v0.0.1 // indirect
44-
golang.org/x/crypto v0.38.0 // indirect
45-
golang.org/x/net v0.40.0 // indirect
44+
golang.org/x/crypto v0.39.0 // indirect
45+
golang.org/x/net v0.41.0 // indirect
4646
golang.org/x/sys v0.33.0 // indirect
47-
google.golang.org/protobuf v1.36.5 // indirect
47+
google.golang.org/protobuf v1.36.6 // indirect
4848
gopkg.in/yaml.v3 v3.0.1 // indirect
4949
)

go.sum

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
2828
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2929
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
3030
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
31-
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
32-
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
33-
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
34-
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
35-
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
36-
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
31+
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
32+
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
33+
github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4=
34+
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
35+
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
36+
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
3737
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
3838
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
3939
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
@@ -48,30 +48,28 @@ github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
4848
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
4949
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
5050
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
51-
github.com/tiendc/go-deepcopy v1.6.0 h1:0UtfV/imoCwlLxVsyfUd4hNHnB3drXsfle+wzSCA5Wo=
52-
github.com/tiendc/go-deepcopy v1.6.0/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I=
51+
github.com/tiendc/go-deepcopy v1.6.1 h1:uVRTItFeNHkMcLueHS7OCsxgxT9P8MzGB/taUa2Y4Tk=
52+
github.com/tiendc/go-deepcopy v1.6.1/go.mod h1:toXoeQoUqXOOS/X4sKuiAoSk6elIdqc0pN7MTgOOo2I=
5353
github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8=
5454
github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
5555
github.com/xuri/excelize/v2 v2.9.1 h1:VdSGk+rraGmgLHGFaGG9/9IWu1nj4ufjJ7uwMDtj8Qw=
5656
github.com/xuri/excelize/v2 v2.9.1/go.mod h1:x7L6pKz2dvo9ejrRuD8Lnl98z4JLt0TGAwjhW+EiP8s=
5757
github.com/xuri/nfp v0.0.1 h1:MDamSGatIvp8uOmDP8FnmjuQpu90NzdJxo7242ANR9Q=
5858
github.com/xuri/nfp v0.0.1/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
59-
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
60-
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
59+
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
60+
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
6161
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
6262
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
63-
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
64-
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
63+
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
64+
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
6565
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
6666
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
6767
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
6868
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
69-
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
70-
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
7169
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
7270
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
73-
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
74-
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
71+
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
72+
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
7573
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
7674
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
7775
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

0 commit comments

Comments
 (0)