-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c3d412
commit 06da536
Showing
7 changed files
with
189 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: "otelcol-fips" | ||
|
||
on: | ||
push: | ||
branches: | ||
- otelcol-fips | ||
|
||
concurrency: | ||
group: otelcol-fips-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
otelcol-fips: | ||
runs-on: ${{ fromJSON('["ubuntu-22.04", "otel-arm64"]')[matrix.ARCH == 'arm64'] }} | ||
strategy: | ||
matrix: | ||
ARCH: [ "amd64", "arm64" ] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: make otelcol-fips ARCH=${{ matrix.ARCH }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: otelcol-fips-${{ matrix.ARCH }} | ||
path: ./bin/otelcol_linux_${{ matrix.ARCH }}_fips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG DOCKER_REPO=docker.io | ||
|
||
FROM ${DOCKER_REPO}/golang:1.21.11 as build | ||
ARG TARGETARCH | ||
ARG VERSION | ||
WORKDIR /src | ||
COPY go.mod /src/go.mod | ||
COPY go.sum /src/go.sum | ||
COPY cmd/otelcol /src/cmd/otelcol | ||
COPY internal /src/internal | ||
COPY pkg /src/pkg | ||
COPY Makefile /src/Makefile | ||
COPY Makefile.Common /src/Makefile.Common | ||
RUN GOOS=linux GOARCH=${TARGETARCH} GOEXPERIMENT=boringcrypto CGO_ENABLED=1 EXTENSION=_fips make otelcol VERSION=$VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
REPO_DIR="$( cd ${SCRIPT_DIR}/../../../ && pwd )" | ||
|
||
DOCKER_REPO=${DOCKER_REPO:-docker.io} | ||
ARCH=${ARCH:-amd64} | ||
VERSION=${VERSION:-} | ||
|
||
trap "docker rm -f otelcol-fips >/dev/null" EXIT | ||
|
||
docker build --platform=linux/${ARCH} \ | ||
--build-arg DOCKER_REPO=${DOCKER_REPO} \ | ||
--build-arg VERSION=${VERSION} \ | ||
--tag otelcol-fips:${ARCH} \ | ||
-f ${REPO_DIR}/cmd/otelcol/Dockerfile.fips $REPO_DIR | ||
docker rm -f otelcol-fips >/dev/null 2>&1 || true | ||
docker create --name otelcol-fips otelcol-fips:${ARCH} | ||
docker cp otelcol-fips:/src/bin/otelcol_linux_${ARCH}_fips ${REPO_DIR}/bin/otelcol_linux_${ARCH}_fips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.