Skip to content
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

Macos CGO enabled distribution #625

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/base-ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GOARCH: arm
- GOOS: windows
GOARCH: s390x
runs-on: ubuntu-22.04
runs-on: ${{ fromJSON( inputs.runs-on) }}

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GOARCH: arm
- GOOS: windows
GOARCH: s390x
runs-on: ubuntu-22.04
runs-on: ${{ fromJSON( inputs.runs-on) }}

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:

release:
name: ${{ inputs.distribution }} Release
runs-on: ubuntu-22.04
runs-on: ${{ fromJSON( inputs.runs-on) }}
needs: prepare

permissions:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/ci-goreleaser-contrib-cgo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Continuous Integration - Contrib - GoReleaser

on:
push:
branches: [main]
paths:
- "distributions/otelcol-contrib-cgo/**"
- "cmd/**"
- ".github/**"
- "scripts/**"
- "Makefile"
- "go.mod"
- "go.sum"
pull_request:
branches: [main]
paths:
- "distributions/otelcol-contrib-cgo/**"
- "cmd/**"
- ".github/**"
- "scripts/**"
- "Makefile"
- "go.mod"
- "go.sum"

jobs:
check-goreleaser:
name: Continuous Integration - Contrib CGO - GoReleaser
uses: ./.github/workflows/base-ci-goreleaser.yaml
with:
distribution: otelcol-contrib-cgo
goos: '[ "darwin" ]'
goarch: '[ "amd64", "arm64" ]'
runs-on: '[ macos-latest ]'
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/ci-goreleaser-contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
distribution: otelcol-contrib
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
runs-on: '[ ubuntu-22.04 ]'
secrets: inherit

package-tests:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-goreleaser-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
distribution: otelcol
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
runs-on: '[ ubuntu-22.04 ]'
secrets: inherit

package-tests:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-goreleaser-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ jobs:
distribution: otelcol-k8s
goos: '[ "linux" ]'
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
runs-on: '[ ubuntu-22.04 ]'
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/release-contrib-cgo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Contrib

on:
push:
tags: ["v*"]

jobs:
release:
name: Release Contrib
uses: ./.github/workflows/base-release.yaml
with:
distribution: otelcol-contrib-cgo
goos: '[ "darwin" ]'
goarch: '[ "amd64", "arm64" ]'
runs-on: '[ macos-latest ]'
secrets: inherit
permissions: write-all
1 change: 1 addition & 0 deletions .github/workflows/release-contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ jobs:
distribution: otelcol-contrib
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
runs-on: '[ ubuntu-22.04 ]'
secrets: inherit
permissions: write-all
1 change: 1 addition & 0 deletions .github/workflows/release-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ jobs:
distribution: otelcol
goos: '[ "linux", "windows", "darwin" ]'
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
runs-on: '[ ubuntu-22.04 ]'
secrets: inherit
permissions: write-all
1 change: 1 addition & 0 deletions .github/workflows/release-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ jobs:
distribution: otelcol-k8s
goos: '[ "linux" ]'
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
runs-on: '[ ubuntu-22.04 ]'
secrets: inherit
permissions: write-all
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OTELCOL_BUILDER_VERSION ?= 0.106.1
OTELCOL_BUILDER_DIR ?= ${HOME}/bin
OTELCOL_BUILDER ?= ${OTELCOL_BUILDER_DIR}/ocb

DISTRIBUTIONS ?= "otelcol,otelcol-contrib,otelcol-k8s"
DISTRIBUTIONS ?= "otelcol,otelcol-contrib,otelcol-k8s,otelcol-contrib-cgo"
GEN_CONFIG_DISTRIBUTIONS ?= "otelcol,otelcol-contrib"

ci: check build
Expand Down
46 changes: 46 additions & 0 deletions distributions/otelcol-contrib-cgo/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
partial:
by: target
version: 2
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
builds:
- id: otelcol-contrib-cgo
goos:
- darwin
goarch:
- amd64
- arm64
dir: _build
binary: otelcol-contrib-cgo
ldflags:
- -s
- -w
flags:
- -trimpath
env:
- CGO_ENABLED=1
archives:
- id: otelcol-contrib-cgo
builds:
- otelcol-contrib-cgo
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
checksum:
name_template: '{{ .ProjectName }}_otelcol-contrib-cgo_checksums.txt'
signs:
- cmd: cosign
args:
- sign-blob
- --output-signature
- ${artifact}.sig
- --output-certificate
- ${artifact}.pem
- ${artifact}
signature: ${artifact}.sig
artifacts: all
certificate: ${artifact}.pem
sboms:
- id: archive
artifacts: archive
- id: package
artifacts: package
11 changes: 11 additions & 0 deletions distributions/otelcol-contrib-cgo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# OpenTelemetry Collector Contrib CGO Distro

This distribution is a CGO enabled version of [OpenTelemetry Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib). This distribution contains the same components with [OpenTelemetry Collector Contrib Distro](https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib).

## Components

The full list of components is available in the [manifest](manifest.yaml)

### Rules for Component Inclusion

- Include all extensions at [Alpha stability](https://github.com/open-telemetry/opentelemetry-collector#alpha) or higher and pipeline components that have at least 1 signal at [Alpha stability](https://github.com/open-telemetry/opentelemetry-collector#alpha) or higher.
Loading