-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Deprecate Windows .bat scripts #31732
base: branden.clark/windows-fips-package
Are you sure you want to change the base?
Deprecate Windows .bat scripts #31732
Conversation
Gitlab CI Configuration ChangesModified Jobsvariables (configuration) variables:
AGENT_API_KEY_ORG2: agent-api-key-org-2
AGENT_APP_KEY_ORG2: agent-ci-app-key-org-2
AGENT_BINARIES_DIR: bin/agent
AGENT_GITHUB_APP: agent-github-app
AGENT_QA_E2E: agent-qa-e2e
API_KEY_ORG2: ci.datadog-agent.datadog_api_key_org2
ARTIFACT_DOWNLOAD_ATTEMPTS: 2
ATLASSIAN_WRITE: atlassian-write
BTFHUB_ARCHIVE_BRANCH: main
BUCKET_BRANCH: dev
CHANGELOG_COMMIT_SHA: ci.datadog-agent.gitlab_changelog_commit_sha
CHOCOLATEY_API_KEY: ci.datadog-agent.chocolatey_api_key
CI_IMAGE_BTF_GEN: v50094600-7b86dd80
CI_IMAGE_BTF_GEN_SUFFIX: ''
CI_IMAGE_DD_AGENT_TESTING: v50094600-7b86dd80
CI_IMAGE_DD_AGENT_TESTING_SUFFIX: ''
CI_IMAGE_DEB_ARM64: v50094600-7b86dd80
CI_IMAGE_DEB_ARM64_SUFFIX: ''
CI_IMAGE_DEB_ARMHF: v50094600-7b86dd80
CI_IMAGE_DEB_ARMHF_SUFFIX: ''
CI_IMAGE_DEB_X64: v50094600-7b86dd80
CI_IMAGE_DEB_X64_SUFFIX: ''
CI_IMAGE_DOCKER_ARM64: v50094600-7b86dd80
CI_IMAGE_DOCKER_ARM64_SUFFIX: ''
CI_IMAGE_DOCKER_X64: v50094600-7b86dd80
CI_IMAGE_DOCKER_X64_SUFFIX: ''
CI_IMAGE_GITLAB_AGENT_DEPLOY: v50094600-7b86dd80
CI_IMAGE_GITLAB_AGENT_DEPLOY_SUFFIX: ''
CI_IMAGE_LINUX_GLIBC_2_17_X64: v50094600-7b86dd80
CI_IMAGE_LINUX_GLIBC_2_17_X64_SUFFIX: ''
CI_IMAGE_LINUX_GLIBC_2_23_ARM64: v50094600-7b86dd80
CI_IMAGE_LINUX_GLIBC_2_23_ARM64_SUFFIX: ''
CI_IMAGE_RPM_ARM64: v50094600-7b86dd80
CI_IMAGE_RPM_ARM64_SUFFIX: ''
CI_IMAGE_RPM_ARMHF: v50094600-7b86dd80
CI_IMAGE_RPM_ARMHF_SUFFIX: ''
CI_IMAGE_RPM_X64: v50094600-7b86dd80
CI_IMAGE_RPM_X64_SUFFIX: ''
CI_IMAGE_SYSTEM_PROBE_ARM64: v50094600-7b86dd80
CI_IMAGE_SYSTEM_PROBE_ARM64_SUFFIX: ''
CI_IMAGE_SYSTEM_PROBE_X64: v50094600-7b86dd80
CI_IMAGE_SYSTEM_PROBE_X64_SUFFIX: ''
CI_IMAGE_WIN_1809_X64: v50094600-7b86dd80
CI_IMAGE_WIN_1809_X64_SUFFIX: ''
CI_IMAGE_WIN_LTSC2022_X64: v50094600-7b86dd80
CI_IMAGE_WIN_LTSC2022_X64_SUFFIX: ''
CLANG_LLVM_VER: 12.0.1
CLUSTER_AGENT_BINARIES_DIR: bin/datadog-cluster-agent
CLUSTER_AGENT_CLOUDFOUNDRY_BINARIES_DIR: bin/datadog-cluster-agent-cloudfoundry
CODECOV: codecov
CODECOV_TOKEN: ci.datadog-agent.codecov_token
CWS_INSTRUMENTATION_BINARIES_DIR: bin/cws-instrumentation
DATADOG_AGENT_ARMBUILDIMAGES: v50094600-7b86dd80
DATADOG_AGENT_ARMBUILDIMAGES_SUFFIX: ''
DATADOG_AGENT_BTF_GEN_BUILDIMAGES: v50094600-7b86dd80
DATADOG_AGENT_BTF_GEN_BUILDIMAGES_SUFFIX: ''
DATADOG_AGENT_BUILDIMAGES: v50094600-7b86dd80
DATADOG_AGENT_BUILDIMAGES_SUFFIX: ''
DATADOG_AGENT_EMBEDDED_PATH: /opt/datadog-agent/embedded
DATADOG_AGENT_SYSPROBE_BUILDIMAGES: v50094600-7b86dd80
DATADOG_AGENT_SYSPROBE_BUILDIMAGES_SUFFIX: ''
- DATADOG_AGENT_WINBUILDIMAGES: v50094600-7b86dd80
? ^ --- ^^^^ ---
+ DATADOG_AGENT_WINBUILDIMAGES: v50213924-c45929ed
? ^^^ + ^^^^^^^
DATADOG_AGENT_WINBUILDIMAGES_SUFFIX: ''
DD_AGENT_TESTING_DIR: $CI_PROJECT_DIR/test/kitchen
DD_PKG_VERSION: latest
DEB_GPG_KEY: ci.datadog-agent.deb_signing_private_key_${DEB_GPG_KEY_ID}
DEB_GPG_KEY_ID: c0962c7d
DEB_GPG_KEY_NAME: Datadog, Inc. APT key
DEB_RPM_TESTING_BUCKET_BRANCH: testing
DEB_S3_BUCKET: apt.datad0g.com
DEB_SIGNING_PASSPHRASE: ci.datadog-agent.deb_signing_key_passphrase_${DEB_GPG_KEY_ID}
DEB_TESTING_S3_BUCKET: apttesting.datad0g.com
DOCKER_REGISTRY_LOGIN: ci.datadog-agent.docker_hub_login
DOCKER_REGISTRY_PWD: ci.datadog-agent.docker_hub_pwd
DOCKER_REGISTRY_RO: dockerhub-readonly
DOCKER_REGISTRY_URL: docker.io
DOGSTATSD_BINARIES_DIR: bin/dogstatsd
E2E_AZURE: e2e-azure
E2E_GCP: e2e-gcp
EXECUTOR_JOB_SECTION_ATTEMPTS: 2
FF_KUBERNETES_HONOR_ENTRYPOINT: true
FF_SCRIPT_SECTIONS: 1
GENERAL_ARTIFACTS_CACHE_BUCKET_URL: https://dd-agent-omnibus.s3.amazonaws.com
GET_SOURCES_ATTEMPTS: 2
GITLAB_TOKEN: gitlab-token
GO_TEST_SKIP_FLAKE: 'true'
INSTALL_SCRIPT_API_KEY_ORG2: install-script-api-key-org-2
INTEGRATION_WHEELS_CACHE_BUCKET: dd-agent-omnibus
KERNEL_MATRIX_TESTING_ARM_AMI_ID: ami-0b5f838a19d37fc61
KERNEL_MATRIX_TESTING_X86_AMI_ID: ami-05b3973acf5422348
KITCHEN_AWS: kitchen-aws
KITCHEN_AZURE: kitchen-azure
KITCHEN_INFRASTRUCTURE_FLAKES_RETRY: 2
MACOS_GITHUB_APP_1: macos-github-app-one
MACOS_GITHUB_APP_2: macos-github-app-two
MACOS_S3_BUCKET: dd-agent-macostesting
OMNIBUS_BASE_DIR: /omnibus
OMNIBUS_GIT_CACHE_DIR: /tmp/omnibus-git-cache
OMNIBUS_PACKAGE_DIR: $CI_PROJECT_DIR/omnibus/pkg/
OMNIBUS_PACKAGE_DIR_SUSE: $CI_PROJECT_DIR/omnibus/suse/pkg
PROCESS_S3_BUCKET: datad0g-process-agent
RELEASE_VERSION_6: nightly
RELEASE_VERSION_7: nightly-a7
RESTORE_CACHE_ATTEMPTS: 2
RPM_GPG_KEY: ci.datadog-agent.rpm_signing_private_key_${RPM_GPG_KEY_ID}
RPM_GPG_KEY_ID: b01082d3
RPM_GPG_KEY_NAME: Datadog, Inc. RPM key
RPM_S3_BUCKET: yum.datad0g.com
RPM_SIGNING_PASSPHRASE: ci.datadog-agent.rpm_signing_key_passphrase_${RPM_GPG_KEY_ID}
RPM_TESTING_S3_BUCKET: yumtesting.datad0g.com
RUN_E2E_TESTS: auto
RUN_KMT_TESTS: auto
RUN_UNIT_TESTS: auto
S3_ARTIFACTS_URI: s3://dd-ci-artefacts-build-stable/$CI_PROJECT_NAME/$CI_PIPELINE_ID
S3_CP_CMD: aws s3 cp $S3_CP_OPTIONS
S3_CP_OPTIONS: --no-progress --region us-east-1 --sse AES256
S3_DD_AGENT_OMNIBUS_BTFS_URI: s3://dd-agent-omnibus/btfs
S3_DD_AGENT_OMNIBUS_JAVA_URI: s3://dd-agent-omnibus/openjdk
S3_DD_AGENT_OMNIBUS_LLVM_URI: s3://dd-agent-omnibus/llvm
S3_DSD6_URI: s3://dsd6-staging
S3_OMNIBUS_CACHE_BUCKET: dd-ci-datadog-agent-omnibus-cache-build-stable
S3_PERMANENT_ARTIFACTS_URI: s3://dd-ci-persistent-artefacts-build-stable/$CI_PROJECT_NAME
S3_PROJECT_ARTIFACTS_URI: s3://dd-ci-artefacts-build-stable/$CI_PROJECT_NAME
S3_RELEASE_ARTIFACTS_URI: s3://dd-release-artifacts/$CI_PROJECT_NAME/$CI_PIPELINE_ID
S3_RELEASE_INSTALLER_ARTIFACTS_URI: s3://dd-release-artifacts/datadog-installer/$CI_PIPELINE_ID
S3_SBOM_STORAGE_URI: s3://sbom-root-us1-ddbuild-io/$CI_PROJECT_NAME/$CI_PIPELINE_ID
SLACK_AGENT: slack-agent-ci
SMP_ACCOUNT: smp
STATIC_BINARIES_DIR: bin/static
SYSTEM_PROBE_BINARIES_DIR: bin/system-probe
USE_S3_CACHING: --omnibus-s3-cache
VCPKG_BLOB_SAS_URL: ci.datadog-agent-buildimages.vcpkg_blob_sas_url
WINDOWS_BUILDS_S3_BUCKET: $WIN_S3_BUCKET/builds
WINDOWS_POWERSHELL_DIR: $CI_PROJECT_DIR/signed_scripts
WINDOWS_TESTING_S3_BUCKET_A6: pipelines/A6/$CI_PIPELINE_ID
WINDOWS_TESTING_S3_BUCKET_A7: pipelines/A7/$CI_PIPELINE_ID
WINGET_PAT: ci.datadog-agent.winget_pat
WIN_S3_BUCKET: dd-agent-mstesting .windows_main_agent_base .windows_main_agent_base:
after_script:
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg
needs:
- go_mod_tidy_check
- go_deps
script:
- $ErrorActionPreference = 'Stop'
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
- if (Test-Path omnibus\pkg) { remove-item -recurse -force omnibus\pkg }
- mkdir omnibus\pkg
- 'docker run --rm -m 24576M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID}
-e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e CI_PROJECT_NAME=${CI_PROJECT_NAME} -e CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
-e CI_JOB_NAME_SLUG=${CI_JOB_NAME_SLUG} -e CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
-e OMNIBUS_TARGET=${OMNIBUS_TARGET} -e WINDOWS_BUILDER=true -e RELEASE_VERSION="$RELEASE_VERSION"
-e MAJOR_VERSION="7" -e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION"
-e GOMODCACHE="c:\modcache" -e AWS_NETWORKING=true -e SIGN_WINDOWS_DD_WCS=true
-e TARGET_ARCH="$ARCH" -e DEBUG_CUSTOMACTION="$DEBUG_CUSTOMACTION" -e BUCKET_BRANCH="$BUCKET_BRANCH"
-e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET" -e USE_S3_CACHING="$USE_S3_CACHING"
- -e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e GO_VERSION_CHECK="true"
- -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG} -e PIP_INDEX_URL=${PIP_INDEX_URL}
+ -e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG}
+ -e PIP_INDEX_URL=${PIP_INDEX_URL} -e API_KEY_ORG2=${API_KEY_ORG2} -e AGENT_FLAVOR=${AGENT_FLAVOR}
- -e API_KEY_ORG2=${API_KEY_ORG2} registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
? --------------------------------
+ registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
- c:\mnt\tasks\winbuildscripts\buildwin.bat
+ powershell -C "c:\mnt\tasks\winbuildscripts\Build-AgentPackages.ps1 -BuildOutOfSource
+ 1 -InstallDeps 1 -CheckGoVersion 1"
'
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
- Invoke-Expression "$S3_CP_CMD omnibus\pkg\version-manifest.json $S3_SBOM_STORAGE_URI/$CI_JOB_NAME/version-manifest.json"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
stage: package_build
tags:
- runner:windows-docker
- windowsversion:1809
variables:
OMNIBUS_TARGET: main .windows_msi_base .windows_msi_base:
after_script:
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg
needs:
- go_mod_tidy_check
- go_deps
script:
- $ErrorActionPreference = 'Stop'
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
- if (Test-Path omnibus\pkg) { remove-item -recurse -force omnibus\pkg }
- mkdir omnibus\pkg
- 'docker run --rm -m 24576M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID}
-e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e CI_PROJECT_NAME=${CI_PROJECT_NAME} -e CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
-e CI_JOB_NAME_SLUG=${CI_JOB_NAME_SLUG} -e CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
-e OMNIBUS_TARGET=${OMNIBUS_TARGET} -e WINDOWS_BUILDER=true -e RELEASE_VERSION="$RELEASE_VERSION"
-e MAJOR_VERSION="7" -e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION"
-e GOMODCACHE="c:\modcache" -e AWS_NETWORKING=true -e SIGN_WINDOWS_DD_WCS=true
-e TARGET_ARCH="$ARCH" -e DEBUG_CUSTOMACTION="$DEBUG_CUSTOMACTION" -e BUCKET_BRANCH="$BUCKET_BRANCH"
-e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET" -e USE_S3_CACHING="$USE_S3_CACHING"
- -e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e GO_VERSION_CHECK="true"
- -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG} -e PIP_INDEX_URL=${PIP_INDEX_URL}
+ -e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG}
+ -e PIP_INDEX_URL=${PIP_INDEX_URL} -e API_KEY_ORG2=${API_KEY_ORG2} -e AGENT_FLAVOR=${AGENT_FLAVOR}
- -e API_KEY_ORG2=${API_KEY_ORG2} registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
? --------------------------------
+ registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
- c:\mnt\tasks\winbuildscripts\buildwin.bat
+ powershell -C "c:\mnt\tasks\winbuildscripts\Build-AgentPackages.ps1 -BuildOutOfSource
+ 1 -InstallDeps 1 -CheckGoVersion 1"
'
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
- Invoke-Expression "$S3_CP_CMD omnibus\pkg\version-manifest.json $S3_SBOM_STORAGE_URI/$CI_JOB_NAME/version-manifest.json"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
stage: package_build
tags:
- runner:windows-docker
- windowsversion:1809 windows-installer-amd64 windows-installer-amd64:
after_script:
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg
needs:
- go_mod_tidy_check
- go_deps
rules:
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- when: on_success
script:
- $ErrorActionPreference = 'Stop'
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
- if (Test-Path omnibus\pkg) { remove-item -recurse -force omnibus\pkg }
- mkdir omnibus\pkg
- 'docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID}
-e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e CI_PROJECT_NAME=${CI_PROJECT_NAME} -e CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
-e CI_JOB_NAME_SLUG=${CI_JOB_NAME_SLUG} -e CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
-e WINDOWS_BUILDER=true -e RELEASE_VERSION="$RELEASE_VERSION" -e GOMODCACHE="c:\modcache"
-e AWS_NETWORKING=true -e SIGN_WINDOWS_DD_WCS=true -e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET"
-e USE_S3_CACHING="$USE_S3_CACHING" -e API_KEY_ORG2=${API_KEY_ORG2} registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
- c:\mnt\tasks\winbuildscripts\buildinstaller.bat
+ powershell -C "c:\mnt\tasks\winbuildscripts\Build-InstallerPackages.ps1 -BuildOutOfSource
+ 1 -InstallDeps 1 -CheckGoVersion 1"
'
stage: package_build
tags:
- runner:windows-docker
- windowsversion:1809
variables:
ARCH: x64
RELEASE_VERSION: $RELEASE_VERSION_7 windows_msi_and_bosh_zip_x64-a7 windows_msi_and_bosh_zip_x64-a7:
after_script:
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg
before_script:
- set RELEASE_VERSION $RELEASE_VERSION_7
needs:
- go_mod_tidy_check
- go_deps
rules:
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- when: on_success
script:
- $ErrorActionPreference = 'Stop'
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
- if (Test-Path omnibus\pkg) { remove-item -recurse -force omnibus\pkg }
- mkdir omnibus\pkg
- 'docker run --rm -m 24576M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID}
-e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e CI_PROJECT_NAME=${CI_PROJECT_NAME} -e CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
-e CI_JOB_NAME_SLUG=${CI_JOB_NAME_SLUG} -e CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
-e OMNIBUS_TARGET=${OMNIBUS_TARGET} -e WINDOWS_BUILDER=true -e RELEASE_VERSION="$RELEASE_VERSION"
-e MAJOR_VERSION="7" -e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION"
-e GOMODCACHE="c:\modcache" -e AWS_NETWORKING=true -e SIGN_WINDOWS_DD_WCS=true
-e TARGET_ARCH="$ARCH" -e DEBUG_CUSTOMACTION="$DEBUG_CUSTOMACTION" -e BUCKET_BRANCH="$BUCKET_BRANCH"
-e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET" -e USE_S3_CACHING="$USE_S3_CACHING"
- -e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e GO_VERSION_CHECK="true"
- -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG} -e PIP_INDEX_URL=${PIP_INDEX_URL}
+ -e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG}
+ -e PIP_INDEX_URL=${PIP_INDEX_URL} -e API_KEY_ORG2=${API_KEY_ORG2} -e AGENT_FLAVOR=${AGENT_FLAVOR}
- -e API_KEY_ORG2=${API_KEY_ORG2} registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
? --------------------------------
+ registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
- c:\mnt\tasks\winbuildscripts\buildwin.bat
+ powershell -C "c:\mnt\tasks\winbuildscripts\Build-AgentPackages.ps1 -BuildOutOfSource
+ 1 -InstallDeps 1 -CheckGoVersion 1"
'
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
- Invoke-Expression "$S3_CP_CMD omnibus\pkg\version-manifest.json $S3_SBOM_STORAGE_URI/$CI_JOB_NAME/version-manifest.json"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
stage: package_build
tags:
- runner:windows-docker
- windowsversion:1809
timeout: 2h
variables:
ARCH: x64
OMNIBUS_TARGET: main windows_zip_agent_binaries_x64-a7 windows_zip_agent_binaries_x64-a7:
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg
before_script:
- set RELEASE_VERSION $RELEASE_VERSION_7
needs:
- go_mod_tidy_check
- go_deps
rules:
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- when: on_success
script:
- $ErrorActionPreference = "Stop"
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
- if (Test-Path omnibus\pkg) { remove-item -recurse -force omnibus\pkg }
- mkdir omnibus\pkg
- 'docker run --rm -m 8192M -v "$(Get-Location):c:\mnt" -e CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
-e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e CI_PROJECT_NAME=${CI_PROJECT_NAME} -e CI_JOB_NAME_SLUG=${CI_JOB_NAME_SLUG}
-e CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} -e OMNIBUS_TARGET=${OMNIBUS_TARGET}
-e WINDOWS_BUILDER=true -e RELEASE_VERSION="$RELEASE_VERSION" -e MAJOR_VERSION="7"
-e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION" -e GOMODCACHE="c:\modcache"
-e AWS_NETWORKING=true -e SIGN_WINDOWS_DD_WCS=true -e BUCKET_BRANCH="$BUCKET_BRANCH"
-e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET"
-e USE_S3_CACHING="$USE_S3_CACHING" -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG}
-e PIP_INDEX_URL=${PIP_INDEX_URL} -e API_KEY_ORG2=${API_KEY_ORG2} registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
- c:\mnt\tasks\winbuildscripts\buildwin.bat
+ powershell -C "c:\mnt\tasks\winbuildscripts\Build-OmnibusTarget.ps1 -BuildOutOfSource
+ 1 -InstallDeps 1 -CheckGoVersion 1"
'
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
- Invoke-Expression "$S3_CP_CMD omnibus\pkg\version-manifest.json $S3_SBOM_STORAGE_URI/$CI_JOB_NAME/version-manifest.json"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
stage: package_build
tags:
- runner:windows-docker
- windowsversion:1809
variables:
ARCH: x64
OMNIBUS_TARGET: agent_binaries Added Jobswindows_msi_and_bosh_zip_x64-a7-fipswindows_msi_and_bosh_zip_x64-a7-fips:
after_script:
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
artifacts:
expire_in: 2 weeks
paths:
- omnibus/pkg
before_script:
- set RELEASE_VERSION $RELEASE_VERSION_7
needs:
- go_mod_tidy_check
- go_deps
rules:
- if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
when: never
- when: on_success
script:
- $ErrorActionPreference = 'Stop'
- $_instance_id = (iwr -UseBasicParsing http://169.254.169.254/latest/meta-data/instance-id).content
; Write-Host "Running on instance $($_instance_id)"
- if (Test-Path omnibus\pkg) { remove-item -recurse -force omnibus\pkg }
- mkdir omnibus\pkg
- 'docker run --rm -m 24576M -v "$(Get-Location):c:\mnt" -e CI_JOB_ID=${CI_JOB_ID}
-e CI_PIPELINE_ID=${CI_PIPELINE_ID} -e CI_PROJECT_NAME=${CI_PROJECT_NAME} -e CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH}
-e CI_JOB_NAME_SLUG=${CI_JOB_NAME_SLUG} -e CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME}
-e OMNIBUS_TARGET=${OMNIBUS_TARGET} -e WINDOWS_BUILDER=true -e RELEASE_VERSION="$RELEASE_VERSION"
-e MAJOR_VERSION="7" -e INTEGRATIONS_CORE_VERSION="$INTEGRATIONS_CORE_VERSION"
-e GOMODCACHE="c:\modcache" -e AWS_NETWORKING=true -e SIGN_WINDOWS_DD_WCS=true
-e TARGET_ARCH="$ARCH" -e DEBUG_CUSTOMACTION="$DEBUG_CUSTOMACTION" -e BUCKET_BRANCH="$BUCKET_BRANCH"
-e S3_OMNIBUS_CACHE_BUCKET="$S3_OMNIBUS_CACHE_BUCKET" -e USE_S3_CACHING="$USE_S3_CACHING"
-e INTEGRATION_WHEELS_CACHE_BUCKET="$INTEGRATION_WHEELS_CACHE_BUCKET" -e BUNDLE_MIRROR__RUBYGEMS__ORG=${BUNDLE_MIRROR__RUBYGEMS__ORG}
-e PIP_INDEX_URL=${PIP_INDEX_URL} -e API_KEY_ORG2=${API_KEY_ORG2} -e AGENT_FLAVOR=${AGENT_FLAVOR}
registry.ddbuild.io/ci/datadog-agent-buildimages/windows_1809_${ARCH}${Env:DATADOG_AGENT_WINBUILDIMAGES_SUFFIX}:${Env:DATADOG_AGENT_WINBUILDIMAGES}
powershell -C "c:\mnt\tasks\winbuildscripts\Build-AgentPackages.ps1 -BuildOutOfSource
1 -InstallDeps 1 -CheckGoVersion 1"
'
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
- get-childitem omnibus\pkg
- Invoke-Expression "$S3_CP_CMD omnibus\pkg\version-manifest.json $S3_SBOM_STORAGE_URI/$CI_JOB_NAME/version-manifest.json"
- If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" }
stage: package_build
tags:
- runner:windows-docker
- windowsversion:1809
timeout: 2h
variables:
AGENT_FLAVOR: fips
ARCH: x64
OMNIBUS_TARGET: main Changes Summary
ℹ️ Diff available in the job log. |
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: be4b703 Optimization Goals: ✅ No significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
➖ | basic_py_check | % cpu utilization | +1.34 | [-2.55, +5.23] | 1 | Logs |
➖ | file_tree | memory utilization | +1.13 | [+0.98, +1.28] | 1 | Logs |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.43 | [-0.28, +1.15] | 1 | Logs |
➖ | otel_to_otel_logs | ingress throughput | +0.35 | [-0.31, +1.02] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.27 | [-0.52, +1.06] | 1 | Logs |
➖ | quality_gate_logs | % cpu utilization | +0.11 | [-2.83, +3.05] | 1 | Logs |
➖ | file_to_blackhole_100ms_latency | egress throughput | +0.06 | [-0.63, +0.76] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | +0.05 | [-0.01, +0.11] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.03 | [-0.72, +0.77] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.01 | [-0.09, +0.11] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.00 | [-0.62, +0.63] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.01, +0.01] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | -0.01 | [-0.06, +0.03] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_500ms_latency | egress throughput | -0.12 | [-0.88, +0.64] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | -0.30 | [-0.76, +0.16] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | -0.40 | [-0.50, -0.31] | 1 | Logs bounds checks dashboard |
➖ | pycheck_lots_of_tags | % cpu utilization | -2.41 | [-5.81, +0.98] | 1 | Logs |
Bounds Checks: ✅ Passed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
✅ | file_to_blackhole_0ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_1000ms_latency_linear_load | memory_usage | 10/10 | |
✅ | file_to_blackhole_100ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_300ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
✅ | file_to_blackhole_500ms_latency | lost_bytes | 10/10 | |
✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 | |
✅ | quality_gate_idle | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_idle_all_features | memory_usage | 10/10 | bounds checks dashboard |
✅ | quality_gate_logs | lost_bytes | 10/10 | |
✅ | quality_gate_logs | memory_usage | 10/10 |
Explanation
Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
What does this PR do?
Replaces several Windows .bat build scripts with PowerShell and Python invoke
Adds PowerShell helper
Invoke-BuildScript
that performs the setup that was common to every .bat file, such as moving into the container filesystem, installing go deps, setting PATH, etc. These actions can be controlled by script parameters so, for example, you don't have to wait forinv -deps
on every local build...Only modifies the Agent and Installer build scripts/CI Jobs, other .bat files to be migrated in future PRs.
Motivation
Reduce time wasted on .bat syntax limitations and idiosyncrasies
Reduce duplicated and complex .bat commands
Describe how you validated your changes
Ensure the Agent and Installer builds still work
Ensure go mod cache is extracted
Ensure change to
.go-version
is caughtPossible Drawbacks / Trade-offs
Additional Notes
stacked on #31466