Skip to content

Commit a572681

Browse files
authored
Migrate CI to dda (#33587)
1 parent 5a7947c commit a572681

File tree

201 files changed

+903
-864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+903
-864
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ jobs:
6161
- run:
6262
name: check go version
6363
command: |
64-
inv -e check-go-version
64+
dda inv -e check-go-version
6565
- run:
6666
name: grab go deps
6767
command: |
68-
inv -e deps
68+
dda inv -e deps
6969
- run:
7070
name: install go tooling
7171
command: |
72-
inv -e install-tools
72+
dda inv -e install-tools
7373
- save_cache:
7474
<<: *save_deps
7575
paths:
@@ -87,7 +87,7 @@ jobs:
8787
- setup_remote_docker
8888
- run:
8989
name: run integration tests
90-
command: inv -e integration-tests --race --remote-docker
90+
command: dda inv -e integration-tests --race --remote-docker
9191

9292
docker_tests:
9393
<<: *job_template
@@ -97,7 +97,7 @@ jobs:
9797
- setup_remote_docker
9898
- run:
9999
name: run docker image tests
100-
command: inv -e docker.test
100+
command: dda inv -e docker.test
101101

102102
workflows:
103103
version: 2

.copyright-overrides.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ go.opentelemetry.io/otel/semconv/internal: Copyright The OpenTelemetry Authors
295295
go.opentelemetry.io/otel/semconv/v1.12.0: Copyright The OpenTelemetry Authors
296296
golang.org/x/crypto/chacha20poly1305: Copyright (c) 2009 The Go Authors. All rights reserved
297297

298-
# Not added by inv generate-licenses but spotted by inv-e lint-licenses
298+
# Not added by `dda inv generate-licenses` but spotted by `dda inv -e lint-licenses`
299299
github.com/AdaLogics/go-fuzz-headers: AdamKorcz <[email protected]>|AdamKorcz <[email protected]>|Sebastiaan van Stijn <[email protected]>|AdaLogics <[email protected]>|Kazuyoshi Kato <[email protected]>
300300
github.com/AdamKorcz/go-118-fuzz-build/testing: AdamKorcz <[email protected]>|AdamKorcz <[email protected]>|John Howard <[email protected]>|Kazuyoshi Kato <[email protected]>|Khaled Yakdan <[email protected]>|AdamKorcz <[email protected]>|Sebastiaan van Stijn <[email protected]>
301301
github.com/Microsoft/go-winio/pkg/bindfilter: Copyright (c) 2015 Microsoft
@@ -395,4 +395,4 @@ github.com/jaegertracing/jaeger-idl/model/v1: ["Copyright (c) 2019 The Jaeger Au
395395
github.com/jaegertracing/jaeger-idl/proto-gen/api_v2: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
396396
github.com/jaegertracing/jaeger-idl/thrift-gen/agent: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
397397
github.com/jaegertracing/jaeger-idl/thrift-gen/jaeger: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
398-
github.com/jaegertracing/jaeger-idl/thrift-gen/zipkincore: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]
398+
github.com/jaegertracing/jaeger-idl/thrift-gen/zipkincore: ["Copyright (c) 2019 The Jaeger Authors.", "Copyright (c) 2017 Uber Technologies, Inc."]

.dda/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.5.0

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
/omnibus/config/software/snmp-traps.rb @DataDog/ndm-core
293293
/omnibus/resources/*/msi/ @DataDog/windows-agent
294294

295-
# The following is managed by `inv lint-components` -- DO NOT EDIT
295+
# The following is managed by `dda inv lint-components` -- DO NOT EDIT
296296
# BEGIN COMPONENTS
297297
/comp @DataDog/agent-runtimes
298298
/comp/agent @DataDog/agent-runtimes
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Install dda
2+
description: Installs the defined version of dda
3+
inputs:
4+
version:
5+
description: The version of dda to install
6+
required: false
7+
default: ""
8+
features:
9+
description: A space-separated list of features to install
10+
required: false
11+
default: ""
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Set version
17+
id: set-version
18+
run: echo "version=$(cat .dda/version)" >> $GITHUB_OUTPUT
19+
shell: bash
20+
21+
- name: Install dda
22+
uses: DataDog/datadog-agent-dev@e1806a36cb1da98f3a4852c6620b628bc31d81b6
23+
with:
24+
version: ${{ inputs.version || steps.set-version.outputs.version }}
25+
features: ${{ inputs.features }}

.github/dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ updates:
1818
- dependency-name: github.com/DataDog/datadog-agent/*
1919
# Ignore golang.org/x/... deps to avoid noise, they are updated together, pretty regularly
2020
- dependency-name: golang.org/x/*
21-
# OpenTelemetry collector packages need to be updated with inv rather than dependabot
21+
# OpenTelemetry collector packages need to be updated with `dda inv` rather than dependabot
2222
- dependency-name: go.opentelemetry.io/collector/*
2323
- dependency-name: github.com/open-telemetry/opentelemetry-collector-contrib/*
2424
schedule:
@@ -53,7 +53,7 @@ updates:
5353
- dependency-name: github.com/mailru/easyjson
5454
# Ignore golang.org/x/... deps to avoid noise, they are updated together, pretty regularly
5555
- dependency-name: golang.org/x/*
56-
# OpenTelemetry collector packages need to be updated with inv rather than dependabot
56+
# OpenTelemetry collector packages need to be updated with `dda inv` rather than dependabot
5757
- dependency-name: go.opentelemetry.io/collector/*
5858
- dependency-name: github.com/open-telemetry/opentelemetry-collector-contrib/*
5959
schedule:

.github/workflows/ask_dependabot_pr_review.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ jobs:
2727
with:
2828
python-version-file: .python-version
2929
cache: 'pip'
30-
cache-dependency-path: '**/requirements*.txt'
30+
cache-dependency-path: '.dda/version'
31+
32+
- name: Install dda
33+
uses: ./.github/actions/install-dda
34+
with:
35+
features: legacy-tasks
3136

32-
- name: Install dependencies
33-
run: pip install -r requirements.txt -r tasks/requirements.txt
34-
3537
# Use a token so that the ask-review workflow is triggered
3638
- uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
3739
id: app-token
@@ -43,4 +45,4 @@ jobs:
4345
env:
4446
PR_NUMBER: ${{ github.event.pull_request.number }}
4547
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
46-
run: inv -e issue.add-reviewers -p $PR_NUMBER
48+
run: dda inv -e issue.add-reviewers -p $PR_NUMBER

.github/workflows/assess_permissions.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ jobs:
2828
python-version-file: .python-version
2929
cache: "pip"
3030

31-
- name: Install Python dependencies
32-
run: |
33-
python -m pip install --upgrade pip
34-
pip install -r requirements.txt
35-
pip install -r tasks/libs/requirements-github.txt
31+
- name: Install dda
32+
uses: ./.github/actions/install-dda
33+
with:
34+
features: legacy-tasks legacy-github
3635

3736
- name: Assess Repository Permissions
3837
env:
3938
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4039
SLACK_DATADOG_AGENT_BOT_TOKEN: ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }}
41-
run: inv -e github.check-permissions --repo ${{ matrix.value }}
40+
run: dda inv -e github.check-permissions --repo ${{ matrix.value }}

.github/workflows/assign_issue.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
auto_assign_issue:
1010
runs-on: ubuntu-latest
11-
container:
11+
container:
1212
image: ghcr.io/datadog/agent-issue-auto-assign:latest
1313
credentials:
1414
username: ${{ github.actor }}
@@ -22,10 +22,12 @@ jobs:
2222
- name: Install dependencies
2323
# Dependencies are installed at runtime. Otherwise it would create a huge image see https://hub.docker.com/r/pytorch/pytorch/tags
2424
run: |
25-
pip install --upgrade pip && pip install --no-compile --no-cache-dir torch transformers invoke codeowners slack-sdk PyGithub python-gitlab semver
25+
pip install --upgrade pip
26+
pip install --no-compile --no-cache-dir torch transformers "git+https://github.com/DataDog/datadog-agent-dev.git@v$(cat .dda/version)"
27+
dda self dep sync -f legacy-tasks
2628
- name: Assign issue
2729
env:
2830
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2931
SLACK_DATADOG_AGENT_BOT_TOKEN : ${{ secrets.SLACK_DATADOG_AGENT_BOT_TOKEN }}
3032
run: |
31-
inv -e issue.assign-owner -i ${{ github.event.issue.number }}
33+
dda inv -e issue.assign-owner -i ${{ github.event.issue.number }}

.github/workflows/buildimages-update.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,20 @@ jobs:
7171
# in case it's a Go update PR
7272
go-version: ${{ inputs.go_version }}
7373

74-
- name: Install python dependencies
75-
run: |
76-
python3 -m pip install -r requirements.txt
74+
- name: Install dda
75+
uses: ./.github/actions/install-dda
76+
with:
77+
features: legacy-tasks
7778

7879
- name: Get current Go version
7980
id: current_go_version
8081
run: |
81-
echo "GO_VERSION=$(inv go-version)" >> $GITHUB_OUTPUT
82+
echo "GO_VERSION=$(dda inv go-version)" >> $GITHUB_OUTPUT
8283
8384
- name: Get current buildimage tag
8485
id: current_buildimage_tag
8586
run: |
86-
echo "BUILDIMAGE_TAG=$(inv buildimages.get-tag)" >> $GITHUB_OUTPUT
87+
echo "BUILDIMAGE_TAG=$(dda inv buildimages.get-tag)" >> $GITHUB_OUTPUT
8788
8889
- name: Update buildimages IDs and Go version
8990
id: update_build_images
@@ -96,10 +97,10 @@ jobs:
9697
IMAGES_ID: ${{ inputs.images_id }}
9798
run: |
9899
if [ "$CURRENT_GO_VERSION" = "$INPUT_GO_VERSION" ]; then
99-
inv -e buildimages.update --tag "$IMAGES_ID" "$TEST_VERSION_FLAG"
100+
dda inv -e buildimages.update --tag "$IMAGES_ID" "$TEST_VERSION_FLAG"
100101
echo "MESSAGE=Update buildimages ID to $IMAGES_ID" >> $GITHUB_OUTPUT
101102
else
102-
inv -e update-go --image-tag "$IMAGES_ID" "$TEST_VERSION_FLAG" $INCLUDE_OTEL_MODULES -v "$INPUT_GO_VERSION"
103+
dda inv -e update-go --image-tag "$IMAGES_ID" "$TEST_VERSION_FLAG" $INCLUDE_OTEL_MODULES -v "$INPUT_GO_VERSION"
103104
echo "MESSAGE=Update Go version to $INPUT_GO_VERSION" >> $GITHUB_OUTPUT
104105
fi
105106
@@ -151,7 +152,7 @@ jobs:
151152
GITHUB_REF: ${{ github.ref }}
152153
run: |
153154
# Generate the PR description
154-
inv -e buildimages.generate-pr-body \
155+
dda inv -e buildimages.generate-pr-body \
155156
"$CURRENT_BUILDIMAGE_TAG" \
156157
"$IMAGES_ID" \
157158
"$CURRENT_GO_VERSION" \

0 commit comments

Comments
 (0)