Skip to content

Commit

Permalink
build: Config changes for new organization
Browse files Browse the repository at this point in the history
Signed-off-by: mahendrapaipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Nov 17, 2023
1 parent 4555c36 commit c41a115
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ go.work
# Ignore fixtures
collector/fixtures/sys

# Ignore binary
**/*batchjob_exporter

# Ignore scripts
run.sh

Expand All @@ -34,3 +31,6 @@ run.sh
/.deps
/.release
/.tarballs

# Ignore binaries
/bin
1 change: 1 addition & 0 deletions .promu-cgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repository:
build:
binaries:
- name: batchjob_exporter
path: ./cmd/batchjob_exporter
flags: -a -tags 'netgo osusergo static_build'
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
Expand Down
1 change: 1 addition & 0 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ repository:
build:
binaries:
- name: batchjob_exporter
path: ./cmd/batchjob_exporter
flags: -a -tags 'netgo osusergo static_build'
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PROMTOOL_VERSION ?= 2.30.0
PROMTOOL_URL ?= https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM).tar.gz
PROMTOOL ?= $(FIRST_GOPATH)/bin/promtool

PREFIX := $(shell pwd)/bin

TEST_DOCKER ?= false
DOCKER_IMAGE_NAME ?= batchjob-exporter
MACH ?= $(shell uname -m)
Expand Down Expand Up @@ -101,17 +103,17 @@ skip-test-32bit:
%/.unpacked: %.ttar
@echo ">> extracting fixtures"
if [ -d $(dir $@) ] ; then rm -rf $(dir $@) ; fi
./ttar -C $(dir $*) -x -f $*.ttar
./scripts/ttar -C $(dir $*) -x -f $*.ttar
touch $@

update_fixtures:
rm -vf collector/fixtures/sys/.unpacked
./ttar -C collector/fixtures -c -f collector/fixtures/sys.ttar sys
./scripts/ttar -C collector/fixtures -c -f collector/fixtures/sys.ttar sys

.PHONY: test-e2e
test-e2e: build collector/fixtures/sys/.unpacked
@echo ">> running end-to-end tests"
./e2e-test.sh
./scripts/e2e-test.sh

.PHONY: skip-test-e2e
skip-test-e2e:
Expand All @@ -120,7 +122,7 @@ skip-test-e2e:
.PHONY: checkmetrics
checkmetrics: $(PROMTOOL)
@echo ">> checking metrics for correctness"
./checkmetrics.sh $(PROMTOOL) $(e2e-out)
./scripts/checkmetrics.sh $(PROMTOOL) $(e2e-out)

.PHONY: checkrules
checkrules: $(PROMTOOL)
Expand All @@ -130,7 +132,7 @@ checkrules: $(PROMTOOL)
.PHONY: test-docker
test-docker:
@echo ">> testing docker image"
./test_image.sh "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-amd64:$(DOCKER_IMAGE_TAG)" 9010
./scripts/test_image.sh "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-amd64:$(DOCKER_IMAGE_TAG)" 9010

.PHONY: skip-test-docker
skip-test-docker:
Expand Down

0 comments on commit c41a115

Please sign in to comment.