Skip to content

Commit

Permalink
chore: fix build, now it is only failing due to missing imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Henrique Pegoraro committed Jan 30, 2024
1 parent f7377e9 commit 950e602
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ endif

.PHONY: docker-otelcolagent
docker-otelcolagent:
cd cmd/otelcol-orb-agent && docker build -t otelcol-orb-agent:develop .
docker build -t otelcol-orb-agent:develop -f cmd/otelcol-orb-agent/Dockerfile .

.PHONY: docker-otelcolmaestro
docker-otelcolmaestro:
cd cmd/otelcol-orb-maestro && docker build -t otelcol-orb-maestro:develop .
docker build -t otelcol-orb-maestro:develop -f cmd/otelcol-orb-maestro/Dockerfile .

.PHONY: generate
generate: install-tools
Expand Down
19 changes: 12 additions & 7 deletions cmd/otelcol-orb-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
FROM golang:1.21-alpine as builder
FROM golang:1.21.6-alpine as builder

RUN apk --update add ca-certificates git tzdata
RUN go install go.opentelemetry.io/collector/cmd/builder@latest

WORKDIR /build
WORKDIR /go/src/github.com/orbcommunity/otelcol-orb

COPY ../../receiver /build/receivers
COPY go.mod .

RUN go mod tidy

COPY . .

COPY cmd/otelcol-orb-agent/builder-config.yaml .
COPY cmd/otelcol-orb-agent/example-config.yaml .

RUN go install go.opentelemetry.io/collector/cmd/builder@latest
COPY builder-config.yaml .
RUN builder --config=builder-config.yaml


Expand All @@ -20,8 +26,7 @@ USER ${USER_UID}
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY --from=builder /tmp/otelcol/otelcol-orb /otelcol-orb
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY example-config.yaml /etc/otel/config.yaml
COPY --from=builder /tmp/otelcol/example-config.yaml /etc/otel/config.yaml
EXPOSE 4317 55680 55679 13133
ENTRYPOINT ["/otelcol-orb"]
CMD ["--config", "/etc/otel/config.yaml"]
2 changes: 1 addition & 1 deletion cmd/otelcol-orb-agent/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ extensions:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.93.0

replaces:
- github.com/orb-community/otelcol-orb/receiver/httpmetricsreceiver => ../../../receiver/httpmetricsreceiver
- github.com/orb-community/otelcol-orb/receiver/httpmetricsreceiver => ./../receiver/httpmetricsreceiver
19 changes: 13 additions & 6 deletions cmd/otelcol-orb-maestro/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
FROM golang:1.21-alpine as builder
FROM golang:1.21.6-alpine as builder

RUN apk --update add ca-certificates git tzdata
RUN go install go.opentelemetry.io/collector/cmd/builder@latest

WORKDIR /build
WORKDIR /go/src/github.com/orbcommunity/otelcol-orb

COPY go.mod .

RUN go mod tidy

COPY . .

COPY cmd/otelcol-orb-maestro/builder-config.yaml .
COPY cmd/otelcol-orb-maestro/example-config.yaml .

RUN go install go.opentelemetry.io/collector/cmd/builder@latest
COPY builder-config.yaml .
RUN builder --config=builder-config.yaml


Expand All @@ -18,8 +26,7 @@ USER ${USER_UID}
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

COPY --from=builder /tmp/otelcol/otelcol-orb /otelcol-orb
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY example-config.yaml /config.yaml
COPY --from=builder /tmp/otelcol/example-config.yaml /etc/otel/config.yaml
EXPOSE 4317 55680 55679 13133
ENTRYPOINT ["/otelcol-orb"]
CMD ["--config", "/etc/otel/config.yaml"]

0 comments on commit 950e602

Please sign in to comment.