Skip to content

Commit dca5719

Browse files
Nr 351326 linux prerelease fips (#1976)
* Create new FIPS packages on prerelease for linux * Add FIPS molecule tests. (#1981)
1 parent 8869d88 commit dca5719

5 files changed

+59
-12
lines changed

.github/workflows/component_linux_packaging.yml

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
ARCH:
2323
required: true
2424
type: string
25+
FIPS:
26+
required: false
27+
type: boolean
28+
default: false
2529

2630
env:
2731
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -32,6 +36,7 @@ env:
3236
DOCKER_HUB_ID: ${{ secrets.DOCKER_HUB_ID }}
3337
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
3438
ARCH: ${{ inputs.ARCH }}
39+
FIPS: ${{ inputs.FIPS == true && '-fips' || '' }}
3540

3641
jobs:
3742
packaging:
@@ -49,6 +54,8 @@ jobs:
4954

5055
- name: Preparing linux packages
5156
run: make ci/prerelease/linux-${{ env.ARCH }}
57+
env:
58+
FIPS: ${{ env.FIPS }}
5259

5360
- name: Generate checksum files
5461
uses: ./.github/actions/generate-checksums

.github/workflows/component_linux_publish.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ jobs:
7676
- "targz"
7777
- "deb"
7878
- "rpm"
79+
suffix:
80+
- ""
81+
- "-fips"
7982

8083
steps:
8184
- name: Login to DockerHub
@@ -89,10 +92,10 @@ jobs:
8992
uses: newrelic/[email protected]
9093
with:
9194
tag: ${{env.TAG}}
92-
app_name: "newrelic-infra"
95+
app_name: "newrelic-infra${{ matrix.suffix }}"
9396
repo_name: "newrelic/infrastructure-agent"
9497
schema: "custom"
95-
schema_url: "https://raw.githubusercontent.com/newrelic/infrastructure-agent/${{ env.SCHEMA_BRANCH }}/build/upload-schema-linux-${{ matrix.assetsType }}.yml"
98+
schema_url: "https://raw.githubusercontent.com/newrelic/infrastructure-agent/${{ env.SCHEMA_BRANCH }}/build/upload-schema-linux-${{ matrix.assetsType }}${{ matrix.suffix }}.yml"
9699
aws_access_key_id: ${{ env.AWS_ACCESS_KEY_ID }}
97100
aws_secret_access_key: ${{ env.AWS_SECRET_ACCESS_KEY }}
98101
aws_s3_bucket_name: ${{ env.AWS_S3_BUCKET_NAME }}

.github/workflows/component_molecule_packaging.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,19 @@ jobs:
2121
name: Test package installation
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: newrelic/pkg-installation-testing-action@v1
24+
- name: Test NON-FIPS package installation
25+
uses: newrelic/pkg-installation-testing-action@v1
2526
with:
2627
gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg'
2728
repo_base_url: ${{ inputs.REPO_ENDPOINT }}
2829
package_name: 'newrelic-infra'
2930
package_version: ${{ inputs.TAG }}
3031
platforms: "al2,al2023,debian-bullseye,debian-bookworm,redhat8,redhat9,suse15.3,suse15.4,suse15.5,suse15.6,ubuntu1604,ubuntu1804,ubuntu2004,ubuntu2204,ubuntu2404"
32+
- name: Test FIPS package installation
33+
uses: newrelic/pkg-installation-testing-action@v1
34+
with:
35+
gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg'
36+
repo_base_url: ${{ inputs.REPO_ENDPOINT }}
37+
package_name: 'newrelic-infra-fips'
38+
package_version: ${{ inputs.TAG }}
39+
platforms: "al2,al2023,debian-bullseye,debian-bookworm,redhat8,redhat9,suse15.3,suse15.4,suse15.5,suse15.6,ubuntu1604,ubuntu1804,ubuntu2004,ubuntu2204,ubuntu2404"

.github/workflows/prerelease_linux.yml

+31-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ jobs:
3131
with:
3232
TAG: ${{ github.event.release.tag_name }}
3333
ARCH: 'amd64'
34+
35+
packaging-amd64-fips:
36+
needs: [unit-test, proxy-tests]
37+
uses: ./.github/workflows/component_linux_packaging.yml
38+
secrets:
39+
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
40+
DOCKER_HUB_PASSWORD: ${{secrets.OHAI_DOCKER_HUB_PASSWORD}}
41+
GPG_MAIL: '[email protected]'
42+
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
43+
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
TAG: ${{ github.event.release.tag_name }}
47+
ARCH: 'amd64'
48+
FIPS: true
3449

3550
packaging-arm:
3651
needs: [unit-test, proxy-tests]
@@ -60,6 +75,21 @@ jobs:
6075
TAG: ${{ github.event.release.tag_name }}
6176
ARCH: 'arm64'
6277

78+
packaging-arm64-fips:
79+
needs: [unit-test, proxy-tests]
80+
uses: ./.github/workflows/component_linux_packaging.yml
81+
secrets:
82+
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
83+
DOCKER_HUB_PASSWORD: ${{secrets.OHAI_DOCKER_HUB_PASSWORD}}
84+
GPG_MAIL: '[email protected]'
85+
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
86+
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded
87+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
with:
89+
TAG: ${{ github.event.release.tag_name }}
90+
ARCH: 'arm64'
91+
FIPS: true
92+
6393
packaging-legacy:
6494
needs: [unit-test, proxy-tests]
6595
uses: ./.github/workflows/component_linux_packaging.yml
@@ -98,7 +128,7 @@ jobs:
98128
# point to staging after tests
99129
name: Publish linux artifacts into s3 staging bucket
100130
uses: ./.github/workflows/component_linux_publish.yml
101-
needs: [packaging-amd64, packaging-arm, packaging-arm64, packaging-legacy]
131+
needs: [packaging-amd64, packaging-amd64-fips, packaging-arm, packaging-arm64, packaging-arm64-fips, packaging-legacy]
102132
secrets:
103133
DOCKER_HUB_ID: ${{secrets.OHAI_DOCKER_HUB_ID}}
104134
DOCKER_HUB_PASSWORD: ${{secrets.OHAI_DOCKER_HUB_PASSWORD}}

build/release.mk

+6-8
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,10 @@ release/pkg-linux: release/get-fluentbit-linux-arm64
7171

7272
.PHONY : release/pkg-linux-fips
7373
release/pkg-linux-fips: release/deps release/clean generate-goreleaser-multiarch-fips
74-
release/pkg-linux-fips: release/get-integrations-amd64 #NO FIPS ASSETS AVAILABLE FOR NOW
75-
release/pkg-linux-fips: release/get-integrations-arm64 #NO FIPS ASSETS AVAILABLE FOR NOW
76-
# release/pkg-linux-fips: release/get-integrations-arm #NO FIPS ASSETS AVAILABLE FOR NOW
77-
release/pkg-linux-fips: release/get-fluentbit-linux-amd64 #NO FIPS ASSETS AVAILABLE FOR NOW
78-
# #release/pkg-linux: release/get-fluentbit-linux-arm
79-
release/pkg-linux-fips: release/get-fluentbit-linux-arm64 #NO FIPS ASSETS AVAILABLE FOR NOW
74+
release/pkg-linux-fips: release/get-integrations-amd64
75+
release/pkg-linux-fips: release/get-integrations-arm64
76+
release/pkg-linux-fips: release/get-fluentbit-linux-amd64
77+
release/pkg-linux-fips: release/get-fluentbit-linux-arm64
8078
@echo "=== [release/pkg-linux-fips] PRE-RELEASE compiling all binaries, creating packages, archives"
8179
$(GORELEASER_BIN) release --config $(GORELEASER_CONFIG_LINUX) $(PKG_FLAGS)
8280

@@ -178,7 +176,7 @@ release-macos: release/pkg-macos release/fix-tarballs-macos
178176
.PHONY : generate-goreleaser-amd64
179177
generate-goreleaser-amd64:
180178
cat $(CURDIR)/build/goreleaser/linux/header.yml\
181-
$(CURDIR)/build/goreleaser/linux/build_amd64.yml\
179+
$(CURDIR)/build/goreleaser/linux/build_amd64$(subst -,_,$(FIPS)).yml\
182180
$(CURDIR)/build/goreleaser/linux/archives_header.yml\
183181
$(CURDIR)/build/goreleaser/linux/archives_amd64.yml\
184182
$(CURDIR)/build/goreleaser/linux/nfpms_header.yml\
@@ -232,7 +230,7 @@ generate-goreleaser-amd64:
232230
.PHONY : generate-goreleaser-arm64
233231
generate-goreleaser-arm64:
234232
cat $(CURDIR)/build/goreleaser/linux/header.yml\
235-
$(CURDIR)/build/goreleaser/linux/build_arm64.yml\
233+
$(CURDIR)/build/goreleaser/linux/build_arm64$(subst -,_,$(FIPS)).yml\
236234
$(CURDIR)/build/goreleaser/linux/archives_header.yml\
237235
$(CURDIR)/build/goreleaser/linux/archives_arm64.yml\
238236
$(CURDIR)/build/goreleaser/linux/nfpms_header.yml\

0 commit comments

Comments
 (0)