Skip to content

Commit

Permalink
fips pipeline for infra agent testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-dadams committed Oct 3, 2024
1 parent b83a645 commit b3926a5
Show file tree
Hide file tree
Showing 16 changed files with 331 additions and 155 deletions.
10 changes: 4 additions & 6 deletions build/goreleaser/linux/build_amd64.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# build amd64
- id: linux-agent-amd64
main: ./cmd/newrelic-infra
binary: newrelic-infra
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -18,8 +18,7 @@
main: ./cmd/newrelic-infra-ctl
binary: newrelic-infra-ctl
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -33,8 +32,7 @@
main: ./cmd/newrelic-infra-service
binary: newrelic-infra-service
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand Down
46 changes: 46 additions & 0 deletions build/goreleaser/linux/build_amd64_fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# build amd64
- id: linux-agent-amd64
main: ./cmd/newrelic-infra
binary: newrelic-infra
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
goos:
- linux
ldflags:
- -s -w -X main.buildVersion={{.Version}}
- -s -w -X main.gitCommit={{.Commit}}
- -s -w -X main.buildDate={{.Date}}
goarch:
- amd64

- id: linux-ctl-amd64
main: ./cmd/newrelic-infra-ctl
binary: newrelic-infra-ctl
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
goos:
- linux
ldflags:
- -s -w -X main.buildVersion={{.Version}}
- -s -w -X main.gitCommit={{.Commit}}
- -s -w -X main.buildDate={{.Date}}
goarch:
- amd64

- id: linux-service-amd64
main: ./cmd/newrelic-infra-service
binary: newrelic-infra-service
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
goos:
- linux
ldflags:
- -s -w -X main.buildVersion={{.Version}}
- -s -w -X main.gitCommit={{.Commit}}
- -s -w -X main.buildDate={{.Date}}
goarch:
- amd64
# end build amd64
13 changes: 4 additions & 9 deletions build/goreleaser/linux/build_arm.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

# build arm
- id: linux-agent-arm
main: ./cmd/newrelic-infra
binary: newrelic-infra
env:
- CGO_ENABLED=1
- CC=arm-linux-gnueabi-gcc
- GOEXPERIMENT=boringcrypto
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -19,9 +18,7 @@
main: ./cmd/newrelic-infra-ctl
binary: newrelic-infra-ctl
env:
- CGO_ENABLED=1
- CC=arm-linux-gnueabi-gcc
- GOEXPERIMENT=boringcrypto
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -35,9 +32,7 @@
main: ./cmd/newrelic-infra-service
binary: newrelic-infra-service
env:
- CGO_ENABLED=1
- CC=arm-linux-gnueabi-gcc
- GOEXPERIMENT=boringcrypto
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand Down
14 changes: 4 additions & 10 deletions build/goreleaser/linux/build_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
main: ./cmd/newrelic-infra
binary: newrelic-infra
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -19,9 +17,7 @@
main: ./cmd/newrelic-infra-ctl
binary: newrelic-infra-ctl
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -35,9 +31,7 @@
main: ./cmd/newrelic-infra-service
binary: newrelic-infra-service
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
- CGO_ENABLED=0
goos:
- linux
ldflags:
Expand All @@ -46,4 +40,4 @@
- -s -w -X main.buildDate={{.Date}}
goarch:
- arm64
# end build arm64
# end build arm64
49 changes: 49 additions & 0 deletions build/goreleaser/linux/build_arm64_fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# build arm64
- id: linux-agent-arm64
main: ./cmd/newrelic-infra
binary: newrelic-infra
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
goos:
- linux
ldflags:
- -s -w -X main.buildVersion={{.Version}}
- -s -w -X main.gitCommit={{.Commit}}
- -s -w -X main.buildDate={{.Date}}
goarch:
- arm64

- id: linux-ctl-arm64
main: ./cmd/newrelic-infra-ctl
binary: newrelic-infra-ctl
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
goos:
- linux
ldflags:
- -s -w -X main.buildVersion={{.Version}}
- -s -w -X main.gitCommit={{.Commit}}
- -s -w -X main.buildDate={{.Date}}
goarch:
- arm64

- id: linux-service-arm64
main: ./cmd/newrelic-infra-service
binary: newrelic-infra-service
env:
- CGO_ENABLED=1
- GOEXPERIMENT=boringcrypto
- CC=aarch64-linux-gnu-gcc
goos:
- linux
ldflags:
- -s -w -X main.buildVersion={{.Version}}
- -s -w -X main.gitCommit={{.Commit}}
- -s -w -X main.buildDate={{.Date}}
goarch:
- arm64
# end build arm64
45 changes: 35 additions & 10 deletions build/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ release/sign:
@echo "=== [release/sign] signing packages"
@bash $(CURDIR)/build/sign.sh

.PHONY : release/sign-fips
release/sign:
@echo "=== [release/sign] signing packages"
@bash $(CURDIR)/build/sign_fips.sh

.PHONY : release-publish
release-publish:
@echo "=== [release/publish] publishing artifacts"
Expand All @@ -147,6 +152,10 @@ release-publish:
release-linux: release/pkg-linux release/fix-tarballs-linux release/sign
@echo "=== [release-linux] full pre-release cycle complete for nix"

.PHONY : release-linux-fips
release-linux: release/pkg-linux-fips release/fix-tarballs-linux release/sign-fips
@echo "=== [release-linux] full pre-release cycle complete for nix - FIPS"

.PHONY : release-linux-amd64
release-linux-amd64: release/pkg-linux-amd64 release/fix-tarballs-linux release/sign
@echo "=== [release-linux-amd64] full pre-release cycle complete for nix"
Expand Down Expand Up @@ -265,10 +274,12 @@ generate-goreleaser-multiarch:
$(CURDIR)/build/goreleaser/linux/build_amd64.yml\
$(CURDIR)/build/goreleaser/linux/build_arm.yml\
$(CURDIR)/build/goreleaser/linux/build_arm64.yml\
$(CURDIR)/build/goreleaser/linux/build_legacy.yml\
$(CURDIR)/build/goreleaser/linux/archives_header.yml\
$(CURDIR)/build/goreleaser/linux/archives_amd64.yml\
$(CURDIR)/build/goreleaser/linux/archives_arm.yml\
$(CURDIR)/build/goreleaser/linux/archives_arm64.yml\
$(CURDIR)/build/goreleaser/linux/archives_legacy.yml\
$(CURDIR)/build/goreleaser/linux/nfpms_header.yml\
$(CURDIR)/build/goreleaser/linux/al2023_amd64.yml\
$(CURDIR)/build/goreleaser/linux/al2023_arm.yml\
Expand All @@ -290,47 +301,61 @@ generate-goreleaser-multiarch:
$(CURDIR)/build/goreleaser/linux/debian_systemd_arm.yml\
$(CURDIR)/build/goreleaser/linux/debian_systemd_arm64.yml\
$(CURDIR)/build/goreleaser/linux/debian_upstart_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_114_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_121_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_122_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_122_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_122_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_123_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_123_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_123_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_124_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_124_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_124_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_125_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_125_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_125_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_151_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_151_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_151_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_152_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_152_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_152_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_153_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_153_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_153_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_154_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_154_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_154_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_155_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_155_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_155_arm64.yml\
$(CURDIR)/build/goreleaser/linux/sles_156_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_156_arm.yml\
$(CURDIR)/build/goreleaser/linux/sles_156_arm64.yml\
> $(GORELEASER_CONFIG_LINUX)

.PHONY : generate-goreleaser-multiarch-fips
generate-goreleaser-multiarch-fips:
cat $(CURDIR)/build/goreleaser/linux/header.yml\
$(CURDIR)/build/goreleaser/linux/build_amd64.yml\
$(CURDIR)/build/goreleaser/linux/build_arm.yml\
$(CURDIR)/build/goreleaser/linux/build_arm64.yml\
$(CURDIR)/build/goreleaser/linux/build_amd64_fips.yml\
$(CURDIR)/build/goreleaser/linux/build_arm64_fips.yml\
$(CURDIR)/build/goreleaser/linux/archives_header.yml\
$(CURDIR)/build/goreleaser/linux/archives_amd64.yml\
$(CURDIR)/build/goreleaser/linux/archives_arm.yml\
$(CURDIR)/build/goreleaser/linux/archives_arm64.yml\
$(CURDIR)/build/goreleaser/linux/nfpms_header.yml\
$(CURDIR)/build/goreleaser/linux/al2023_amd64.yml\
$(CURDIR)/build/goreleaser/linux/al2023_arm.yml\
$(CURDIR)/build/goreleaser/linux/al2023_arm64.yml\
$(CURDIR)/build/goreleaser/linux/al2_amd64.yml\
$(CURDIR)/build/goreleaser/linux/al2_arm.yml\
$(CURDIR)/build/goreleaser/linux/al2_arm64.yml\
$(CURDIR)/build/goreleaser/linux/centos_6_amd64.yml\
$(CURDIR)/build/goreleaser/linux/centos_7_amd64.yml\
$(CURDIR)/build/goreleaser/linux/centos_7_arm.yml\
$(CURDIR)/build/goreleaser/linux/centos_7_arm64.yml\
$(CURDIR)/build/goreleaser/linux/centos_8_amd64.yml\
$(CURDIR)/build/goreleaser/linux/centos_8_arm.yml\
$(CURDIR)/build/goreleaser/linux/centos_8_arm64.yml\
$(CURDIR)/build/goreleaser/linux/rhel_9_amd64.yml\
$(CURDIR)/build/goreleaser/linux/rhel_9_arm.yml\
$(CURDIR)/build/goreleaser/linux/rhel_9_arm64.yml\
$(CURDIR)/build/goreleaser/linux/debian_systemd_amd64.yml\
$(CURDIR)/build/goreleaser/linux/debian_systemd_arm.yml\
$(CURDIR)/build/goreleaser/linux/debian_systemd_arm64.yml\
$(CURDIR)/build/goreleaser/linux/debian_upstart_amd64.yml\
$(CURDIR)/build/goreleaser/linux/sles_125_amd64.yml\
Expand Down
Loading

0 comments on commit b3926a5

Please sign in to comment.