From 0b080eeaa352a7e7de9eb4a7d28bf724ef9ddaf3 Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Wed, 20 Nov 2024 10:58:49 +0100 Subject: [PATCH 1/9] Add orchestrion, api key is still missing... --- .github/workflows/build.yml | 7 +++++-- .gitlab-ci.yml | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1f9c1508..5329c8c45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,9 @@ jobs: - name: Build run: go build ./... - + + - name: Install orchestrion + run: go install github.com/DataDog/orchestrion@latest + - name: Test - run: go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job + run: orchestrion go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ddc2d5ce1..1ec5753eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,6 +77,7 @@ integration-testing: - chmod 400 $E2E_PRIVATE_KEY_PATH - ssh-add $E2E_PRIVATE_KEY_PATH - pip install -r requirements.txt + - go install github.com/DataDog/orchestrion@latest script: - | if [ ! -f ./dist/main ]; then @@ -84,7 +85,7 @@ integration-testing: exit 1 fi # execute test from dist directory to use the generated binary - - go test ./integration-tests -v -timeout 0s -workingDir=dist + - orchestrion go test ./integration-tests -v -timeout 0s -workingDir=dist variables: E2E_PUBLIC_KEY_PATH: /tmp/agent-integration-test-ssh-key.pub E2E_PRIVATE_KEY_PATH: /tmp/agent-integration-test-ssh-key From 086b9e22d3fa8fb2c58af6546fc26f5dc437dde1 Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Wed, 20 Nov 2024 11:21:47 +0100 Subject: [PATCH 2/9] fixes --- .github/workflows/build.yml | 4 +++- .gitlab-ci.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5329c8c45..61ccb597e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,9 @@ jobs: run: go build ./... - name: Install orchestrion - run: go install github.com/DataDog/orchestrion@latest + run: | + go install github.com/DataDog/orchestrion@latest + orchestrion pin - name: Test run: orchestrion go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1ec5753eb..bdfe97789 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,6 +78,7 @@ integration-testing: - ssh-add $E2E_PRIVATE_KEY_PATH - pip install -r requirements.txt - go install github.com/DataDog/orchestrion@latest + - orchestrion pin script: - | if [ ! -f ./dist/main ]; then From 1908ae7629ffab9f918cf378215155cf5953f8bf Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Wed, 20 Nov 2024 11:23:14 +0100 Subject: [PATCH 3/9] fixes --- .github/workflows/build.yml | 2 ++ .gitlab-ci.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61ccb597e..e240bc55a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,3 +26,5 @@ jobs: - name: Test run: orchestrion go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job + env: + DD_CIVISIBILITY_ENABLED: true diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bdfe97789..a94df4f20 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,6 +79,7 @@ integration-testing: - pip install -r requirements.txt - go install github.com/DataDog/orchestrion@latest - orchestrion pin + - export DD_CIVISIBILITY_ENABLED=true script: - | if [ ! -f ./dist/main ]; then From 0827685e4379d9fa41a9c19552473252a4169f50 Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Wed, 20 Nov 2024 11:27:26 +0100 Subject: [PATCH 4/9] fixes --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 109eb84c1..3ea19a66b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/DataDog/test-infra-definitions -go 1.22.5 +go 1.22.8 require ( dario.cat/mergo v1.0.1 From ee95495dc247639f87f97956af928c0a3b03d46d Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Wed, 20 Nov 2024 12:37:38 +0100 Subject: [PATCH 5/9] add vault --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a94df4f20..9347e469f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,6 +80,9 @@ integration-testing: - go install github.com/DataDog/orchestrion@latest - orchestrion pin - export DD_CIVISIBILITY_ENABLED=true + - export DD_CIVISIBILITY_AGENTLESS_ENABLED=true + - export DD_ENV=ci + - export DD_API_KEY=$(vault kv get -field=api_key kv/k8s/gitlab-runner/test-infra-definitions/dd-token) script: - | if [ ! -f ./dist/main ]; then From c481417f2d99f33756cc0d1055ba77b192fdf2cf Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Wed, 20 Nov 2024 13:06:02 +0100 Subject: [PATCH 6/9] add api key to the github job --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e240bc55a..acde177a1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,3 +28,6 @@ jobs: run: orchestrion go test -v $(go list ./... | grep -v /integration-tests) # We do not run integration-tests here because they require more tooling (Pulumi, invoke, ..). They will be run in a dedicated job env: DD_CIVISIBILITY_ENABLED: true + DD_CIVISIBILITY_AGENTLESS_ENABLED: true + DD_ENV: ci + DD_API_KEY: ${{ secrets.DATADOG_API_KEY }} From ec5ec77b283ec8d9b23ca99e600440e91f4bd119 Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Tue, 26 Nov 2024 17:45:42 +0100 Subject: [PATCH 7/9] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9347e469f..0b801110d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,7 +77,7 @@ integration-testing: - chmod 400 $E2E_PRIVATE_KEY_PATH - ssh-add $E2E_PRIVATE_KEY_PATH - pip install -r requirements.txt - - go install github.com/DataDog/orchestrion@latest + - go install github.com/DataDog/orchestrion@v0.9.4 - orchestrion pin - export DD_CIVISIBILITY_ENABLED=true - export DD_CIVISIBILITY_AGENTLESS_ENABLED=true From d0573d037acfed59ab349fc324a63e0de8607efe Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Tue, 26 Nov 2024 17:45:58 +0100 Subject: [PATCH 8/9] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index acde177a1..29e61243e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - name: Install orchestrion run: | - go install github.com/DataDog/orchestrion@latest + go install github.com/DataDog/orchestrion@v0.9.4 orchestrion pin - name: Test From 81036809d5336df94967cc9f6705b0ee7bf8612b Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Fri, 29 Nov 2024 14:30:21 +0100 Subject: [PATCH 9/9] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b801110d..0e1d993eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,6 +83,7 @@ integration-testing: - export DD_CIVISIBILITY_AGENTLESS_ENABLED=true - export DD_ENV=ci - export DD_API_KEY=$(vault kv get -field=api_key kv/k8s/gitlab-runner/test-infra-definitions/dd-token) + - export GOFLAGS="${GOFLAGS} '-toolexec=orchestrion toolexec'" script: - | if [ ! -f ./dist/main ]; then @@ -90,7 +91,7 @@ integration-testing: exit 1 fi # execute test from dist directory to use the generated binary - - orchestrion go test ./integration-tests -v -timeout 0s -workingDir=dist + - go test ./integration-tests -v -timeout 0s -workingDir=dist variables: E2E_PUBLIC_KEY_PATH: /tmp/agent-integration-test-ssh-key.pub E2E_PRIVATE_KEY_PATH: /tmp/agent-integration-test-ssh-key