File tree Expand file tree Collapse file tree 2 files changed +42
-10
lines changed
Expand file tree Collapse file tree 2 files changed +42
-10
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ build-darwin-arm64:
2525build-windows-amd64 :
2626 GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_OPTS ) -o $(BIN_WINDOWS_AMD64 ) main.go
2727
28+ sign-binaries : sign-binary-windows-amd64
29+ # This needs to run in a Docker container with the graylog/internal-codesigntool image
30+ codesigntool sign $(BIN_WINDOWS_AMD64 )
31+
32+ sign-binary-windows-amd64 :
33+
2834install : install-linux install-darwin-amd64
2935
3036install-darwin-amd64 : build-darwin-amd64
Original file line number Diff line number Diff line change @@ -29,17 +29,35 @@ pipeline
2929
3030 sh " make"
3131 }
32+ }
33+
34+ stage(' Sign Windows Binaries' )
35+ {
36+ agent
37+ {
38+ docker
39+ {
40+ image ' graylog/internal-codesigntool:latest'
41+ args ' -u jenkins:jenkins'
42+ registryCredentialsId ' docker-hub'
43+ alwaysPull true
44+ reuseNode true
45+ }
46+ }
47+
48+ environment
49+ {
50+ CODESIGN_USER = credentials(' codesign-user' )
51+ CODESIGN_PASS = credentials(' codesign-pass' )
52+ CODESIGN_TOTP_SECRET = credentials(' codesign-totp-secret' )
53+ CODESIGN_CREDENTIAL_ID = credentials(' codesign-credential-id' )
54+ }
55+
56+ steps
57+ {
58+ sh ' make sign-binaries'
59+ }
3260
33- post
34- {
35- success
36- {
37- archiveArtifacts ' *.linux'
38- archiveArtifacts ' *.darwin-amd64'
39- archiveArtifacts ' *.darwin-arm64'
40- archiveArtifacts ' *.exe'
41- }
42- }
4361 }
4462
4563 stage(' Release' )
@@ -76,6 +94,14 @@ pipeline
7694
7795 post
7896 {
97+ success
98+ {
99+ archiveArtifacts ' *.linux'
100+ archiveArtifacts ' *.darwin-amd64'
101+ archiveArtifacts ' *.darwin-arm64'
102+ archiveArtifacts ' *.exe'
103+ }
104+
79105 cleanup
80106 {
81107 cleanWs()
You can’t perform that action at this time.
0 commit comments