Skip to content

Commit

Permalink
Change otelcontribcol and oteltestbedcol to use the builder (open-tel…
Browse files Browse the repository at this point in the history
…emetry#16828)

Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Jan 26, 2023
1 parent e33aa6d commit 939107a
Show file tree
Hide file tree
Showing 29 changed files with 2,103 additions and 1,044 deletions.
11 changes: 11 additions & 0 deletions .chloggen/oteltestbedcol.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: cmd/otelcontribcol

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change otelcontribcol and oteltestbedcol to use the builder

# One or more tracking issues related to the change
issues: [11867]
8 changes: 8 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ jobs:
run: |
make gotidy
git diff --exit-code || (echo 'go.mod/go.sum deps changes detected, please run "make gotidy" and commit the changes in this PR.' && exit 1)
- name: Gen genotelcontribcol
run: |
make genotelcontribcol
git diff -s --exit-code || (echo 'Generated code is out of date, please run "make genotelcontribcol" and commit the changes in this PR.' && exit 1)
- name: Gen genoteltestbedcol
run: |
make genoteltestbedcol
git diff -s --exit-code || (echo 'Generated code is out of date, please run "make genoteltestbedcol" and commit the changes in this PR.' && exit 1)
- name: CodeGen
run: |
make -j2 generate
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,22 @@ chlog-preview: $(CHLOGGEN)
chlog-update: $(CHLOGGEN)
$(CHLOGGEN) update --version $(VERSION)

.PHONY: genotelcontribcol
genotelcontribcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config.yaml --output-path cmd/otelcontribcol
$(MAKE) -C cmd/otelcontribcol fmt

# Build the Collector executable.
.PHONY: otelcontribcol
otelcontribcol:
cd ./cmd/otelcontribcol && GO111MODULE=on CGO_ENABLED=0 $(GOCMD) build -trimpath -o ../../bin/otelcontribcol_$(GOOS)_$(GOARCH)$(EXTENSION) \
$(BUILD_INFO) -tags $(GO_BUILD_TAGS) .

.PHONY: genoteltestbedcol
genoteltestbedcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config.yaml --output-path cmd/oteltestbedcol
$(MAKE) -C cmd/oteltestbedcol fmt

# Build the Collector executable, with only components used in testbed.
.PHONY: oteltestbedcol
oteltestbedcol:
Expand Down
1 change: 1 addition & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ PORTO := $(TOOLS_BIN_DIR)/porto
CHECKDOC := $(TOOLS_BIN_DIR)/checkdoc
CROSSLINK := $(TOOLS_BIN_DIR)/crosslink
GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report
BUILDER := $(TOOLS_BIN_DIR)/builder

# BUILD_TYPE should be one of (dev, release).
BUILD_TYPE?=release
Expand Down
366 changes: 366 additions & 0 deletions cmd/otelcontribcol/builder-config.yaml

Large diffs are not rendered by default.

357 changes: 357 additions & 0 deletions cmd/otelcontribcol/components.go

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions cmd/otelcontribcol/components_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

762 changes: 376 additions & 386 deletions cmd/otelcontribcol/go.mod

Large diffs are not rendered by default.

141 changes: 20 additions & 121 deletions cmd/otelcontribcol/go.sum

Large diffs are not rendered by default.

49 changes: 29 additions & 20 deletions cmd/otelcontribcol/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions cmd/otelcontribcol/main_others.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 939107a

Please sign in to comment.