Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed Jul 11, 2021
1 parent c27a8ff commit 06d8e36
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
13 changes: 1 addition & 12 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,6 @@ steps:
- export PATH="$(go env GOPATH)/bin:$PATH"
- RELEASE_TAG=$DRONE_TAG
- make -j4 BUILD_IN_CONTAINER=false RELEASE_BUILD=true RELEASE_TAG=$RELEASE_TAG publish
# - name: publish
# image: plugins/github-release
# environment:
# GITHUB_KEY:
# from_secret: GITHUB_KEY
# settings:
# api_key: $GITHUB_KEY
# files: /drone/src/dist/*
# draft: true
# when:
# event: tag

volumes:
- name: docker
Expand Down Expand Up @@ -124,6 +113,6 @@ volumes:
path: /var/run/docker.sock
---
kind: signature
hmac: c5433753ba699c6e9472f59cfc9346c61387951408edd05372d6396557ac2c54
hmac: dc1bd2e973ceede26c6b1eb745e2baf5d46d4d09ea2ab610403dc580b4eb1bbf

...
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ SHELL = /usr/bin/env bash
#############

# Docker image info
IMAGE_PREFIX ?= mrdgrafana
IMAGE_PREFIX ?= grafana
IMAGE_TAG ?= $(shell ./tools/image-tag)
TARGETPLATFORM ?= normal

# Setting CROSS_BUILD=true enables cross-compiling `agent` and `agentctl` for
# different architectures. When true, docker buildx is used instead of docker,
# and seego is used for building binaries instead of go.
# If using CROSS_BUILD the preferred method is to use
# `drone exec --trusted --pipeline <name_of_pipeline> ./.drone/drona.yaml` from the root directory
CROSS_BUILD ?= true

# Certain aspects of the build are done in containers for consistency.
Expand Down Expand Up @@ -111,10 +113,9 @@ all: protos agent agentctl
agent: cmd/agent/agent
agentctl: cmd/agentctl/agentctl

# TargetPlatform is set by the buildx

cmd/agent/agent: cmd/agent/main.go
@echo $(TARGETPLATFORM)
@echo $(IMAGE_TAG)
@echo $(RELEASE_BUILD)
ifeq ($(TARGETPLATFORM),normal)
export CGO_ENABLED=1 GO111MODULE=auto; go build $(CGO_FLAGS) -o $@ ./$(@D)
endif
Expand Down Expand Up @@ -197,6 +198,7 @@ example-dashboards:
#
# We use rfratto/seego as a base for building these cross-platform images.
# seego provides a docker image with gcc toolchains for all of these platforms.
# OSXCROSS_PATH is set by the seego docker container
#
# A custom grafana/agent/seego image is built on top of the base image with
# specific overrides. grafana/agent/seego is not pushed to Docker Hub and
Expand Down Expand Up @@ -371,4 +373,11 @@ clean-dist:
.PHONY: clean

publish: dist
./tools/release
./tools/release

# Drone signs the yaml, you will need to specify DRONE_TOKEN, which can be found by logging into your profile in drone
.PHONY: drone
drone:
drone lint .drone/drone.yml --trusted
drone --server https://drone.grafana.net sign --save grafana/agent .drone/drone.yml

0 comments on commit 06d8e36

Please sign in to comment.