Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Apr 5, 2024
1 parent 03542d1 commit 837b721
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ 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
Expand Down Expand Up @@ -502,7 +498,9 @@ jobs:
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: Build Collector ${{ matrix.binary }}
run: make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} otelcontribcol
run: |
make genotelcontribcol
make GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM=${{ matrix.arm }} otelcontribcol
- name: Upload Collector Binaries
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Build Artifact
run: |
make otelcontribcol
make genotelcontribcol otelcontribcol
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Build Collector
run: make otelcontribcol
run: make genotelcontribcol otelcontribcol
- name: Upload Collector Binary
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
run: make -j2 gomoddownload
- name: Build Docker Image
run: |
make docker-otelcontribcol
make genotelcontribcol docker-otelcontribcol
- name: export image to tar
run: |
docker save otelcontribcol:latest > /tmp/otelcontribcol.tar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
~/go/pkg/mod
~/.cache/go-build
key: prometheus-${{ runner.os }}-go-${{ hashFiles('**/go.mod', '**/go.sum') }}
- run: make otelcontribcol
- run: make genotelcontribcol otelcontribcol
working-directory: opentelemetry-collector-contrib
- name: Checkout compliance repo
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ genotelcontribcol: $(BUILDER)

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

Expand Down
2 changes: 1 addition & 1 deletion exporter/loadbalancingexporter/example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.22 AS build
WORKDIR /src
ADD . /src

RUN make otelcontribcol
RUN make genotelcontribcol otelcontribcol

FROM alpine:latest as certs
RUN apk --update add ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion exporter/splunkhecexporter/example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM golang:1.22 AS build
WORKDIR /src
ADD . /src

RUN make otelcontribcol
RUN make genotelcontribcol otelcontribcol

FROM alpine:latest as certs
RUN apk --update add ca-certificates
Expand Down

0 comments on commit 837b721

Please sign in to comment.