-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet Automation] Sign and deploy the PowerShell script (#29605)
Co-authored-by: Nicolas Schweitzer <[email protected]>
- Loading branch information
1 parent
a069984
commit a3c8f2a
Showing
8 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.gitlab/powershell_script_deploy/powershell_script_deploy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# We could (should?) piggy back on deploy_installer_packages_windows-x64 to also deploy this | ||
# script to $S3_RELEASE_INSTALLER_ARTIFACTS_URI and have the agent-release-management repository | ||
# publish it to a production bucket like ddagent-windows-stable. | ||
# For now we can use the dd-agent-mstesting bucket to store the PowerShell script. | ||
powershell_script_deploy: | ||
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES | ||
tags: ["arch:amd64"] | ||
stage: choco_and_install_script_deploy | ||
rules: | ||
!reference [.manual] | ||
needs: ["powershell_script_signing"] | ||
script: | ||
- ls $WINDOWS_POWERSHELL_DIR | ||
- $S3_CP_CMD $WINDOWS_POWERSHELL_DIR/Install-Datadog.ps1 s3://dd-agent-mstesting/Install-Datadog.ps1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=id=3a6e02b08553fd157ae3fb918945dd1eaae5a1aa818940381ef07a430cf25732 | ||
|
||
# Technically deploy_installer_packages_windows-x64 also uploads the bootstrapper to $S3_RELEASE_INSTALLER_ARTIFACTS_URI | ||
# but it requires changes in agent-release-management to deploy to a production bucket like ddagent-windows-stable. | ||
# For now we can use the dd-agent-mstesting bucket to store the bootstrapper. | ||
windows_bootstrapper_deploy: | ||
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/gitlab_agent_deploy$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES | ||
tags: ["arch:amd64"] | ||
stage: choco_and_install_script_deploy | ||
rules: | ||
!reference [.manual] | ||
needs: ["windows-installer-amd64"] | ||
script: | ||
- ls $OMNIBUS_PACKAGE_DIR | ||
- $S3_CP_CMD $OMNIBUS_PACKAGE_DIR/datadog-installer-*-1-x86_64.exe s3://dd-agent-mstesting/datadog-installer-x86_64.exe --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=id=3a6e02b08553fd157ae3fb918945dd1eaae5a1aa818940381ef07a430cf25732 |
16 changes: 16 additions & 0 deletions
16
.gitlab/powershell_script_signing/powershell_script_signing.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
powershell_script_signing: | ||
tags: ["runner:windows-docker", "windowsversion:1809"] | ||
stage: choco_and_install_script_build | ||
needs: [] | ||
variables: | ||
ARCH: "x64" | ||
rules: | ||
!reference [.manual] | ||
artifacts: | ||
expire_in: 2 weeks | ||
paths: | ||
- $WINDOWS_POWERSHELL_DIR | ||
script: | ||
- mkdir $WINDOWS_POWERSHELL_DIR | ||
- docker run --rm -v "$(Get-Location):c:\mnt" -e AWS_NETWORKING=true -e IS_AWS_CONTAINER=true 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES} powershell -C "dd-wcs sign \mnt\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1" | ||
- copy .\tools\windows\DatadogAgentInstallScript\Install-Datadog.ps1 $WINDOWS_POWERSHELL_DIR\Install-Datadog.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters