Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate main builds from gcr to dockerhub #3876

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,18 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.22.11
- uses: actions/setup-node@v3
with:
node-version: lts/hydrogen
cache: yarn
- name: Login to GCR
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: us.gcr.io
username: _json_key
password: ${{ secrets.GCR_JSON_KEY }}
- name: Pyroscope Build & push multi-arch image
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pyroscope Build & push multi-arch image # todo make it multi-arch
id: build-push
run: |
make docker-image/pyroscope/push docker-image/pyroscope/push-debug "BUILDX_ARGS=--cache-from=type=gha --cache-to=type=gha"

deploy-dev-001:
if: github.event_name == 'push' && github.repository == 'grafana/pyroscope'
if: github.event_name == 'push' && github.repository == 'grafana/pyroscope' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [build-push]
steps:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ GOPRIVATE=github.com/grafana/frostdb

# Boiler plate for building Docker containers.
# All this must go at top of file I'm afraid.
IMAGE_PREFIX ?= us.gcr.io/kubernetes-dev/
IMAGE_PREFIX ?= grafana/

IMAGE_TAG ?= $(shell ./tools/image-tag)
GIT_REVISION := $(shell git rev-parse --short HEAD)
Expand Down Expand Up @@ -197,7 +197,7 @@ check/go/mod: go/mod


define docker_buildx
docker buildx build $(1) --platform $(IMAGE_PLATFORM) $(BUILDX_ARGS) --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(2)latest -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(2)$(IMAGE_TAG) -f cmd/$(shell basename $(@D))/$(2)Dockerfile .
docker buildx build $(1) --platform $(IMAGE_PLATFORM) $(BUILDX_ARGS) --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_PREFIX)$(shell basename $(@D)):$(2)$(IMAGE_TAG) -f cmd/$(shell basename $(@D))/$(2)Dockerfile .
endef

define deploy
Expand Down
2 changes: 1 addition & 1 deletion docs/internal/contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ replace `image: grafana/pyroscope` with the local tag name you got from docker-i

```
pyroscope:
image: us.gcr.io/kubernetes-dev/pyroscope:main-470125e1-WIP
image: grafana/pyroscope:main-470125e1-WIP
ports:
- '4040:4040'
```
Expand Down
Loading