Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build image for windows boringcrypto executable. #6369

Merged
merged 13 commits into from
Feb 16, 2024
Merged
10 changes: 3 additions & 7 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ steps:
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name multiarch --driver docker-container --use
- docker buildx build --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG
./build-image/boringcrypto
- docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22-bullseye"
--push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG
./build-image
environment:
DOCKER_LOGIN:
from_secret: docker_login
Expand Down Expand Up @@ -1349,8 +1350,3 @@ get:
path: infra/data/ci/github/updater-app
kind: secret
name: updater_private_key
---
kind: signature
hmac: d66a28c3489b7a19b64e82590630ceed4fc71789a76b3da8564c2aae604253ad

...
mattdurham marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion .drone/pipelines/build_images.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ local locals = {
'docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD',
'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes',
'docker buildx create --name multiarch --driver docker-container --use',
'docker buildx build --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG ./build-image/boringcrypto',
'docker buildx build --build-arg="GO_RUNTIME=mcr.microsoft.com/oss/go/microsoft/golang:1.22-bullseye" --push --platform linux/amd64,linux/arm64 -t grafana/agent-build-image:$IMAGE_TAG ./build-image',
],
}],
volumes: [{
Expand Down
6 changes: 5 additions & 1 deletion build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set
# in environment variables.

# NOTE: The GO_RUNTIME is used to switch between the default google go runtime and mcr.microsoft.com/oss/go/microsoft/golang:1.22-bullseye which is a microsoft
# fork of go that allows using windows crypto instead of boring crypto. Details at https://github.com/microsoft/go/tree/microsoft/main/eng/doc/fips
ARG GO_RUNTIME=golang:1.22.0-bullseye

mattdurham marked this conversation as resolved.
Show resolved Hide resolved
#
# Dependencies
#
Expand All @@ -23,7 +27,7 @@ FROM alpine:3.17 as helm
RUN apk add --no-cache helm

# Dependency: Go and Go dependencies
FROM golang:1.22.0-bullseye as golang
FROM ${GO_RUNTIME} as golang

# Keep in sync with cmd/grafana-agent-operator/DEVELOPERS.md
ENV CONTROLLER_GEN_VERSION v0.9.2
Expand Down
107 changes: 0 additions & 107 deletions build-image/boringcrypto/Dockerfile

This file was deleted.

Loading