@@ -107,8 +107,8 @@ frontend/build:
107
107
108
108
.PHONY : frontend/shell
109
109
frontend/shell :
110
- docker build -f cmd/pyroscope/frontend.Dockerfile --iidfile .docker-image-id -frontend --target builder .
111
- docker run -t -i $$(cat .docker-image-id -frontend ) /bin/bash
110
+ docker build -f cmd/pyroscope/frontend.Dockerfile --iidfile .docker-image-digest -frontend --target builder .
111
+ docker run -t -i $$(cat .docker-image-digest -frontend ) /bin/bash
112
112
113
113
.PHONY : profilecli/build
114
114
profilecli/build : go/bin-profilecli # # Build the profilecli binary
@@ -224,7 +224,7 @@ define deploy
224
224
$(BIN ) /helm upgrade --install $(1 ) ./operations/pyroscope/helm/pyroscope $(2 ) $(HELM_ARGS ) \
225
225
--set pyroscope.image.tag=$(IMAGE_TAG ) \
226
226
--set pyroscope.image.repository=$(IMAGE_PREFIX ) pyroscope \
227
- --set pyroscope.podAnnotations.image-id =$(shell cat .docker-image-id -pyroscope) \
227
+ --set pyroscope.podAnnotations.image-digest =$(shell cat .docker-image-digest -pyroscope) \
228
228
--set pyroscope.service.port_name=http-metrics \
229
229
--set pyroscope.podAnnotations."profiles\.grafana\.com\/memory\.port_name"=http-metrics \
230
230
--set pyroscope.podAnnotations."profiles\.grafana\.com\/cpu\.port_name"=http-metrics \
@@ -249,6 +249,8 @@ define multiarch_build
249
249
GOOS=linux GOARCH=amd64 IMAGE_TAG="$(IMAGE_TAG ) -amd64" $(MAKE ) $(build_cmd ) IMAGE_PLATFORM=linux/amd64
250
250
251
251
$(if $(push_image ) , docker buildx imagetools create --tag "$(image_name ) " "$(image_name ) -amd64" "$(image_name ) -arm64")
252
+ $(if $(push_image ) , docker buildx imagetools inspect "$(image_name ) " --format "{{json .Manifest.Digest}}" | tr -d '"' > .docker-image-digest-pyroscope)
253
+ $(if $(push_image ) , echo "$(image_name ) " > .docker-image-name-pyroscope)
252
254
endef
253
255
254
256
.PHONY : docker-image/pyroscope/build-multiarch
@@ -277,7 +279,7 @@ docker-image/pyroscope/push-debug: frontend/build go/bin-debug docker-image/pyro
277
279
278
280
.PHONY : docker-image/pyroscope/build
279
281
docker-image/pyroscope/build : frontend/build go/bin
280
- $(call docker_buildx,--load --iidfile .docker-image-id -pyroscope,)
282
+ $(call docker_buildx,--load --iidfile .docker-image-digest -pyroscope,)
281
283
282
284
.PHONY : docker-image/pyroscope/push
283
285
docker-image/pyroscope/push : frontend/build go/bin
@@ -291,46 +293,6 @@ docker-image/pyroscope/dlv:
291
293
GOPATH=
$(CURDIR ) /.tmp GOAMD64=v2 CGO_ENABLED=0
$(GO ) install -ldflags
" -s -w -extldflags '-static'" github.com/go-delve/delve/cmd/
[email protected]
292
294
mv $(CURDIR ) /.tmp/bin/$(GOOS ) _$(GOARCH ) /dlv $(CURDIR ) /.tmp/bin/dlv
293
295
294
- define UPDATER_CONFIG_JSON
295
- {
296
- "git_author_name": "grafana-pyroscope-bot[bot]",
297
- "git_author_email": "140177480+grafana-pyroscope-bot[bot]@users.noreply.github.com",
298
- "git_committer_name": "grafana-pyroscope-bot[bot]",
299
- "git_committer_email": "140177480+grafana-pyroscope-bot[bot]@users.noreply.github.com",
300
- "pull_request_enabled": true,
301
- "pull_request_branch_prefix": "auto-merge/grafana-pyroscope-bot",
302
- "repo_name": "deployment_tools",
303
- "destination_branch": "master",
304
- "update_jsonnet_attribute_configs": [
305
- {
306
- "file_path": "ksonnet/lib/pyroscope/releases/dev/images.libsonnet",
307
- "jsonnet_key": "pyroscope",
308
- "jsonnet_value": "$(IMAGE_PREFIX ) pyroscope:$(IMAGE_TAG ) "
309
- }
310
- ],
311
- "update_jsonnet_lib_configs": [
312
- {
313
- "jsonnet_dir": "ksonnet/lib/pyroscope/releases/dev",
314
- "dependencies": [
315
- {
316
- "owner": "grafana",
317
- "name": "pyroscope",
318
- "version": "$(GIT_REVISION ) ",
319
- "sub_dirs": [
320
- "operations/pyroscope"
321
- ]
322
- }
323
- ]
324
- }
325
- ]
326
- }
327
- endef
328
-
329
- .PHONY : docker-image/pyroscope/deploy-dev-001
330
- docker-image/pyroscope/deploy-dev-001 : export CONFIG_JSON:=$(call UPDATER_CONFIG_JSON)
331
- docker-image/pyroscope/deploy-dev-001 : $(BIN ) /updater $(BIN ) /jb
332
- PATH=$(BIN ) :$(PATH ) $(BIN ) /updater
333
-
334
296
.PHONY : clean
335
297
clean : # # Delete intermediate build artifacts
336
298
@# -X only removes untracked files, -d recurses into directories, -f actually removes files/dirs
@@ -406,10 +368,6 @@ $(BIN)/mockery: Makefile go.mod
406
368
@mkdir -p $(@D )
407
369
GOBIN=
$(abspath $(@D ) ) $(GO ) install github.com/vektra/mockery/
[email protected]
408
370
409
- $(BIN ) /updater : Makefile
410
- @mkdir -p $(@D )
411
- GOBIN=$(abspath $(@D ) ) GOPRIVATE=github.com/grafana/deployment_tools $(GO ) install github.com/grafana/deployment_tools/docker/updater/cmd/updater@bd5794b4e488
412
-
413
371
# Note: When updating the goreleaser version also update .github/workflow/release.yml and .git/workflow/weekly-release.yaml
414
372
$(BIN ) /goreleaser : Makefile go.mod
415
373
@mkdir -p $(@D )
0 commit comments