Skip to content

Commit

Permalink
tools: remove unused smoke testing utilities (#6118)
Browse files Browse the repository at this point in the history
This commit removes the unused smoke testing utilities (tools/crow,
tools/smoke) as they have not been maintained or used in ages.
  • Loading branch information
rfratto authored Jan 11, 2024
1 parent bba4a5d commit 951d490
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 773 deletions.
94 changes: 1 addition & 93 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1037,94 +1037,6 @@ volumes:
name: docker
---
kind: pipeline
name: Publish Linux smoke container
platform:
arch: amd64
os: linux
steps:
- commands:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
failure: ignore
image: grafana/agent-build-image:0.30.4
name: Configure QEMU
volumes:
- name: docker
path: /var/run/docker.sock
- commands:
- mkdir -p $HOME/.docker
- printenv GCR_CREDS > $HOME/.docker/config.json
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker buildx create --name multiarch-agent-smoke-${DRONE_COMMIT_SHA} --driver
docker-container --use
- ./tools/ci/docker-containers smoke
- docker buildx rm multiarch-agent-smoke-${DRONE_COMMIT_SHA}
environment:
DOCKER_LOGIN:
from_secret: docker_login
DOCKER_PASSWORD:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/agent-build-image:0.30.4
name: Publish container
volumes:
- name: docker
path: /var/run/docker.sock
trigger:
ref:
- refs/heads/main
- refs/tags/v*
type: docker
volumes:
- host:
path: /var/run/docker.sock
name: docker
---
kind: pipeline
name: Publish Linux crow container
platform:
arch: amd64
os: linux
steps:
- commands:
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
failure: ignore
image: grafana/agent-build-image:0.30.4
name: Configure QEMU
volumes:
- name: docker
path: /var/run/docker.sock
- commands:
- mkdir -p $HOME/.docker
- printenv GCR_CREDS > $HOME/.docker/config.json
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker buildx create --name multiarch-agent-crow-${DRONE_COMMIT_SHA} --driver
docker-container --use
- ./tools/ci/docker-containers crow
- docker buildx rm multiarch-agent-crow-${DRONE_COMMIT_SHA}
environment:
DOCKER_LOGIN:
from_secret: docker_login
DOCKER_PASSWORD:
from_secret: docker_password
GCR_CREDS:
from_secret: gcr_admin
image: grafana/agent-build-image:0.30.4
name: Publish container
volumes:
- name: docker
path: /var/run/docker.sock
trigger:
ref:
- refs/heads/main
- refs/tags/v*
type: docker
volumes:
- host:
path: /var/run/docker.sock
name: docker
---
kind: pipeline
name: Publish Windows agent container
platform:
arch: amd64
Expand Down Expand Up @@ -1187,8 +1099,6 @@ depends_on:
- Publish Linux agent-boringcrypto container
- Publish Linux agentctl container
- Publish Linux agent-operator container
- Publish Linux smoke container
- Publish Linux crow container
image_pull_secrets:
- dockerconfigjson
kind: pipeline
Expand Down Expand Up @@ -1248,8 +1158,6 @@ depends_on:
- Publish Linux agent-boringcrypto container
- Publish Linux agentctl container
- Publish Linux agent-operator container
- Publish Linux smoke container
- Publish Linux crow container
- Publish Windows agent container
- Publish Windows agentctl container
image_pull_secrets:
Expand Down Expand Up @@ -1409,6 +1317,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: c6d9dd05507a2967a2ba394ee5e411e9dff9135335d31881d0d3ee262c7ea63a
hmac: b4b3bb3578124bba1758f323695216281365054c623738d38e51cc37125277ae

...
8 changes: 4 additions & 4 deletions .drone/pipelines/publish.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local ghTokenFilename = '/drone/src/gh-token.txt';
// job_names gets the list of job names for use in depends_on.
local job_names = function(jobs) std.map(function(job) job.name, jobs);

local linux_containers = ['agent','agent-boringcrypto', 'agentctl', 'agent-operator', 'smoke', 'crow'];
local linux_containers = ['agent', 'agent-boringcrypto', 'agentctl', 'agent-operator'];
local linux_containers_jobs = std.map(function(container) (
pipelines.linux('Publish Linux %s container' % container) {
trigger: {
Expand Down Expand Up @@ -163,8 +163,8 @@ linux_containers_jobs + windows_containers_jobs + [
GITHUB_APP_PRIVATE_KEY: secrets.updater_private_key.fromSecret,
},
commands: [
'/usr/bin/github-app-external-token > %s' % ghTokenFilename
]
'/usr/bin/github-app-external-token > %s' % ghTokenFilename,
],
},
{
name: 'Publish release',
Expand All @@ -188,7 +188,7 @@ linux_containers_jobs + windows_containers_jobs + [
VERSION=${DRONE_TAG} RELEASE_DOC_TAG=$(echo ${DRONE_TAG} | awk -F '.' '{print $1"."$2}') ./tools/release
|||,
],
}
},
],
volumes: [{
name: 'docker',
Expand Down
46 changes: 6 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
## agent-service Compiles cmd/grafana-agent-service to $(SERVICE_BINARY)
## agentctl Compiles cmd/grafana-agentctl to $(AGENTCTL_BINARY)
## operator Compiles cmd/grafana-agent-operator to $(OPERATOR_BINARY)
## crow Compiles tools/crow to $(CROW_BINARY)
## smoke Compiles tools/smoke to $(SMOKE_BINARY)
##
## Targets for building Docker images:
##
Expand All @@ -38,8 +36,6 @@
## agent-boringcrypto-image Builds agent Docker image with boringcrypto.
## agentctl-image Builds agentctl Docker image.
## operator-image Builds operator Docker image.
## crow-image Builds crow Docker image.
## smoke-image Builds smoke test Docker image.
##
## Targets for packaging:
##
Expand Down Expand Up @@ -77,17 +73,13 @@
## AGENT_IMAGE Image name:tag built by `make agent-image`
## AGENTCTL_IMAGE Image name:tag built by `make agentctl-image`
## OPERATOR_IMAGE Image name:tag built by `make operator-image`
## CROW_IMAGE Image name:tag built by `make crow-image`
## SMOKE_IMAGE Image name:tag built by `make smoke-image`
## BUILD_IMAGE Image name:tag used by USE_CONTAINER=1
## AGENT_BINARY Output path of `make agent` (default build/grafana-agent)
## AGENT_BORINGCRYPTO_BINARY Output path of `make agent-boringcrypto` (default build/grafana-agent-boringcrypto)
## FLOW_BINARY Output path of `make agent-flow` (default build/grafana-agent-flow)
## SERVICE_BINARY Output path of `make agent-service` (default build/grafana-agent-service)
## AGENTCTL_BINARY Output path of `make agentctl` (default build/grafana-agentctl)
## OPERATOR_BINARY Output path of `make operator` (default build/grafana-agent-operator)
## CROW_BINARY Output path of `make crow` (default build/grafana-agent-crow)
## SMOKE_BINARY Output path of `make smoke` (default build/grafana-agent-smoke)
## GOOS Override OS to build binaries for
## GOARCH Override target architecture to build binaries for
## GOARM Override ARM version (6 or 7) when GOARCH=arm
Expand All @@ -104,16 +96,12 @@ AGENT_IMAGE ?= grafana/agent:latest
AGENT_BORINGCRYPTO_IMAGE ?= grafana/agent-boringcrypto:latest
AGENTCTL_IMAGE ?= grafana/agentctl:latest
OPERATOR_IMAGE ?= grafana/agent-operator:latest
CROW_IMAGE ?= us.gcr.io/kubernetes-dev/grafana/agent-crow:latest
SMOKE_IMAGE ?= us.gcr.io/kubernetes-dev/grafana/agent-smoke:latest
AGENT_BINARY ?= build/grafana-agent
AGENT_BORINGCRYPTO_BINARY ?= build/grafana-agent-boringcrypto
FLOW_BINARY ?= build/grafana-agent-flow
SERVICE_BINARY ?= build/grafana-agent-service
AGENTCTL_BINARY ?= build/grafana-agentctl
OPERATOR_BINARY ?= build/grafana-agent-operator
CROW_BINARY ?= build/agent-crow
SMOKE_BINARY ?= build/agent-smoke
AGENTLINT_BINARY ?= build/agentlint
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
Expand All @@ -125,10 +113,10 @@ GOEXPERIMENT ?= $(shell go env GOEXPERIMENT)
# List of all environment variables which will propagate to the build
# container. USE_CONTAINER must _not_ be included to avoid infinite recursion.
PROPAGATE_VARS := \
AGENT_IMAGE AGENTCTL_IMAGE OPERATOR_IMAGE CROW_IMAGE SMOKE_IMAGE \
AGENT_IMAGE AGENTCTL_IMAGE OPERATOR_IMAGE \
BUILD_IMAGE GOOS GOARCH GOARM CGO_ENABLED RELEASE_BUILD \
AGENT_BINARY AGENT_BORINGCRYPTO_BINARY FLOW_BINARY AGENTCTL_BINARY OPERATOR_BINARY \
CROW_BINARY SMOKE_BINARY VERSION GO_TAGS GOEXPERIMENT
VERSION GO_TAGS GOEXPERIMENT

#
# Constants for targets
Expand Down Expand Up @@ -187,8 +175,8 @@ integration-test:
# Targets for building binaries
#

.PHONY: binaries agent agent-boringcrypto agent-flow agentctl operator crow smoke
binaries: agent agent-boringcrypto agent-flow agentctl operator crow smoke
.PHONY: binaries agent agent-boringcrypto agent-flow agentctl operator
binaries: agent agent-boringcrypto agent-flow agentctl operator

agent:
ifeq ($(USE_CONTAINER),1)
Expand Down Expand Up @@ -234,20 +222,6 @@ else
$(GO_ENV) go build $(GO_FLAGS) -o $(OPERATOR_BINARY) ./cmd/grafana-agent-operator
endif

crow:
ifeq ($(USE_CONTAINER),1)
$(RERUN_IN_CONTAINER)
else
$(GO_ENV) go build $(GO_FLAGS) -o $(CROW_BINARY) ./tools/crow
endif

smoke:
ifeq ($(USE_CONTAINER),1)
$(RERUN_IN_CONTAINER)
else
$(GO_ENV) go build $(GO_FLAGS) -o $(SMOKE_BINARY) ./tools/smoke
endif

agentlint:
ifeq ($(USE_CONTAINER),1)
$(RERUN_IN_CONTAINER)
Expand All @@ -265,8 +239,8 @@ ifneq ($(DOCKER_PLATFORM),)
DOCKER_FLAGS += --platform=$(DOCKER_PLATFORM)
endif

.PHONY: images agent-image agentctl-image operator-image crow-image smoke-image
images: agent-image agentctl-image operator-image crow-image smoke-image
.PHONY: images agent-image agentctl-image operator-image
images: agent-image agentctl-image operator-image

agent-image:
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) -t $(AGENT_IMAGE) -f cmd/grafana-agent/Dockerfile .
Expand All @@ -276,10 +250,6 @@ agent-boringcrypto-image:
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) --build-arg GOEXPERIMENT=boringcrypto -t $(AGENT_BORINGCRYPTO_IMAGE) -f cmd/grafana-agent/Dockerfile .
operator-image:
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) -t $(OPERATOR_IMAGE) -f cmd/grafana-agent-operator/Dockerfile .
crow-image:
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) -t $(CROW_IMAGE) -f tools/crow/Dockerfile .
smoke-image:
DOCKER_BUILDKIT=1 docker build $(DOCKER_FLAGS) -t $(SMOKE_IMAGE) -f tools/smoke/Dockerfile .

#
# Targets for generating assets
Expand Down Expand Up @@ -373,14 +343,10 @@ info:
@printf "AGENT_IMAGE = $(AGENT_IMAGE)\n"
@printf "AGENTCTL_IMAGE = $(AGENTCTL_IMAGE)\n"
@printf "OPERATOR_IMAGE = $(OPERATOR_IMAGE)\n"
@printf "CROW_IMAGE = $(CROW_IMAGE)\n"
@printf "SMOKE_IMAGE = $(SMOKE_IMAGE)\n"
@printf "BUILD_IMAGE = $(BUILD_IMAGE)\n"
@printf "AGENT_BINARY = $(AGENT_BINARY)\n"
@printf "AGENTCTL_BINARY = $(AGENTCTL_BINARY)\n"
@printf "OPERATOR_BINARY = $(OPERATOR_BINARY)\n"
@printf "CROW_BINARY = $(CROW_BINARY)\n"
@printf "SMOKE_BINARY = $(SMOKE_BINARY)\n"
@printf "GOOS = $(GOOS)\n"
@printf "GOARCH = $(GOARCH)\n"
@printf "GOARM = $(GOARM)\n"
Expand Down
1 change: 0 additions & 1 deletion tools/crow/.gitignore

This file was deleted.

39 changes: 0 additions & 39 deletions tools/crow/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions tools/crow/README.md

This file was deleted.

Loading

0 comments on commit 951d490

Please sign in to comment.