Skip to content

Commit 7d24ec5

Browse files
authored
Merge pull request #41 from ibmstorage/fix-helm
build helm using go modules to resolve conforma violation
2 parents e178469 + 6bb9209 commit 7d24ec5

File tree

8 files changed

+1871
-3152
lines changed

8 files changed

+1871
-3152
lines changed

.tekton/alloy-9-0-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ spec:
8787
description: Execute the build with network isolation
8888
name: hermetic
8989
type: string
90-
- default: '[{"type": "gomod", "path": "."}, {"type": "npm", "path": "yarn-install"}, {"type": "generic", "path": "."}, {"type": "yarn", "path": "alloy/internal/web/ui"}, {"type": "gomod", "path": "alloy"}, {"type": "rpm", "path": "."}]'
90+
- default: '[{"type": "gomod", "path": "."}, {"type": "npm", "path": "yarn-install"}, {"type": "yarn", "path": "alloy/internal/web/ui"}, {"type": "gomod", "path": "alloy"}, {"type": "rpm", "path": "."}]'
9191
description: Build dependencies to be prefetched by Cachi2
9292
name: prefetch-input
9393
type: string

.tekton/alloy-9-0-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ spec:
8484
description: Execute the build with network isolation
8585
name: hermetic
8686
type: string
87-
- default: '[{"type": "gomod", "path": "."}, {"type": "npm", "path": "yarn-install"}, {"type": "generic", "path": "."}, {"type": "yarn", "path": "alloy/internal/web/ui"}, {"type": "gomod", "path": "alloy"}, {"type": "rpm", "path": "."}]'
87+
- default: '[{"type": "gomod", "path": "."}, {"type": "npm", "path": "yarn-install"}, {"type": "yarn", "path": "alloy/internal/web/ui"}, {"type": "gomod", "path": "alloy"}, {"type": "rpm", "path": "."}]'
8888
description: Build dependencies to be prefetched by Cachi2
8989
name: prefetch-input
9090
type: string

Dockerfile

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,42 @@ ARG BUILDPLATFORM
33

44
USER root
55

6+
ENV PATH="/usr/bin/go:$PATH"
7+
ENV GOPATH='/opt/app-root/src/go'
8+
ENV GOCACHE='/opt/app-root/src/.cache/go-build'
9+
10+
# Install Helm CLI (using prefetched modules)
11+
COPY . /src
12+
WORKDIR /src
13+
14+
# This one will download the deps in the alloy-container folder's go.mod
15+
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && \
16+
go mod download
17+
18+
# Build helm binary using go
19+
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && \
20+
go build -o /usr/bin/helm helm.sh/helm/v3/cmd/helm
21+
622
# Install yarn using npm package manager.
723
COPY yarn-install .
824
RUN npm install --offline
925
RUN ln -s $PWD/node_modules/yarn/bin/yarn /usr/local/bin/yarn
1026

11-
RUN yum install -y systemd-devel \
27+
RUN yum install -y systemd-devel hostname \
1228
&& dnf module reset -y nodejs \
1329
&& node -v \
1430
&& yarn -v
1531

16-
# Helm installation as per https://helm.sh/docs/intro/install/
17-
RUN tar -zxvf /cachi2/output/deps/generic/helm-linux-${BUILDPLATFORM}.tar.gz \
18-
&& mv ./linux-${BUILDPLATFORM}/helm /usr/bin/helm
19-
20-
COPY . /src
2132
WORKDIR /src/alloy/internal/web/ui/
2233
RUN yarn install --offline --frozen-lockfile --ignore-scripts && yarn run --offline build
2334

2435
WORKDIR /src/alloy
2536

37+
# This one will download the deps in the alloy subfolder's go.mod
38+
RUN if [ -f /cachi2/cachi2.env ]; then . /cachi2/cachi2.env; fi && \
39+
go mod download
40+
41+
# We are only building for linux OS so we don't have to use GO_TAG="netgo"
2642
RUN GO_TAGS="builtinassets promtail_journal_enabled" GOOS="linux" GOARCH= GOARM= RELEASE_BUILD=1 make alloy
2743

2844
# Stage 2

artifacts.lock.yaml

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

go.mod

Lines changed: 151 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,95 +3,184 @@ module alloy-builder
33
go 1.24.6
44

55
require (
6+
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0
7+
github.com/gogo/protobuf v1.3.2
8+
github.com/golang/protobuf v1.5.4
9+
github.com/google/go-jsonnet v0.21.0
10+
github.com/grafana/tanka v0.36.1
11+
github.com/jsonnet-bundler/jsonnet-bundler v0.6.0
12+
github.com/mitchellh/gox v1.0.1
13+
github.com/norwoodj/helm-docs v1.14.2
14+
github.com/tcnksm/ghr v0.17.0
15+
helm.sh/helm/v3 v3.19.2
16+
sigs.k8s.io/controller-tools v0.19.0
17+
)
18+
19+
require (
20+
dario.cat/mergo v1.0.1 // indirect
21+
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
22+
github.com/BurntSushi/toml v1.5.0 // indirect
23+
github.com/MakeNowJust/heredoc v1.0.0 // indirect
624
github.com/Masterminds/goutils v1.1.1 // indirect
725
github.com/Masterminds/semver v1.5.0 // indirect
8-
github.com/Masterminds/semver/v3 v3.1.1 // indirect
9-
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
26+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
27+
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
28+
github.com/Masterminds/squirrel v1.5.4 // indirect
29+
github.com/Masterminds/vcs v1.13.3 // indirect
1030
github.com/Songmu/retry v0.1.0 // indirect
11-
github.com/ahmetb/gen-crd-api-reference-docs v0.3.1-0.20220618162802-424739b250f5 // indirect
1231
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
1332
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
14-
github.com/fatih/color v1.13.0 // indirect
33+
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
34+
github.com/blang/semver/v4 v4.0.0 // indirect
35+
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
36+
github.com/chai2010/gettext-go v1.0.2 // indirect
37+
github.com/containerd/containerd v1.7.29 // indirect
38+
github.com/containerd/errdefs v0.3.0 // indirect
39+
github.com/containerd/log v0.1.0 // indirect
40+
github.com/containerd/platforms v0.2.1 // indirect
41+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
42+
github.com/cyphar/filepath-securejoin v0.6.0 // indirect
43+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
44+
github.com/elliotchance/orderedmap/v2 v2.2.0 // indirect
45+
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
46+
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
47+
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
48+
github.com/fatih/color v1.18.0 // indirect
1549
github.com/fatih/structs v1.1.0 // indirect
16-
github.com/fsnotify/fsnotify v1.4.7 // indirect
50+
github.com/fsnotify/fsnotify v1.9.0 // indirect
51+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
1752
github.com/go-clix/cli v0.2.0 // indirect
18-
github.com/go-logr/logr v1.2.2 // indirect
19-
github.com/gobuffalo/flect v0.2.5 // indirect
53+
github.com/go-errors/errors v1.4.2 // indirect
54+
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
55+
github.com/go-logr/logr v1.4.3 // indirect
56+
github.com/go-logr/stdr v1.2.2 // indirect
57+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
58+
github.com/go-openapi/jsonreference v0.20.2 // indirect
59+
github.com/go-openapi/swag v0.23.0 // indirect
60+
github.com/gobuffalo/flect v1.0.3 // indirect
2061
github.com/gobwas/glob v0.2.3 // indirect
21-
github.com/gogo/protobuf v1.3.0 // indirect
22-
github.com/golang/protobuf v1.3.1 // indirect
62+
github.com/gofrs/flock v0.12.1 // indirect
63+
github.com/google/btree v1.1.3 // indirect
64+
github.com/google/gnostic-models v0.7.0 // indirect
65+
github.com/google/go-cmp v0.7.0 // indirect
2366
github.com/google/go-github v17.0.0+incompatible // indirect
24-
github.com/google/go-jsonnet v0.18.0 // indirect
67+
github.com/google/go-github/v66 v66.0.0 // indirect
2568
github.com/google/go-querystring v1.1.0 // indirect
26-
github.com/google/gofuzz v1.1.0 // indirect
27-
github.com/google/uuid v1.3.0 // indirect
28-
github.com/grafana/tanka v0.10.0 // indirect
69+
github.com/google/uuid v1.6.0 // indirect
70+
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
71+
github.com/gosuri/uitable v0.0.4 // indirect
72+
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
73+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
2974
github.com/hashicorp/errwrap v1.1.0 // indirect
3075
github.com/hashicorp/go-multierror v1.1.1 // indirect
31-
github.com/hashicorp/go-version v1.3.0 // indirect
76+
github.com/hashicorp/go-version v1.7.0 // indirect
3277
github.com/hashicorp/hcl v1.0.0 // indirect
33-
github.com/huandu/xstrings v1.3.2 // indirect
34-
github.com/imdario/mergo v0.3.12 // indirect
35-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
78+
github.com/huandu/xstrings v1.5.0 // indirect
79+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
80+
github.com/jmoiron/sqlx v1.4.0 // indirect
81+
github.com/josharian/intern v1.0.0 // indirect
3682
github.com/json-iterator/go v1.1.12 // indirect
37-
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 // indirect
38-
github.com/karrick/godirwalk v1.16.1 // indirect
39-
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
40-
github.com/magiconair/properties v1.8.0 // indirect
41-
github.com/mattn/go-colorable v0.1.12 // indirect
42-
github.com/mattn/go-isatty v0.0.14 // indirect
83+
github.com/klauspost/compress v1.18.0 // indirect
84+
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
85+
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
86+
github.com/lib/pq v1.10.9 // indirect
87+
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
88+
github.com/magiconair/properties v1.8.7 // indirect
89+
github.com/mailru/easyjson v0.7.7 // indirect
90+
github.com/mattn/go-colorable v0.1.13 // indirect
91+
github.com/mattn/go-isatty v0.0.20 // indirect
92+
github.com/mattn/go-runewidth v0.0.9 // indirect
4393
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
4494
github.com/mitchellh/copystructure v1.2.0 // indirect
45-
github.com/mitchellh/gox v1.0.1 // indirect
95+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
4696
github.com/mitchellh/iochan v1.0.0 // indirect
47-
github.com/mitchellh/mapstructure v1.1.2 // indirect
97+
github.com/mitchellh/mapstructure v1.5.0 // indirect
4898
github.com/mitchellh/reflectwalk v1.0.2 // indirect
99+
github.com/moby/spdystream v0.5.0 // indirect
100+
github.com/moby/term v0.5.2 // indirect
49101
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
50-
github.com/modern-go/reflect2 v1.0.2 // indirect
51-
github.com/norwoodj/helm-docs v1.11.0 // indirect
52-
github.com/pelletier/go-toml v1.2.0 // indirect
102+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
103+
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
104+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
105+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
106+
github.com/opencontainers/go-digest v1.0.0 // indirect
107+
github.com/opencontainers/image-spec v1.1.1 // indirect
108+
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
109+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
53110
github.com/pkg/errors v0.9.1 // indirect
111+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
54112
github.com/posener/complete v1.2.3 // indirect
113+
github.com/rs/zerolog v1.34.0 // indirect
114+
github.com/rubenv/sql-migrate v1.8.0 // indirect
55115
github.com/russross/blackfriday/v2 v2.1.0 // indirect
56-
github.com/shopspring/decimal v1.3.1 // indirect
57-
github.com/sirupsen/logrus v1.4.2 // indirect
58-
github.com/spf13/afero v1.2.2 // indirect
59-
github.com/spf13/cast v1.4.1 // indirect
60-
github.com/spf13/cobra v1.4.0 // indirect
61-
github.com/spf13/jwalterweatherman v1.0.0 // indirect
62-
github.com/spf13/pflag v1.0.5 // indirect
63-
github.com/spf13/viper v1.4.0 // indirect
64-
github.com/stretchr/objx v0.4.0 // indirect
65-
github.com/tcnksm/ghr v0.13.0 // indirect
116+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
117+
github.com/shopspring/decimal v1.4.0 // indirect
118+
github.com/sirupsen/logrus v1.9.3 // indirect
119+
github.com/spf13/afero v1.9.5 // indirect
120+
github.com/spf13/cast v1.7.0 // indirect
121+
github.com/spf13/cobra v1.10.1 // indirect
122+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
123+
github.com/spf13/pflag v1.0.10 // indirect
124+
github.com/spf13/viper v1.16.0 // indirect
125+
github.com/stretchr/objx v0.5.3 // indirect
126+
github.com/subosito/gotenv v1.4.2 // indirect
66127
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
67128
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e // indirect
68-
github.com/thoas/go-funk v0.9.2 // indirect
69-
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
70-
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
71-
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
72-
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
73-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
74-
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
75-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
76-
golang.org/x/text v0.3.7 // indirect
77-
golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717 // indirect
78-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
79-
google.golang.org/appengine v1.6.7 // indirect
80-
google.golang.org/protobuf v1.26.0-rc.1 // indirect
129+
github.com/thediveo/enumflag/v2 v2.0.5 // indirect
130+
github.com/thoas/go-funk v0.9.3 // indirect
131+
github.com/x448/float16 v0.8.4 // indirect
132+
github.com/xlab/treeprint v1.2.0 // indirect
133+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
134+
go.opentelemetry.io/otel v1.38.0 // indirect
135+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 // indirect
136+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0 // indirect
137+
go.opentelemetry.io/otel/metric v1.38.0 // indirect
138+
go.opentelemetry.io/otel/sdk v1.38.0 // indirect
139+
go.opentelemetry.io/otel/trace v1.38.0 // indirect
140+
go.opentelemetry.io/proto/otlp v1.7.1 // indirect
141+
go.yaml.in/yaml/v2 v2.4.2 // indirect
142+
go.yaml.in/yaml/v3 v3.0.4 // indirect
143+
golang.org/x/crypto v0.43.0 // indirect
144+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
145+
golang.org/x/mod v0.28.0 // indirect
146+
golang.org/x/net v0.45.0 // indirect
147+
golang.org/x/oauth2 v0.30.0 // indirect
148+
golang.org/x/sync v0.17.0 // indirect
149+
golang.org/x/sys v0.37.0 // indirect
150+
golang.org/x/term v0.36.0 // indirect
151+
golang.org/x/text v0.30.0 // indirect
152+
golang.org/x/time v0.12.0 // indirect
153+
golang.org/x/tools v0.37.0 // indirect
154+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
155+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
156+
google.golang.org/grpc v1.75.0 // indirect
157+
google.golang.org/protobuf v1.36.8 // indirect
81158
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
159+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
82160
gopkg.in/inf.v0 v0.9.1 // indirect
161+
gopkg.in/ini.v1 v1.67.0 // indirect
83162
gopkg.in/yaml.v2 v2.4.0 // indirect
84163
gopkg.in/yaml.v3 v3.0.1 // indirect
85-
k8s.io/api v0.16.16-rc.0 // indirect
86-
k8s.io/apiextensions-apiserver v0.16.16-rc.0 // indirect
87-
k8s.io/apimachinery v0.16.16-rc.0 // indirect
164+
k8s.io/api v0.34.0 // indirect
165+
k8s.io/apiextensions-apiserver v0.34.0 // indirect
166+
k8s.io/apimachinery v0.34.1 // indirect
167+
k8s.io/apiserver v0.34.0 // indirect
168+
k8s.io/cli-runtime v0.34.0 // indirect
169+
k8s.io/client-go v0.34.0 // indirect
170+
k8s.io/code-generator v0.34.0 // indirect
171+
k8s.io/component-base v0.34.0 // indirect
88172
k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9 // indirect
89-
k8s.io/helm v2.14.3+incompatible // indirect
90-
k8s.io/klog v1.0.0 // indirect
91-
k8s.io/klog/v2 v2.60.1 // indirect
92-
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
93-
sigs.k8s.io/controller-tools v0.2.4 // indirect
94-
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
95-
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
96-
sigs.k8s.io/yaml v1.3.0 // indirect
173+
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect
174+
k8s.io/klog v0.2.0 // indirect
175+
k8s.io/klog/v2 v2.130.1 // indirect
176+
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
177+
k8s.io/kubectl v0.34.0 // indirect
178+
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
179+
oras.land/oras-go/v2 v2.6.0 // indirect
180+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
181+
sigs.k8s.io/kustomize/api v0.20.1 // indirect
182+
sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect
183+
sigs.k8s.io/randfill v1.0.0 // indirect
184+
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
185+
sigs.k8s.io/yaml v1.6.0 // indirect
97186
)

0 commit comments

Comments
 (0)