From e3fee486cd2bab16cdbdb4f71ab1da78c1372eb4 Mon Sep 17 00:00:00 2001 From: Matt Durham Date: Fri, 10 May 2024 11:48:14 -0400 Subject: [PATCH] Enable drone for cngcrypto --- .drone/drone.yml | 21 +++++++++++++++++++-- .drone/pipelines/crosscompile.jsonnet | 18 +++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.drone/drone.yml b/.drone/drone.yml index eb3acdf8dd..f294db2712 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -328,7 +328,7 @@ platform: os: linux steps: - commands: - - make generate-ui + - make generate-ui generate-winmanifest - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make alloy image: grafana/alloy-build-image:v0.1.1 name: Build @@ -388,6 +388,23 @@ trigger: type: docker --- kind: pipeline +name: Build alloy (Windows amd64 cngcrypto) +platform: + arch: amd64 + os: linux +steps: +- commands: + - make generate-ui generate-winmanifest + - GO_TAGS="builtinassets cngcrypto" GOOS=windows GOARCH=amd64 GOARM= GOEXPERIMENT=cngcrypto + make alloy + image: grafana/alloy-build-image:v0.1.1-boringcrypto + name: Build +trigger: + event: + - pull_request +type: docker +--- +kind: pipeline name: Publish Linux alloy-devel container platform: arch: amd64 @@ -835,6 +852,6 @@ kind: secret name: updater_private_key --- kind: signature -hmac: edfc9eabaa8e7af503b548fca203b5e7491258cbf778e172db3fc0cdd23ac3d4 +hmac: 3493e2c2bedc85fd77eacc325eda97553ca2da3a00a8a5f9acde3c058562d0e6 ... diff --git a/.drone/pipelines/crosscompile.jsonnet b/.drone/pipelines/crosscompile.jsonnet index e480992153..07627e6174 100644 --- a/.drone/pipelines/crosscompile.jsonnet +++ b/.drone/pipelines/crosscompile.jsonnet @@ -34,6 +34,9 @@ local targets = [ local targets_boringcrypto = [ 'alloy', ]; +local targets_boringcrypto_windows = [ + 'alloy', +]; local os_arch_types_boringcrypto = [ @@ -41,6 +44,10 @@ local os_arch_types_boringcrypto = [ { name: 'Linux amd64 boringcrypto', os: 'linux', arch: 'amd64', experiment: 'boringcrypto' }, { name: 'Linux arm64 boringcrypto', os: 'linux', arch: 'arm64', experiment: 'boringcrypto' }, ]; +local windows_os_arch_types_boringcrypto = [ + // Windows boringcrypto + { name: 'Windows amd64 cngcrypto', os: 'windows', arch: 'amd64', experiment: 'cngcrypto', additional_tags: 'cngcrypto' }, +]; local build_environments(targets, tuples, image) = std.flatMap(function(target) ( std.map(function(platform) ( @@ -52,7 +59,7 @@ local build_environments(targets, tuples, image) = std.flatMap(function(target) target: target, - tags: go_tags[platform.os], + tags: go_tags[platform.os] + (if 'additional_tags' in platform then ' '+platform.additional_tags else '') , } + (if 'experiment' in platform then { GOEXPERIMENT: platform.experiment } else {}), trigger: { @@ -63,7 +70,10 @@ local build_environments(targets, tuples, image) = std.flatMap(function(target) name: 'Build', image: image, commands: [ - 'make generate-ui', + 'make generate-ui' + + (if env.GOOS == 'windows' + then ' generate-winmanifest' + else ""), (if 'GOEXPERIMENT' in env then 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GOEXPERIMENT=%(GOEXPERIMENT)s make %(target)s' % env else 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s') % env, @@ -74,4 +84,6 @@ local build_environments(targets, tuples, image) = std.flatMap(function(target) ), targets); build_environments(targets, os_arch_tuples, build_image.linux) + -build_environments(targets_boringcrypto, os_arch_types_boringcrypto, build_image.boringcrypto) +build_environments(targets_boringcrypto, os_arch_types_boringcrypto, build_image.boringcrypto) + +build_environments(targets_boringcrypto_windows, windows_os_arch_types_boringcrypto, build_image.boringcrypto) +