This repo contains the Dockerfiles of the images used to build the rpm and deb packages for the Datadog Agent.
You can follow these instructions to build a package locally: please notice rpm packages are signed, so you won't be able to exactly reproduce the same artifact that's distributed through the official Yum repository.
If you're a Datadog employee building new images used in the Datadog Agent
pipeline, you will have to replace the DATADOG_AGENT_BUILDIMAGES
variable
in the .gitlab-ci.yml
of the datadog-agent repository to use the newly created images.
If your changes affect both datadog-agent and buildimages, you have two option :
In your datadog-agent-buildimages's PR:
- Add
branch: your/datadog-agent-branch
in your .gitlab-ci.yml file. - Commit and wait for the
dd-gitlab/wait_for_tests
job to appear in the CI, it will indicate if your tests succeeded or failed. Once your tests worked you can move on to the next step. - Remove
branch: your/datadog-agent-branch
in your .gitlab-ci.yml file. - Commit and don't wait for the
dd-gitlab/wait_for_tests
job to appear in the CI. If your pipeline is green it's good to merge (if you wait for too long thedd-gitlab/wait_for_tests
job will appear failing your PR but this jobs isn't required)
- Create your branch in buildimages.
- In your datadog-agent's PR:
- Edit
DATADOG_AGENT_BUILDIMAGES
with your current pipeline_id and commit (v${pipeline_id}-${commit}
). - Set
DATADOG_AGENT_BUILDIMAGES_SUFFIX
to_test_only
- Once datadog-agent's PR is green, merge buildimages' PR
- Set
DATADOG_AGENT_BUILDIMAGES
to main's current pipeline_id and commit (v${pipeline_id}-${commit}
) - Set
DATADOG_AGENT_BUILDIMAGES_SUFFIX
back to""
. - Once datadog-agent's PR is green, merge.
- Edit
Refer to this section to test your PR.
The update-go
invoke task updates all Go versions and SHA256 of the repository.
For example:
inv update-go -v 1.20.8
You can use the --check-archive
argument to have the task download the archives and check that
their SHA256 are the expected ones.
Note that the task does all changes locally and doesn't create a branch or a PR.
Upgrade all GO_VERSION
and hashes in the Dockerfiles like in
this commit.
Also upgrade windows/helpers/phase2/install_docker.ps1
.
Once pushed, Gitlab will build and push the containers to aws for you. Look for
the pipeline and get the new images ID (in each job log). The
new images ID should resemble something like
datadog-agent-buildimages/rpm_x64:v1581559-c7ff053
Update the .gitlab-ci.yml
file in the datadog-agent
repo to use the new images,
push a new PR and see if gitlab is still green.
You can use datadog-agent's invoke task to do so:
inv -e pipeline.update-buildimages -i <new image ID> --branch-name <your working branch> [--no-test-version]
--no-test-version
will prevent the task from appending the test_only
suffix to your image tag.
See Building on Windows README.md