Skip to content
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

CI: DCA: use gitlab artifacts for the binaries instead of an S3 bucket #33698

Merged
merged 12 commits into from
Feb 5, 2025

Conversation

chouquette
Copy link
Contributor

What does this PR do?

Stop manually uploading binaries to S3 and rely on gitlab artifacts

Motivation

Simplifying our pipelines & access control

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

@chouquette chouquette added changelog/no-changelog qa/no-code-change No code change in Agent code requiring validation team/agent-delivery labels Feb 4, 2025
@chouquette chouquette requested review from a team as code owners February 4, 2025 15:15
@github-actions github-actions bot added the medium review PR review might take time label Feb 4, 2025
@chouquette chouquette added the ask-review Ask required teams to review this PR label Feb 4, 2025
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 4, 2025

[Fast Unit Tests Report]

On pipeline 54935124 (CI Visibility). The following jobs did not run any unit tests:

Jobs:
  • tests_deb-arm64-py3
  • tests_deb-x64-py3
  • tests_flavor_dogstatsd_deb-x64
  • tests_flavor_heroku_deb-x64
  • tests_flavor_iot_deb-x64
  • tests_rpm-arm64-py3
  • tests_rpm-x64-py3
  • tests_windows-x64

If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 4, 2025

Uncompressed package size comparison

Comparison with ancestor 0ef59f7d485da3ca9c8d8f3a7117fe207b4ef7a7

Diff per package
package diff status size ancestor threshold
datadog-agent-amd64-deb 0.00MB 873.45MB 873.45MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 883.19MB 883.19MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 883.19MB 883.19MB 0.50MB
datadog-agent-arm64-deb 0.00MB 861.34MB 861.34MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 871.06MB 871.06MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 59.09MB 59.09MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 59.17MB 59.17MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 59.17MB 59.17MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 56.56MB 56.56MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 445.70MB 445.70MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 86.23MB 86.23MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 86.30MB 86.30MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 86.30MB 86.30MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 82.50MB 82.50MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 82.57MB 82.57MB 0.50MB

Decision

✅ Passed

Copy link
Contributor

@CelianR CelianR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK with my suggestion

.gitlab/binary_build/cluster_agent.yml Outdated Show resolved Hide resolved
Comment on lines 241 to 242
- cp $CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent $BUILD_CONTEXT/
- cp -R $CWS_INSTRUMENTATION_BINARIES_DIR $BUILD_CONTEXT/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better with mv? I'm not sure why cp is used and not mv but I may miss something (same for other jobs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it changes much since the repo will be cleaned right after the job, but it doesn't hurt to do so :)

Copy link
Member

@chouetz chouetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor follow-up comments, OK when you have a green pipeline

@@ -5,7 +5,10 @@
script:
- inv check-go-version
- inv -e cws-instrumentation.build
- $S3_CP_CMD $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation $S3_ARTIFACTS_URI/datadog-cws-instrumentation/cws-instrumentation.$ARCH
- mv $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.$ARCH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strange to have such a mv command here, I suppose we could create the correct artefact from the invoke task directly (as a follow-up)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair, and done!

variables:
IMAGE: registry.ddbuild.io/ci/datadog-agent/cws-instrumentation
BUILD_CONTEXT: Dockerfiles/cws-instrumentation
before_script:
- cp $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.amd64 $BUILD_CONTEXT/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably have $ARCH as variable like in the build jobs (even if such factorisation is not really great for readability here). As previously, this is a possible follow-up task

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turns out it was already defined so I included the change :) Thanks!

Copy link

cit-pr-commenter bot commented Feb 4, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 2fae39f1-d7d6-458b-9b09-83785d6fbe9a

Baseline: 0ef59f7
Comparison: 7b36356
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
quality_gate_logs % cpu utilization +2.79 [-0.33, +5.91] 1 Logs
file_tree memory utilization +0.41 [+0.35, +0.48] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.31 [-0.47, +1.09] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.05 [-0.85, +0.95] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.03 [-0.60, +0.67] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.01, +0.02] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.00 [-0.94, +0.94] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.29, +0.28] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.01 [-0.71, +0.69] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.03 [-0.95, +0.89] 1 Logs
quality_gate_idle memory utilization -0.09 [-0.12, -0.05] 1 Logs bounds checks dashboard
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.11 [-0.57, +0.36] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.12 [-0.90, +0.67] 1 Logs
quality_gate_idle_all_features memory utilization -0.38 [-0.44, -0.32] 1 Logs bounds checks dashboard
uds_dogstatsd_to_api_cpu % cpu utilization -1.17 [-2.05, -0.28] 1 Logs
tcp_syslog_to_blackhole ingress throughput -1.92 [-1.97, -1.86] 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_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 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 intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10
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:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. 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.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.

@chouquette chouquette requested a review from a team as a code owner February 5, 2025 07:43
@github-actions github-actions bot added long review PR is complex, plan time to review it and removed medium review PR review might take time labels Feb 5, 2025
@chouquette chouquette force-pushed the chouquette/dca_gitlab_artifacts branch from 92c932d to 7b36356 Compare February 5, 2025 08:19
@agent-platform-auto-pr
Copy link
Contributor

Gitlab CI Configuration Changes

Modified Jobs

.cluster_agent-build_common
  .cluster_agent-build_common:
+   artifacts:
+     exclude:
+     - Dockerfiles/cluster-agent/security-agent-policies/.git/**/*
+     - Dockerfiles/cluster-agent/security-agent-policies/.github/**/*
+     paths:
+     - $CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent
+     - Dockerfiles/cluster-agent/datadog-cluster.yaml
+     - Dockerfiles/cluster-agent/security-agent-policies
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    needs:
    - go_mod_tidy_check
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - inv check-go-version
    - inv -e cluster-agent.build --release-version "$RELEASE_VERSION_7"
-   - $S3_CP_CMD $CI_PROJECT_DIR/$CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent $S3_ARTIFACTS_URI/datadog-cluster-agent.$ARCH
-   - $S3_CP_CMD $CI_PROJECT_DIR/Dockerfiles/cluster-agent/datadog-cluster.yaml $S3_ARTIFACTS_URI/datadog-cluster.yaml
-   - $S3_CP_CMD $CI_PROJECT_DIR/Dockerfiles/cluster-agent/security-agent-policies $S3_ARTIFACTS_URI/security-agent-policies
-     --recursive --exclude '.git/*' --exclude '.github/*'
    stage: binary_build
    variables:
      KUBERNETES_CPU_REQUEST: 6
      KUBERNETES_MEMORY_LIMIT: 8Gi
      KUBERNETES_MEMORY_REQUEST: 8Gi
.cws_instrumentation-build_common
  .cws_instrumentation-build_common:
+   artifacts:
+     paths:
+     - $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.$ARCH
    needs:
    - go_mod_tidy_check
    script:
    - inv check-go-version
-   - inv -e cws-instrumentation.build
+   - inv -e cws-instrumentation.build --arch-suffix
?                                     ++++++++++++++
-   - $S3_CP_CMD $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation
-     $S3_ARTIFACTS_URI/datadog-cws-instrumentation/cws-instrumentation.$ARCH
    stage: binary_build
cluster_agent-build_amd64
  cluster_agent-build_amd64:
+   artifacts:
+     exclude:
+     - Dockerfiles/cluster-agent/security-agent-policies/.git/**/*
+     - Dockerfiles/cluster-agent/security-agent-policies/.github/**/*
+     paths:
+     - $CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent
+     - Dockerfiles/cluster-agent/datadog-cluster.yaml
+     - Dockerfiles/cluster-agent/security-agent-policies
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_mod_tidy_check
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - inv check-go-version
    - inv -e cluster-agent.build --release-version "$RELEASE_VERSION_7"
-   - $S3_CP_CMD $CI_PROJECT_DIR/$CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent $S3_ARTIFACTS_URI/datadog-cluster-agent.$ARCH
-   - $S3_CP_CMD $CI_PROJECT_DIR/Dockerfiles/cluster-agent/datadog-cluster.yaml $S3_ARTIFACTS_URI/datadog-cluster.yaml
-   - $S3_CP_CMD $CI_PROJECT_DIR/Dockerfiles/cluster-agent/security-agent-policies $S3_ARTIFACTS_URI/security-agent-policies
-     --recursive --exclude '.git/*' --exclude '.github/*'
    stage: binary_build
    tags:
    - arch:amd64
    variables:
      ARCH: amd64
      KUBERNETES_CPU_REQUEST: 6
      KUBERNETES_MEMORY_LIMIT: 8Gi
      KUBERNETES_MEMORY_REQUEST: 8Gi
cluster_agent-build_arm64
  cluster_agent-build_arm64:
+   artifacts:
+     exclude:
+     - Dockerfiles/cluster-agent/security-agent-policies/.git/**/*
+     - Dockerfiles/cluster-agent/security-agent-policies/.github/**/*
+     paths:
+     - $CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent
+     - Dockerfiles/cluster-agent/datadog-cluster.yaml
+     - Dockerfiles/cluster-agent/security-agent-policies
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_mod_tidy_check
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - inv check-go-version
    - inv -e cluster-agent.build --release-version "$RELEASE_VERSION_7"
-   - $S3_CP_CMD $CI_PROJECT_DIR/$CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent $S3_ARTIFACTS_URI/datadog-cluster-agent.$ARCH
-   - $S3_CP_CMD $CI_PROJECT_DIR/Dockerfiles/cluster-agent/datadog-cluster.yaml $S3_ARTIFACTS_URI/datadog-cluster.yaml
-   - $S3_CP_CMD $CI_PROJECT_DIR/Dockerfiles/cluster-agent/security-agent-policies $S3_ARTIFACTS_URI/security-agent-policies
-     --recursive --exclude '.git/*' --exclude '.github/*'
    stage: binary_build
    tags:
    - arch:arm64
    variables:
      ARCH: arm64
      KUBERNETES_CPU_REQUEST: 6
      KUBERNETES_MEMORY_LIMIT: 8Gi
      KUBERNETES_MEMORY_REQUEST: 8Gi
cws_instrumentation-build_amd64
  cws_instrumentation-build_amd64:
+   artifacts:
+     paths:
+     - $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.$ARCH
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_mod_tidy_check
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - inv check-go-version
-   - inv -e cws-instrumentation.build
+   - inv -e cws-instrumentation.build --arch-suffix
?                                     ++++++++++++++
-   - $S3_CP_CMD $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation
-     $S3_ARTIFACTS_URI/datadog-cws-instrumentation/cws-instrumentation.$ARCH
    stage: binary_build
    tags:
    - arch:amd64
    variables:
      ARCH: amd64
cws_instrumentation-build_arm64
  cws_instrumentation-build_arm64:
+   artifacts:
+     paths:
+     - $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.$ARCH
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/deb_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
    - go_mod_tidy_check
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - inv check-go-version
-   - inv -e cws-instrumentation.build
+   - inv -e cws-instrumentation.build --arch-suffix
?                                     ++++++++++++++
-   - $S3_CP_CMD $CI_PROJECT_DIR/$CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation
-     $S3_ARTIFACTS_URI/datadog-cws-instrumentation/cws-instrumentation.$ARCH
    stage: binary_build
    tags:
    - arch:arm64
    variables:
      ARCH: arm64
docker_build_cluster_agent_amd64
  docker_build_cluster_agent_amd64:
    before_script:
-   - aws s3 sync --only-show-errors $S3_ARTIFACTS_URI $BUILD_CONTEXT
+   - mv -vf $CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent $BUILD_CONTEXT/
+   - mv -vf $CWS_INSTRUMENTATION_BINARIES_DIR $BUILD_CONTEXT/
-   - cp -Rvf Dockerfiles/agent/nosys-seccomp Dockerfiles/cluster-agent/
?     ^^  -
+   - mv -vf Dockerfiles/agent/nosys-seccomp Dockerfiles/cluster-agent/
?     ^^
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cluster_agent-build_amd64
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cws_instrumentation-build_amd64
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cws_instrumentation-build_arm64
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - TAG_SUFFIX=${TAG_SUFFIX:-}
    - BUILD_ARG=${BUILD_ARG:-}
    - "if [[ \"$BUCKET_BRANCH\" == \"nightly\" && ( \"$IMAGE\" =~ \"ci/datadog-agent/agent\"\
      \ || \"$IMAGE\" =~ \"ci/datadog-agent/cluster-agent\" || \"$IMAGE\" =~ \"ci/datadog-agent/cws-instrumentation\"\
      \ ) ]]; then\n  export ECR_RELEASE_SUFFIX=\"-nightly\"\nelse\n  export ECR_RELEASE_SUFFIX=${CI_COMMIT_TAG+-release}\n\
      fi\n"
    - TARGET_TAG=${IMAGE}${ECR_RELEASE_SUFFIX}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}$TAG_SUFFIX-$ARCH
    - DOCKER_LOGIN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO user)
      || exit $?
    - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO token | docker login
      --username "$DOCKER_LOGIN" --password-stdin "$DOCKER_REGISTRY_URL"
    - EXIT="${PIPESTATUS[0]}"; if [ $EXIT -ne 0 ]; then echo "Unable to locate credentials
      needs gitlab runner restart"; exit $EXIT; fi
    - docker buildx build --no-cache --push --pull --platform linux/$ARCH --build-arg
      CIBUILD=true --build-arg GENERAL_ARTIFACTS_CACHE_BUCKET_URL=${GENERAL_ARTIFACTS_CACHE_BUCKET_URL}
      $BUILD_ARG --build-arg DD_GIT_REPOSITORY_URL=https://github.com/DataDog/datadog-agent
      --build-arg DD_GIT_COMMIT_SHA=${CI_COMMIT_SHA} --file $BUILD_CONTEXT/Dockerfile
      --tag ${TARGET_TAG} --label "org.opencontainers.image.created=$(date --rfc-3339=seconds)"
      --label "org.opencontainers.image.authors=Datadog <[email protected]>" --label
      "org.opencontainers.image.source=https://github.com/DataDog/datadog-agent" --label
      "org.opencontainers.image.version=$(inv agent.version)" --label "org.opencontainers.image.revision=${CI_COMMIT_SHA}"
      --label "org.opencontainers.image.vendor=Datadog, Inc." --label "target=none"
      $BUILD_CONTEXT
    - crane flatten -t ${TARGET_TAG} ${TARGET_TAG}
    stage: container_build
    tags:
    - arch:amd64
    timeout: 30m
    variables:
      ARCH: amd64
      BUILD_CONTEXT: Dockerfiles/cluster-agent
      IMAGE: registry.ddbuild.io/ci/datadog-agent/cluster-agent
docker_build_cluster_agent_arm64
  docker_build_cluster_agent_arm64:
    before_script:
-   - aws s3 sync --only-show-errors $S3_ARTIFACTS_URI $BUILD_CONTEXT
+   - mv -vf $CLUSTER_AGENT_BINARIES_DIR/datadog-cluster-agent $BUILD_CONTEXT/
+   - mv -vf $CWS_INSTRUMENTATION_BINARIES_DIR $BUILD_CONTEXT/
-   - cp -Rvf Dockerfiles/agent/nosys-seccomp Dockerfiles/cluster-agent/
?     ^^  -
+   - mv -vf Dockerfiles/agent/nosys-seccomp Dockerfiles/cluster-agent/
?     ^^
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cluster_agent-build_arm64
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cws_instrumentation-build_amd64
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cws_instrumentation-build_arm64
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - TAG_SUFFIX=${TAG_SUFFIX:-}
    - BUILD_ARG=${BUILD_ARG:-}
    - "if [[ \"$BUCKET_BRANCH\" == \"nightly\" && ( \"$IMAGE\" =~ \"ci/datadog-agent/agent\"\
      \ || \"$IMAGE\" =~ \"ci/datadog-agent/cluster-agent\" || \"$IMAGE\" =~ \"ci/datadog-agent/cws-instrumentation\"\
      \ ) ]]; then\n  export ECR_RELEASE_SUFFIX=\"-nightly\"\nelse\n  export ECR_RELEASE_SUFFIX=${CI_COMMIT_TAG+-release}\n\
      fi\n"
    - TARGET_TAG=${IMAGE}${ECR_RELEASE_SUFFIX}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}$TAG_SUFFIX-$ARCH
    - DOCKER_LOGIN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO user)
      || exit $?
    - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO token | docker login
      --username "$DOCKER_LOGIN" --password-stdin "$DOCKER_REGISTRY_URL"
    - EXIT="${PIPESTATUS[0]}"; if [ $EXIT -ne 0 ]; then echo "Unable to locate credentials
      needs gitlab runner restart"; exit $EXIT; fi
    - docker buildx build --no-cache --push --pull --platform linux/$ARCH --build-arg
      CIBUILD=true --build-arg GENERAL_ARTIFACTS_CACHE_BUCKET_URL=${GENERAL_ARTIFACTS_CACHE_BUCKET_URL}
      $BUILD_ARG --build-arg DD_GIT_REPOSITORY_URL=https://github.com/DataDog/datadog-agent
      --build-arg DD_GIT_COMMIT_SHA=${CI_COMMIT_SHA} --file $BUILD_CONTEXT/Dockerfile
      --tag ${TARGET_TAG} --label "org.opencontainers.image.created=$(date --rfc-3339=seconds)"
      --label "org.opencontainers.image.authors=Datadog <[email protected]>" --label
      "org.opencontainers.image.source=https://github.com/DataDog/datadog-agent" --label
      "org.opencontainers.image.version=$(inv agent.version)" --label "org.opencontainers.image.revision=${CI_COMMIT_SHA}"
      --label "org.opencontainers.image.vendor=Datadog, Inc." --label "target=none"
      $BUILD_CONTEXT
    - crane flatten -t ${TARGET_TAG} ${TARGET_TAG}
    stage: container_build
    tags:
    - arch:arm64
    timeout: 30m
    variables:
      ARCH: arm64
      BUILD_CONTEXT: Dockerfiles/cluster-agent
      IMAGE: registry.ddbuild.io/ci/datadog-agent/cluster-agent
docker_build_cws_instrumentation_amd64
  docker_build_cws_instrumentation_amd64:
    before_script:
-   - aws s3 sync --only-show-errors $S3_ARTIFACTS_URI $BUILD_CONTEXT
+   - cp $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.${ARCH} $BUILD_CONTEXT/
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cws_instrumentation-build_amd64
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - TAG_SUFFIX=${TAG_SUFFIX:-}
    - BUILD_ARG=${BUILD_ARG:-}
    - "if [[ \"$BUCKET_BRANCH\" == \"nightly\" && ( \"$IMAGE\" =~ \"ci/datadog-agent/agent\"\
      \ || \"$IMAGE\" =~ \"ci/datadog-agent/cluster-agent\" || \"$IMAGE\" =~ \"ci/datadog-agent/cws-instrumentation\"\
      \ ) ]]; then\n  export ECR_RELEASE_SUFFIX=\"-nightly\"\nelse\n  export ECR_RELEASE_SUFFIX=${CI_COMMIT_TAG+-release}\n\
      fi\n"
    - TARGET_TAG=${IMAGE}${ECR_RELEASE_SUFFIX}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}$TAG_SUFFIX-$ARCH
    - DOCKER_LOGIN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO user)
      || exit $?
    - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO token | docker login
      --username "$DOCKER_LOGIN" --password-stdin "$DOCKER_REGISTRY_URL"
    - EXIT="${PIPESTATUS[0]}"; if [ $EXIT -ne 0 ]; then echo "Unable to locate credentials
      needs gitlab runner restart"; exit $EXIT; fi
    - docker buildx build --no-cache --push --pull --platform linux/$ARCH --build-arg
      CIBUILD=true --build-arg GENERAL_ARTIFACTS_CACHE_BUCKET_URL=${GENERAL_ARTIFACTS_CACHE_BUCKET_URL}
      $BUILD_ARG --build-arg DD_GIT_REPOSITORY_URL=https://github.com/DataDog/datadog-agent
      --build-arg DD_GIT_COMMIT_SHA=${CI_COMMIT_SHA} --file $BUILD_CONTEXT/Dockerfile
      --tag ${TARGET_TAG} --label "org.opencontainers.image.created=$(date --rfc-3339=seconds)"
      --label "org.opencontainers.image.authors=Datadog <[email protected]>" --label
      "org.opencontainers.image.source=https://github.com/DataDog/datadog-agent" --label
      "org.opencontainers.image.version=$(inv agent.version)" --label "org.opencontainers.image.revision=${CI_COMMIT_SHA}"
      --label "org.opencontainers.image.vendor=Datadog, Inc." --label "target=none"
      $BUILD_CONTEXT
    - crane flatten -t ${TARGET_TAG} ${TARGET_TAG}
    stage: container_build
    tags:
    - arch:amd64
    timeout: 30m
    variables:
      ARCH: amd64
      BUILD_CONTEXT: Dockerfiles/cws-instrumentation
      IMAGE: registry.ddbuild.io/ci/datadog-agent/cws-instrumentation
docker_build_cws_instrumentation_arm64
  docker_build_cws_instrumentation_arm64:
    before_script:
-   - aws s3 sync --only-show-errors $S3_ARTIFACTS_URI $BUILD_CONTEXT
+   - cp $CWS_INSTRUMENTATION_BINARIES_DIR/cws-instrumentation.${ARCH} $BUILD_CONTEXT/
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/docker_arm64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
    needs:
-   - artifacts: false
?                ^^^^
+   - artifacts: true
?                ^^^
      job: cws_instrumentation-build_arm64
    retry: 2
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - if: $CI_COMMIT_TAG != null
    - if: $RELEASE_VERSION_7 != ""
    script:
    - TAG_SUFFIX=${TAG_SUFFIX:-}
    - BUILD_ARG=${BUILD_ARG:-}
    - "if [[ \"$BUCKET_BRANCH\" == \"nightly\" && ( \"$IMAGE\" =~ \"ci/datadog-agent/agent\"\
      \ || \"$IMAGE\" =~ \"ci/datadog-agent/cluster-agent\" || \"$IMAGE\" =~ \"ci/datadog-agent/cws-instrumentation\"\
      \ ) ]]; then\n  export ECR_RELEASE_SUFFIX=\"-nightly\"\nelse\n  export ECR_RELEASE_SUFFIX=${CI_COMMIT_TAG+-release}\n\
      fi\n"
    - TARGET_TAG=${IMAGE}${ECR_RELEASE_SUFFIX}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}$TAG_SUFFIX-$ARCH
    - DOCKER_LOGIN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO user)
      || exit $?
    - $CI_PROJECT_DIR/tools/ci/fetch_secret.sh $DOCKER_REGISTRY_RO token | docker login
      --username "$DOCKER_LOGIN" --password-stdin "$DOCKER_REGISTRY_URL"
    - EXIT="${PIPESTATUS[0]}"; if [ $EXIT -ne 0 ]; then echo "Unable to locate credentials
      needs gitlab runner restart"; exit $EXIT; fi
    - docker buildx build --no-cache --push --pull --platform linux/$ARCH --build-arg
      CIBUILD=true --build-arg GENERAL_ARTIFACTS_CACHE_BUCKET_URL=${GENERAL_ARTIFACTS_CACHE_BUCKET_URL}
      $BUILD_ARG --build-arg DD_GIT_REPOSITORY_URL=https://github.com/DataDog/datadog-agent
      --build-arg DD_GIT_COMMIT_SHA=${CI_COMMIT_SHA} --file $BUILD_CONTEXT/Dockerfile
      --tag ${TARGET_TAG} --label "org.opencontainers.image.created=$(date --rfc-3339=seconds)"
      --label "org.opencontainers.image.authors=Datadog <[email protected]>" --label
      "org.opencontainers.image.source=https://github.com/DataDog/datadog-agent" --label
      "org.opencontainers.image.version=$(inv agent.version)" --label "org.opencontainers.image.revision=${CI_COMMIT_SHA}"
      --label "org.opencontainers.image.vendor=Datadog, Inc." --label "target=none"
      $BUILD_CONTEXT
    - crane flatten -t ${TARGET_TAG} ${TARGET_TAG}
    stage: container_build
    tags:
    - arch:arm64
    timeout: 30m
    variables:
      ARCH: arm64
      BUILD_CONTEXT: Dockerfiles/cws-instrumentation
      IMAGE: registry.ddbuild.io/ci/datadog-agent/cws-instrumentation

Changes Summary

Removed Modified Added Renamed
0 10 0 0

ℹ️ Diff available in the job log.

@chouquette
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Feb 5, 2025

Devflow running: /merge

View all feedbacks in Devflow UI.


2025-02-05 08:37:20 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-02-05 09:16:11 UTC ℹ️ MergeQueue: merge request added to the queue

The median merge time in main is 27m.


2025-02-05 09:45:26 UTC ℹ️ MergeQueue: This merge request was merged

@agent-platform-auto-pr
Copy link
Contributor

Static quality checks ✅

Please find below the results from static quality gates

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 844.7MiB 858.45MiB 203.56MiB 214.3MiB
static_quality_gate_docker_agent_amd64 929.14MiB 942.69MiB 310.69MiB 321.56MiB

@dd-mergequeue dd-mergequeue bot merged commit c42fd0a into main Feb 5, 2025
223 of 232 checks passed
@dd-mergequeue dd-mergequeue bot deleted the chouquette/dca_gitlab_artifacts branch February 5, 2025 09:45
@github-actions github-actions bot added this to the 7.64.0 milestone Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ask-review Ask required teams to review this PR changelog/no-changelog long review PR is complex, plan time to review it qa/no-code-change No code change in Agent code requiring validation team/agent-delivery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants