Skip to content

Commit

Permalink
Remove translatesfx (#4028)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme authored Dec 8, 2023
1 parent a8b1d72 commit 7cb1148
Show file tree
Hide file tree
Showing 67 changed files with 14 additions and 4,223 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/win-package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,13 @@ jobs:
run: |
$ErrorActionPreference = 'Stop'
Copy-Item .\bin\otelcol_windows_amd64.exe .\cmd\otelcol\otelcol.exe
Copy-Item .\bin\translatesfx_windows_amd64.exe .\cmd\otelcol\translatesfx.exe
Copy-Item .\dist\agent-bundle_windows_amd64.zip .\cmd\otelcol\agent-bundle_windows_amd64.zip
if ("${{ matrix.OS }}" -eq "windows-2019") {
docker build -t otelcol-windows --build-arg BASE_IMAGE=mcr.microsoft.com/windows/servercore:1809 --build-arg JMX_METRIC_GATHERER_RELEASE=$(Get-Content internal\buildscripts\packaging\jmx-metric-gatherer-release.txt) -f .\cmd\otelcol\Dockerfile.windows .\cmd\otelcol\
} else {
docker build -t otelcol-windows --build-arg BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 --build-arg JMX_METRIC_GATHERER_RELEASE=$(Get-Content internal\buildscripts\packaging\jmx-metric-gatherer-release.txt) -f .\cmd\otelcol\Dockerfile.windows .\cmd\otelcol\
}
Remove-Item .\cmd\otelcol\otelcol.exe
Remove-Item .\cmd\otelcol\translatesfx.exe
Remove-Item .\cmd\otelcol\agent-bundle_windows_amd64.zip
- name: Run docker image
Expand Down
11 changes: 2 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,10 @@ compile:
script: make $TARGET
after_script:
- if [ -e bin/otelcol ]; then rm -f bin/otelcol; fi # remove the symlink
- if [ -e bin/translatesfx ]; then rm -f bin/translatesfx; fi # remove the symlink
- if [ -e bin/migratecheckpoint ]; then rm -f bin/migratecheckpoint; fi # remove the symlink
artifacts:
paths:
- bin/otelcol_*
- bin/translatesfx_*
- bin/migratecheckpoint_*

libsplunk:
Expand Down Expand Up @@ -292,7 +290,7 @@ sign-exe:
- compile
parallel:
matrix:
- TARGET: [otelcol, translatesfx]
- TARGET: [otelcol]
variables:
ARTIFACT: bin/${TARGET}_windows_amd64.exe
SIGN_TYPE: WIN
Expand All @@ -319,14 +317,13 @@ sign-osx:
DOWNLOAD_DIR: dist/signed
before_script:
- mkdir -p dist
- pushd bin && tar -czvf packages.tar.gz otelcol_darwin_${ARCH} translatesfx_darwin_${ARCH} && popd
- pushd bin && tar -czvf packages.tar.gz otelcol_darwin_${ARCH} && popd
after_script:
- tar -xzvf dist/signed/packages.tar.gz -C dist/signed/
- rm dist/signed/packages.tar.gz
artifacts:
paths:
- dist/signed/otelcol_darwin_${ARCH}
- dist/signed/translatesfx_darwin_${ARCH}

build-linux-image:
extends: .trigger-filter
Expand Down Expand Up @@ -403,7 +400,6 @@ build-msi:
# build the MSI with the signed exe
- mkdir -p bin
- cp -f dist/signed/otelcol_windows_amd64.exe bin/otelcol_windows_amd64.exe
- cp -f dist/signed/translatesfx_windows_amd64.exe bin/translatesfx_windows_amd64.exe
script:
- *docker-reader-role
- make msi SKIP_COMPILE=true VERSION=${CI_COMMIT_TAG:-} DOCKER_REPO=${DOCKER_HUB_REPO}
Expand Down Expand Up @@ -655,7 +651,6 @@ build-push-windows-image:
retry: 2
before_script:
- Copy-Item .\dist\signed\otelcol_windows_amd64.exe .\cmd\otelcol\otelcol.exe
- Copy-Item .\dist\signed\translatesfx_windows_amd64.exe .\cmd\otelcol\translatesfx.exe
- Copy-Item .\dist\agent-bundle_windows_amd64.zip .\cmd\otelcol\agent-bundle_windows_amd64.zip
script:
- docker login -u $env:CIRCLECI_QUAY_USERNAME -p $env:CIRCLECI_QUAY_PASSWORD quay.io
Expand Down Expand Up @@ -697,7 +692,6 @@ build-push-windows2022-image:
retry: 2
before_script:
- Copy-Item .\dist\signed\otelcol_windows_amd64.exe .\cmd\otelcol\otelcol.exe
- Copy-Item .\dist\signed\translatesfx_windows_amd64.exe .\cmd\otelcol\translatesfx.exe
- Copy-Item .\dist\agent-bundle_windows_amd64.zip .\cmd\otelcol\agent-bundle_windows_amd64.zip
script:
- docker login -u $env:CIRCLECI_QUAY_USERNAME -p $env:CIRCLECI_QUAY_PASSWORD quay.io
Expand Down Expand Up @@ -910,7 +904,6 @@ github-release:
script:
- mkdir -p dist/assets
- cp bin/otelcol_linux_* dist/assets/
- cp bin/translatesfx_linux_* dist/assets/
- cp instrumentation/dist/libsplunk_*.so dist/assets/
- cp dist/signed/* dist/assets/
- |
Expand Down
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@ otelcol:
GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ./bin/otelcol_$(GOOS)_$(GOARCH)$(EXTENSION) $(BUILD_INFO) ./cmd/otelcol
ln -sf otelcol_$(GOOS)_$(GOARCH)$(EXTENSION) ./bin/otelcol

.PHONY: translatesfx
translatesfx:
go generate ./...
GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ./bin/translatesfx_$(GOOS)_$(GOARCH)$(EXTENSION) $(BUILD_INFO) ./cmd/translatesfx
ln -sf translatesfx_$(GOOS)_$(GOARCH)$(EXTENSION) ./bin/translatesfx

.PHONY: migratecheckpoint
migratecheckpoint:
go generate ./...
Expand Down Expand Up @@ -162,7 +156,6 @@ endif
rm -rf ./cmd/otelcol/dist
mkdir -p ./cmd/otelcol/dist
cp ./bin/otelcol_linux_$(ARCH) ./cmd/otelcol/dist/otelcol
cp ./bin/translatesfx_linux_$(ARCH) ./cmd/otelcol/dist/translatesfx
cp ./bin/migratecheckpoint_linux_$(ARCH) ./cmd/otelcol/dist/migratecheckpoint
cp ./internal/buildscripts/packaging/collect-libs.sh ./cmd/otelcol/dist/collect-libs.sh
ifneq ($(filter $(ARCH), $(BUNDLE_SUPPORTED_ARCHS)),)
Expand All @@ -178,37 +171,31 @@ binaries-all-sys: binaries-darwin_amd64 binaries-darwin_arm64 binaries-linux_amd
.PHONY: binaries-darwin_amd64
binaries-darwin_amd64:
GOOS=darwin GOARCH=amd64 $(MAKE) otelcol
GOOS=darwin GOARCH=amd64 $(MAKE) translatesfx
GOOS=darwin GOARCH=amd64 $(MAKE) migratecheckpoint

.PHONY: binaries-darwin_arm64
binaries-darwin_arm64:
GOOS=darwin GOARCH=arm64 $(MAKE) otelcol
GOOS=darwin GOARCH=arm64 $(MAKE) translatesfx
GOOS=darwin GOARCH=arm64 $(MAKE) migratecheckpoint

.PHONY: binaries-linux_amd64
binaries-linux_amd64:
GOOS=linux GOARCH=amd64 $(MAKE) otelcol
GOOS=linux GOARCH=amd64 $(MAKE) translatesfx
GOOS=linux GOARCH=amd64 $(MAKE) migratecheckpoint

.PHONY: binaries-linux_arm64
binaries-linux_arm64:
GOOS=linux GOARCH=arm64 $(MAKE) otelcol
GOOS=linux GOARCH=arm64 $(MAKE) translatesfx
GOOS=linux GOARCH=arm64 $(MAKE) migratecheckpoint

.PHONY: binaries-windows_amd64
binaries-windows_amd64:
GOOS=windows GOARCH=amd64 EXTENSION=.exe $(MAKE) otelcol
GOOS=windows GOARCH=amd64 EXTENSION=.exe $(MAKE) translatesfx
GOOS=windows GOARCH=amd64 EXTENSION=.exe $(MAKE) migratecheckpoint

.PHONY: binaries-linux_ppc64le
binaries-linux_ppc64le:
GOOS=linux GOARCH=ppc64le $(MAKE) otelcol
GOOS=linux GOARCH=ppc64le $(MAKE) translatesfx
GOOS=linux GOARCH=ppc64le $(MAKE) migratecheckpoint

.PHONY: deb-rpm-tar-package
Expand Down
3 changes: 0 additions & 3 deletions cmd/otelcol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ RUN apk --update add ca-certificates
FROM ${DOCKER_REPO}/alpine:3.17.0 AS otelcol
COPY dist/* /dist/
RUN mv /dist/otelcol /
RUN mv /dist/translatesfx /
RUN mv /dist/migratecheckpoint /
# Note that this shouldn't be necessary, but in some cases the file seems to be
# copied with the execute bit lost (see https://github.com/open-telemetry/opentelemetry-collector/issues/1317)
RUN chmod 755 /otelcol
RUN chmod 755 /translatesfx
RUN chmod 755 /migratecheckpoint
RUN echo "splunk-otel-collector:x:999:999::/:" > /etc_passwd
# create base dirs since we cannot chown in scratch image except via COPY
Expand Down Expand Up @@ -58,7 +56,6 @@ ENV PATH=${PATH}:${SPLUNK_BUNDLE_DIR}/jre/bin
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=otelcol /etc_passwd /etc/passwd
COPY --from=otelcol --chown=999 /otelcol /
COPY --from=otelcol --chown=999 /translatesfx /
COPY --from=otelcol --chown=999 /migratecheckpoint /
COPY --from=otelcol --chown=999 /otel /etc/otel
COPY --from=otelcol --chown=999 /otel/collector /etc/otel/collector
Expand Down
2 changes: 0 additions & 2 deletions cmd/otelcol/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ WORKDIR "C:\\Program Files\Splunk\OpenTelemetry Collector"

# Copy the pre-built local binary
COPY otelcol.exe ./
COPY translatesfx.exe ./

# Copy the local config
WORKDIR "C:\ProgramData\Splunk\OpenTelemetry Collector"
COPY config/collector/gateway_config.yaml ./
Expand Down
Loading

0 comments on commit 7cb1148

Please sign in to comment.