datadog-agent
datadog-agent copied to clipboard
[invoke] Refactor windows_resources utility tasks
What does this PR do?
Refactor the multiple steps to build Windows resources into one build_windows_resources
function.
Motivation
Reduce code repetition: multiple tasks had the same exact following code:
build_messagetable(ctx, arch=arch)
vars = versioninfo_vars(ctx, major_version=major_version, python_runtimes=python_runtimes, arch=arch)
build_rc(
ctx,
"cmd/<agent_name>/windows_resources/<agent_name>.rc",
arch=arch,
vars=vars,
out="cmd/agent/rsrc.syso",
)
Additional Notes
n/a
Possible Drawbacks / Trade-offs
n/a
Describe how to test/QA your changes
Run a pipeline, verify that the Windows builds still work.
Reviewer's Checklist
- [x] If known, an appropriate milestone has been selected; otherwise the
Triage
milestone is set. - [x] Use the
major_change
label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote. - [x] A release note has been added or the
changelog/no-changelog
label has been applied. - [x] Changed code has automated tests for its functionality.
- [x] Adequate QA/testing plan information is provided if the
qa/skip-qa
label is not applied. - [x] At least one
team/..
label has been applied, indicating the team(s) that should QA this change. - [x] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
- [x] If applicable, the
need-change/operator
andneed-change/helm
labels have been applied. - [x] If applicable, the
k8s/<min-version>
label, indicating the lowest Kubernetes version compatible with this feature. - [x] If applicable, the config template has been updated.