-
Notifications
You must be signed in to change notification settings - Fork 12
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
Kbauer/use dockerized ocb #161
Closed
Closed
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1e34b34
chore: migrate to docker-based ocb
kb-newrelic 038b92d
fix: upgrade to 0.112.0 to skip ocb image workaround
kb-newrelic 210f5bf
fix: create build dir from container
kb-newrelic d28a622
fix: grant container write permission to build dir
kb-newrelic dec0af5
fix: chown of output dir if ci
kb-newrelic 15f23b0
chore: auto-detect ci environment
kb-newrelic ea401f8
fix: ensure access to build output to next steps
kb-newrelic fcbc65b
fix: delete output dir if already exists
kb-newrelic cfa74f7
chore: make build targets lazy
kb-newrelic ddc3d60
ci: output licence diff on failure
kb-newrelic c4eeb95
ci: add dummy ci target back
kb-newrelic 3b650b9
fix: update license summary #2
kb-newrelic 8598a7f
fix: make build depend on manifest
kb-newrelic f47412f
fix: update third_party_notice text
kb-newrelic 7cf989c
fix: output go.mod file on failure
kb-newrelic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,9 @@ | ||
GO ?= go | ||
GORELEASER ?= goreleaser | ||
|
||
OTELCOL_BUILDER_VERSION ?= 0.108.0 | ||
OTELCOL_BUILDER_DIR ?= ${HOME}/bin | ||
OTELCOL_BUILDER ?= ${OTELCOL_BUILDER_DIR}/ocb | ||
|
||
DISTRIBUTIONS ?= "nr-otel-collector" | ||
|
||
ci: build | ||
|
||
build: go ocb | ||
@./scripts/build.sh -d "${DISTRIBUTIONS}" -b ${OTELCOL_BUILDER} -g ${GO} | ||
|
||
generate: generate-sources | ||
|
||
generate-sources: go ocb | ||
@./scripts/build.sh -d "${DISTRIBUTIONS}" -s true -b ${OTELCOL_BUILDER} -g ${GO} | ||
|
||
goreleaser-verify: goreleaser | ||
@${GORELEASER} release --snapshot --rm-dist | ||
|
||
.PHONY: ocb | ||
ocb: | ||
ifeq (, $(shell command -v ocb 2>/dev/null)) | ||
@{ \ | ||
[ ! -x '$(OTELCOL_BUILDER)' ] || exit 0; \ | ||
set -e ;\ | ||
os=$$(uname | tr A-Z a-z) ;\ | ||
machine=$$(uname -m) ;\ | ||
[ "$${machine}" != x86 ] || machine=386 ;\ | ||
[ "$${machine}" != x86_64 ] || machine=amd64 ;\ | ||
[ "$${machine}" != aarch64 ] || machine=arm64 ;\ | ||
echo "Installing ocb ($${os}/$${machine}) at $(OTELCOL_BUILDER_DIR)";\ | ||
mkdir -p $(OTELCOL_BUILDER_DIR) ;\ | ||
curl -sLo $(OTELCOL_BUILDER) "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/cmd%2Fbuilder%2Fv$(OTELCOL_BUILDER_VERSION)/ocb_$(OTELCOL_BUILDER_VERSION)_$${os}_$${machine}" ;\ | ||
chmod +x $(OTELCOL_BUILDER) ;\ | ||
} | ||
else | ||
OTELCOL_BUILDER=$(shell command -v ocb) | ||
endif | ||
|
||
.PHONY: go | ||
go: | ||
@{ \ | ||
if ! command -v '$(GO)' >/dev/null 2>/dev/null; then \ | ||
echo >&2 '$(GO) command not found. Please install golang. https://go.dev/doc/install'; \ | ||
exit 1; \ | ||
fi \ | ||
} | ||
build: | ||
@./scripts/build.sh -d "${DISTRIBUTIONS}" | ||
|
||
.PHONY: goreleaser | ||
goreleaser: | ||
@{ \ | ||
if ! command -v '$(GORELEASER)' >/dev/null 2>/dev/null; then \ | ||
echo >&2 '$(GORELEASER) command not found. Please install goreleaser. https://goreleaser.com/install/'; \ | ||
exit 1; \ | ||
fi \ | ||
} | ||
generate-sources: | ||
@./scripts/build.sh -d "${DISTRIBUTIONS}" -s true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: figure out where discrepancy between local machine and CI comes from (build is failing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.