-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[SINT-5203] Use New Windows Code Signer #52030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,5 +17,17 @@ powershell_script_signing: | |
| - $WINDOWS_POWERSHELL_DIR | ||
| script: | ||
| - mkdir $WINDOWS_POWERSHELL_DIR | ||
| - docker run --rm -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e CI -e IS_AWS_CONTAINER=true -e WINDOWS_SIGNING_CERT -e WINDOWS_SIGNING_CONFIG ${WINBUILDIMAGE} powershell -C "if (`$Env:WINDOWS_SIGNING_CERT -and `$Env:WINDOWS_SIGNING_CONFIG) { dd-wcs sign --cert `$Env:WINDOWS_SIGNING_CERT --config `$Env:WINDOWS_SIGNING_CONFIG '\mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1' } else { dd-wcs sign '\mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1' }" | ||
| # documentation: https://github.com/DataDog/windows-code-signer | ||
| - docker run --rm | ||
| -v "$(Get-Location):c:\mnt" | ||
| -v "${CI_PROJECT_DIR}\.aws\credentials-by-job-id:C:\aws-creds" | ||
| -e "AWS_SHARED_CREDENTIALS_FILE=C:\aws-creds\${CI_JOB_ID}" | ||
| -e AWS_NETWORKING=true | ||
| -e CI | ||
| -e IS_AWS_CONTAINER=true | ||
| -e CI_IDENTITIES_GITLAB_ID_TOKEN | ||
| -e CI_JOB_NAME_SLUG | ||
| ${WINBUILDIMAGE} | ||
| powershell -C "C:\devtools\windows-code-signer.exe | ||
| sign \mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1" | ||
|
Comment on lines
+31
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In jobs that set Useful? React with 👍 / 👎. |
||
| - copy .\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1 $WINDOWS_POWERSHELL_DIR\Install-Datadog.ps1 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,8 +69,8 @@ | |
| 'PROGRAMFILES(X86)': 'Standard Windows installation location', | ||
| 'PROGRAMFILESW6432': 'Standard Windows installation location', | ||
| 'SIGN_WINDOWS_DD_WCS': 'Determines whether to sign Windows artifacts', | ||
| 'WINDOWS_SIGNING_CERT': 'S3 URL of the signing certificate to use with dd-wcs', | ||
| 'WINDOWS_SIGNING_CONFIG': 'S3 URL of the signing config to use with dd-wcs', | ||
| 'WINDOWS_SIGNING_CERT': 'S3 URL of the signing certificate to use with windows-code-signer.exe', | ||
| 'WINDOWS_SIGNING_CONFIG': 'S3 URL of the signing config to use with windows-code-signer.exe', | ||
|
Comment on lines
+72
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Omnibus Windows build runs signing from the Ruby process built by Useful? React with 👍 / 👎. |
||
| 'SSL_CERT_FILE': 'Used to point Ruby at the certificate for OpenSSL', | ||
| 'SYSTEMDRIVE': "goes with SYSTEMROOT", | ||
| 'SYSTEMROOT': 'Solves git: fatal: getaddrinfo() thread failed to start', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the
powershell_script_signingjob, scheduled pipelines setWINDOWS_SIGNING_CERTandWINDOWS_SIGNING_CONFIGin.gitlab-ci.yml, and the other updated signing call sites translate those into--cert ... --key-info ...; this direct invocation drops them entirely. When those variables are present, the install script will be signed with the signer's default key/config instead of the configured beta/release key, or fail if no default key info is available, so this command needs the same conditional arguments as the Omnibus/MSI paths.Useful? React with 👍 / 👎.