Skip to content

Commit 4063a46

Browse files
jpkrohlingBogdan Drutubogdandrutujoe-elliottjiwen624
authored
Move opentelemetry-collector-builder to core (#4286)
* Initial commit * Add CODEOWNERS file (#2) * Add CODEOWNERS file * Update CODEOWNERS * Moved from github.com/observatorium/opentelemetry-collector-builder (#3) Signed-off-by: Juraci Paixão Kröhling <[email protected]> * fixed panics (#6) Signed-off-by: Joe Elliott <[email protected]> * Replace master with main in CI and mergify files (#8) Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Bump to OpenTelemetry Collector 0.20.0 (#10) Closes #9 Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Explicitly enable Go modules in quickstart instructions (#13) * Update to collector v0.21.0 (#17) Fixes #16 Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Update to collector v0.22.0 (#19) * Download go modules before building (#20) Fixes #14 * Add version command (#25) Signed-off-by: Ashmita Bohara <[email protected]> * Pass errors from cobra Execute back to main for correct exit code (#28) * pass errors from cobra execute back to main * print the error * Update to collector v0.23.0 (#27) * Generate a warning if the builder and collector base version mismatch (#30) * Generate a warning if the builder and collector base version mismatch * Show current default version in the warning message * Update to OpenTelemetry Collector 0.24.0 * Don't use %w formatting with log.Fatal (#35) * Update to OpenTelemetry Collector 0.25.0 (#36) Signed-off-by: Serge Catudal <[email protected]> * Update to 0.26.0 and update BuildInfo (#39) * Sync build and CI Go versions at latest 1.16 (#34) * Sync build and CI Go versions at latest 1.16 * Run go mod tidy * Set go binary to use in the compilation phase in tests Signed-off-by: Juraci Paixão Kröhling <[email protected]> Co-authored-by: Juraci Paixão Kröhling <[email protected]> * Add option to generate go code only (no compile) (#40) * Issue#24 Add option to generate go code only (no compile) * Update cmd/root.go logging Suggested by @jpkkrohling Co-authored-by: Juraci Paixão Kröhling <[email protected]> * remove verbose help .. created by corba * suggestion by jpkrohling to keep generateandcompile * lint error: remove unused var * reword cmd option and add back help message for default Co-authored-by: Juraci Paixão Kröhling <[email protected]> * Don't reuse exec.Cmd (#42) * Update to OpenTelemetry Collector 0.27.0 (#43) * Add CI Badge (#47) * Update to Collector v0.28.0 (#49) * Update to Collector v0.28.0 Closes #48 Addresses the breaking API change in #3163, besides the usual version number changes. Signed-off-by: Fangyi Zhou <[email protected]> * Use `go mod tidy` instead of `go mod download` It appears that this magically resolves the go.mod file issue. https://stackoverflow.com/questions/67203641/missing-go-sum-entry-for-module-providing-package-package-name Signed-off-by: Fangyi Zhou <[email protected]> * Account for go mod download in go1.17 not updating go.sum (#50) * Update to collector v0.29.0 (#54) * Update replaces.builder.yaml * Update nocore.builder.yaml * Update config.go * Update README.md * Update main.go * Update to collector v0.30.0 (#57) * cmd: fix module flag default value to github.com/open-telemetry (#58) Signed-off-by: Koichi Shiraishi <[email protected]> * Update to collector v0.31.0 (#60) * Update to v0.33.0 (#62) Signed-off-by: Anthony J Mirabella <[email protected]> * Add excludes support to generated go.mod (#63) Signed-off-by: Anthony J Mirabella <[email protected]> Co-authored-by: Juraci Paixão Kröhling <[email protected]> * Small cleanup for the builder files (#64) Signed-off-by: Bogdan Drutu <[email protected]> * Support building with Go 1.17 (#66) * Support building with Go 1.17 Fixes #65 Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Update workflows to use Go 1.17 Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Add gosec exceptions for exec.Command Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Update to OpenTelemetry core 0.34.0 (#68) Fixes #67 Signed-off-by: Juraci Paixão Kröhling <[email protected]> * Upgrade to OpenTelemetry Collector 0.35.0 (#70) Signed-off-by: Fangyi Zhou <[email protected]> * Upgrade to OpenTelemetry Collector 0.36.0 (#76) * Generate custom service code for Windows (#75) * update main to include windows service code * use main version from tag 0.35.0 * update main function * align with upstream v0.36.0 tag * dummy change to trigger build * Revert "dummy change to trigger build" This reverts commit 629d499461da2d2c240bf1e495b5fe0558e3547f. * Remove Core from Module type (#77) Fixes #15 Signed-off-by: yugo-horie <[email protected]> * release 0.37.0 (#78) * release 0.37.0 * update use of NewCommand * Move builder to subdirectory Signed-off-by: Juraci Paixão Kröhling <[email protected]> Co-authored-by: Bogdan Drutu <[email protected]> Co-authored-by: Bogdan Drutu <[email protected]> Co-authored-by: Joe Elliott <[email protected]> Co-authored-by: Eric Yang <[email protected]> Co-authored-by: Brian Gibbins <[email protected]> Co-authored-by: Ashmita <[email protected]> Co-authored-by: Fangyi Zhou <[email protected]> Co-authored-by: Shaun Creary <[email protected]> Co-authored-by: Patryk Małek <[email protected]> Co-authored-by: Serge Catudal <[email protected]> Co-authored-by: Aaron Stone <[email protected]> Co-authored-by: Patryk Małek <[email protected]> Co-authored-by: Aaron Stone <[email protected]> Co-authored-by: Kelvin Lo <[email protected]> Co-authored-by: Himanshu <[email protected]> Co-authored-by: Y.Horie <[email protected]> Co-authored-by: Koichi Shiraishi <[email protected]> Co-authored-by: Anthony Mirabella <[email protected]> Co-authored-by: Cal Loomis <[email protected]> Co-authored-by: alrex <[email protected]>
1 parent 5abd73a commit 4063a46

28 files changed

+2063
-0
lines changed

builder/.github/CODEOWNERS

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#####################################################
2+
#
3+
# List of approvers for OpenTelemetry Collector Builder
4+
#
5+
#####################################################
6+
#
7+
# Learn about membership in OpenTelemetry community:
8+
# https://github.com/open-telemetry/community/blob/master/community-membership.md
9+
#
10+
#
11+
# Learn about CODEOWNERS file format:
12+
# https://help.github.com/en/articles/about-code-owners
13+
#
14+
15+
* @open-telemetry/collector-approvers @open-telemetry/collector-builder-approvers

builder/.github/mergify.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pull_request_rules:
2+
- name: remove outdated reviews
3+
conditions:
4+
- base=main
5+
actions:
6+
dismiss_reviews: {}
7+
8+
- name: Automatic merge when all checks pass and the PR is approved
9+
conditions:
10+
- "#approved-reviews-by>=1"
11+
- "-draft"
12+
- "status-success=Unit tests"
13+
- "status-success=Code standards (linting)"
14+
- "status-success=Security"
15+
- "status-success=Integration test"
16+
actions:
17+
merge:
18+
method: squash
19+
commit_message: title+body

builder/.github/workflows/go.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
unit-tests:
11+
name: Unit tests
12+
runs-on: ubuntu-20.04
13+
steps:
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: 1.17
19+
20+
- name: Check out code into the Go module directory
21+
uses: actions/checkout@v2
22+
23+
- name: Test
24+
run: go test -v ./...
25+
26+
lint:
27+
name: Code standards (linting)
28+
runs-on: ubuntu-20.04
29+
steps:
30+
- name: Check out code into the Go module directory
31+
uses: actions/checkout@v2
32+
33+
- name: Lint
34+
uses: golangci/golangci-lint-action@v2
35+
with:
36+
version: v1.29
37+
args: --enable=gosec,maligned,misspell
38+
only-new-issues: true
39+
40+
security:
41+
name: Security
42+
runs-on: ubuntu-20.04
43+
steps:
44+
- name: Check out code into the Go module directory
45+
uses: actions/checkout@v2
46+
47+
- name: Initialize CodeQL
48+
uses: github/codeql-action/init@v1
49+
with:
50+
languages: go
51+
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
54+
55+
- name: Perform CodeQL Analysis
56+
uses: github/codeql-action/analyze@v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Integration tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
integration-test:
11+
name: Integration test
12+
runs-on: ubuntu-20.04
13+
steps:
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: 1.17
19+
20+
- name: Check out code into the Go module directory
21+
uses: actions/checkout@v2
22+
23+
- name: Test
24+
run: ./test/test.sh

builder/.github/workflows/release.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
-
13+
name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
-
18+
name: Set up Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: 1.17
22+
-
23+
name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v2
25+
with:
26+
version: latest
27+
args: release --rm-dist
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

builder/.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/go,vscode
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=go,vscode
4+
5+
### Go ###
6+
# Binaries for programs and plugins
7+
*.exe
8+
*.exe~
9+
*.dll
10+
*.so
11+
*.dylib
12+
13+
# Test binary, built with `go test -c`
14+
*.test
15+
16+
# Output of the go coverage tool, specifically when used with LiteIDE
17+
*.out
18+
19+
# Dependency directories (remove the comment below to include it)
20+
# vendor/
21+
22+
### Go Patch ###
23+
/vendor/
24+
/Godeps/
25+
26+
### vscode ###
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
*.code-workspace
33+
34+
### goland ###
35+
.idea
36+
37+
# End of https://www.toptal.com/developers/gitignore/api/go,vscode
38+
39+
/dist/
40+
opentelemetry-collector-builder

builder/.golangci.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# all available settings of specific linters
2+
linters-settings:
3+
goheader:
4+
template-path: header.txt
5+
goimports:
6+
local-prefixes: github.com/open-telemetry/opentelemetry-collector-builder
7+
maligned:
8+
suggest-new: true
9+
misspell:
10+
locale: US
11+
12+
linters:
13+
enable:
14+
- goheader
15+
- goimports
16+
- maligned
17+
- misspell
18+
- gosec

builder/.goreleaser.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
before:
2+
hooks:
3+
- go mod download
4+
builds:
5+
- flags:
6+
- -trimpath
7+
ldflags:
8+
- -s -w -X github.com/open-telemetry/opentelemetry-collector-builder/cmd.version={{.Version}} -X github.com/open-telemetry/opentelemetry-collector-builder/cmd.date={{.Date}}
9+
env:
10+
- CGO_ENABLED=0
11+
goos:
12+
- linux
13+
- windows
14+
- darwin
15+
goarch:
16+
- amd64
17+
- arm
18+
- arm64
19+
goarm:
20+
- 6
21+
- 7
22+
archives:
23+
- format: binary
24+
checksum:
25+
name_template: "checksums.txt"
26+
snapshot:
27+
name_template: "{{ .Tag }}-next"
28+
changelog:
29+
sort: asc
30+
filters:
31+
exclude:
32+
- "^docs:"
33+
- "^test:"

0 commit comments

Comments
 (0)