File tree 6 files changed +114
-14
lines changed
6 files changed +114
-14
lines changed Original file line number Diff line number Diff line change 9
9
"ubuntu"
10
10
] ,
11
11
"enabled" : false
12
+ } ,
13
+ {
14
+ // Skip updating package builder image
15
+ "matchDatasources" : [ "docker" ] ,
16
+ "matchPackageNames" : [ "ubuntu" ] ,
17
+ "enabled" : false ,
18
+ } ,
19
+ {
20
+ "matchDatasources" : [
21
+ "dockerfile" ,
22
+ "gomod"
23
+ ] ,
24
+ "matchPackageNames" : [
25
+ "golang" ,
26
+ "*"
27
+ ] ,
28
+ "matchPaths" : [
29
+ "build/Dockerfile" ,
30
+ "go.mod"
31
+ ] ,
32
+ "extractVersion" : "^ARG GO_VERSION=(?<version>.*)$" ,
33
+ "groupName" : "go-updates"
12
34
}
13
35
]
14
36
}
Original file line number Diff line number Diff line change
1
+ ---
2
+ project_name : nri-flex
1
3
builds :
2
4
- id : nri-nix
3
5
main : ./src
@@ -13,7 +15,25 @@ builds:
13
15
- amd64
14
16
- arm
15
17
- arm64
16
-
18
+ - id : nri-nix-fips
19
+ main : ./src
20
+ binary : nri-docker
21
+ ldflags :
22
+ - -s -w -X main.integrationVersion={{.Version}} -X main.gitCommit={{.Commit}} -X main.buildDate={{.Date}}
23
+ env :
24
+ - CGO_ENABLED=1
25
+ - GOEXPERIMENT=boringcrypto
26
+ - >-
27
+ {{- if eq .Arch "arm64" -}}
28
+ CC=aarch64-linux-gnu-gcc
29
+ {{- end }}
30
+ goos :
31
+ - linux
32
+ goarch :
33
+ - amd64
34
+ - arm64
35
+ tags :
36
+ - fips
17
37
archives :
18
38
- id : nri-nix
19
39
builds :
@@ -23,6 +43,14 @@ archives:
23
43
- docker-config.yml
24
44
- docker-definition.yml
25
45
format : tar.gz
46
+ - id : nri-nix-fips
47
+ builds :
48
+ - nri-nix-fips
49
+ name_template : " {{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}_fips_dirty"
50
+ files :
51
+ - docker-config.yml
52
+ - docker-definition.yml
53
+ format : tar.gz
26
54
27
55
# we use custom publisher for fixing archives and signing them
28
56
release :
Original file line number Diff line number Diff line change 1
- FROM golang:1.23.2-bookworm
1
+ # Use Ubuntu 16.04 as the base image
2
+ FROM ubuntu:16.04
2
3
3
- ARG GH_VERSION='2.23.0'
4
+ # Define Go version
5
+ ARG GO_VERSION=1.23.2
6
+ ARG ARCH='amd64'
7
+ ARG GH_VERSION='2.61.0'
4
8
5
- RUN apt-get update \
6
- && apt-get -y install \
7
- rpm \
8
- gnupg2 \
9
- gpg-agent \
10
- debsigs \
11
- unzip \
12
- zip
9
+ # Install dependencies
10
+ RUN apt-get update && apt-get install -y \
11
+ gnupg-agent \
12
+ unzip \
13
+ zip \
14
+ curl \
15
+ wget \
16
+ expect \
17
+ git \
18
+ tar \
19
+ gcc \
20
+ jq \
21
+ g++ \
22
+ gnupg2 \
23
+ gnupg-agent \
24
+ debsigs \
25
+ rpm \
26
+ build-essential \
27
+ software-properties-common \
28
+ python-software-properties \
29
+ gcc-arm-linux-gnueabi \
30
+ dpkg-sig \
31
+ gcc-aarch64-linux-gnu
32
+
33
+ # Install Go
34
+ RUN curl -sSL https://golang.org/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz -o go${GO_VERSION}.linux-${ARCH}.tar.gz && \
35
+ tar -C /usr/local -xzf go${GO_VERSION}.linux-${ARCH}.tar.gz && \
36
+ rm go${GO_VERSION}.linux-${ARCH}.tar.gz
37
+
38
+ # Set Go environment variables
39
+ ENV PATH="/usr/local/go/bin:${PATH}"
40
+ ENV GOPATH="/go"
41
+
42
+ # Optional: Set Go environment flags
43
+ ENV GOFLAGS="-buildvcs=false"
13
44
14
45
# Since the user does not match the owners of the repo "git rev-parse --is-inside-work-tree" fails and goreleaser does not populate projectName
15
46
# https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
Original file line number Diff line number Diff line change 1
1
BUILD_DIR := ./bin/
2
- GORELEASER_VERSION := v0.172.1
2
+ GORELEASER_VERSION := v2.4.4
3
3
GORELEASER_BIN ?= bin/goreleaser
4
4
5
5
bin :
@@ -27,10 +27,10 @@ release/deps: $(GORELEASER_BIN)
27
27
release/build : release/deps release/clean
28
28
ifeq ($(PRERELEASE ) , true)
29
29
@echo "===> $(INTEGRATION) === [release/build] PRE-RELEASE compiling all binaries, creating packages, archives"
30
- @$(GORELEASER_BIN) release --config $(CURDIR)/build/.goreleaser.yml --rm-dist
30
+ @$(GORELEASER_BIN) release --config $(CURDIR)/build/.goreleaser.yml --clean
31
31
else
32
32
@echo "===> $(INTEGRATION) === [release/build] build compiling all binaries"
33
- @$(GORELEASER_BIN) build --config $(CURDIR)/build/.goreleaser.yml --snapshot --rm-dist
33
+ @$(GORELEASER_BIN) build --config $(CURDIR)/build/.goreleaser.yml --snapshot --clean
34
34
endif
35
35
36
36
.PHONY : release/fix-archive
Original file line number Diff line number Diff line change 11
11
- 386
12
12
- arm
13
13
- arm64
14
+
15
+ - src : " {app_name}_linux_{version}_{arch}_fips.tar.gz"
16
+ uploads :
17
+ - type : file
18
+ dest : " {dest_prefix}binaries/linux/{arch}/{src}"
19
+ arch :
20
+ - amd64
21
+ - arm64
Original file line number Diff line number Diff line change
1
+ // Copyright 2024 New Relic Corporation. All rights reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ //go:build fips
5
+ // +build fips
6
+
7
+ package main
8
+
9
+ import (
10
+ _ "crypto/tls/fipsonly"
11
+ )
You can’t perform that action at this time.
0 commit comments