Skip to content

Commit

Permalink
chore(ci): add build-fips make target
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Kolberg <[email protected]>
  • Loading branch information
amdprophet committed Sep 25, 2023
1 parent 55792eb commit 7e405a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions ci/build-fips-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ ENV TARGETARCH=$TARGETARCH

RUN yum groupinstall -y "Development Tools" && yum install -y curl git

RUN curl -Lo go.tar.gz https://go.dev/dl/go1.20.5.linux-$TARGETARCH.tar.gz
RUN tar -zxvf go.tar.gz -C /usr/local
ENV PATH="/usr/local/go/bin:${PATH}"

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
7 changes: 0 additions & 7 deletions ci/build-fips-action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

git config --global --add safe.directory /github/workspace

# Install Go
url="https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz"
echo "Downloading ${url}"
curl -Lo go.tar.gz "$url"
tar -zxvf go.tar.gz -C /usr/local
export PATH="/usr/local/go/bin:${PATH}"

# Install builder
cd otelcolbuilder || exit 1
mkdir "${HOME}/bin"
Expand Down
5 changes: 5 additions & 0 deletions otelcolbuilder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ build-debug: ensure-correct-builder-version
@$(MAKE) generate-sources
@$(MAKE) _gobuild_debug

.PHONY: build-fips
build-fips:
docker build --platform linux/amd64 -t otelcol-sumo-builder-fips -f ../ci/build-fips-action/Dockerfile ../ci/build-fips-action
docker run -it --platform linux/amd64 --rm -v $(PWD)/../:/github/workspace -w /github/workspace --tmpfs /tmp otelcol-sumo-builder-fips

.PHONY: generate-sources
generate-sources:
@$(MAKE) _builder SKIP_COMPILATION=true
Expand Down

0 comments on commit 7e405a1

Please sign in to comment.