Skip to content

Commit

Permalink
Test windows scope
Browse files Browse the repository at this point in the history
  • Loading branch information
pazone committed Nov 29, 2024
1 parent 8b2f418 commit 5f2d05a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
19 changes: 8 additions & 11 deletions .buildkite/bk.integration.pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json

# Warning: Integration test step groups must have a key containing `integration-tests`.
# see pre-command.sh and pre-command.ps1
env:
DOCKER_REGISTRY: "docker.elastic.co"
VAULT_PATH: "kv/ci-shared/observability-ingest/cloud/gcp"
Expand Down Expand Up @@ -41,7 +43,6 @@ steps:
- label: "Win2022:sudo:{{matrix}}"
skip: true
command: |
.buildkite/scripts/set-bk-analytics-token.ps1
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/integration-tests.ps1 {{matrix}} true
artifact_paths:
Expand All @@ -64,9 +65,9 @@ steps:

- label: "Win2022:non-sudo:{{matrix}}"
command: |
.buildkite/scripts/set-bk-analytics-token.ps1
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build 019372af-c893-4837-adf1-00d1548f0c80
.buildkite/scripts/integration-tests.ps1 {{matrix}} false
echo 1
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build 019372af-c893-4837-adf1-00d1548f0c80
# .buildkite/scripts/integration-tests.ps1 {{matrix}} false
artifact_paths:
- build/**
agents:
Expand All @@ -90,9 +91,9 @@ steps:
steps:
- label: "x86_64:non-sudo: {{matrix}}"
command: |
source .buildkite/scripts/set-bk-analytics-token.sh
buildkite-agent artifact download build/distributions/** . --step 'package-it' --build 019372af-c893-4837-adf1-00d1548f0c80
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
echo 1
# buildkite-agent artifact download build/distributions/** . --step 'package-it' --build 019372af-c893-4837-adf1-00d1548f0c80
# .buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
artifact_paths:
- build/**
agents:
Expand All @@ -111,7 +112,6 @@ steps:
- label: "x86_64:sudo: {{matrix}}"
skip: true
command: |
source .buildkite/scripts/set-bk-analytics-token.sh
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} true
artifact_paths:
Expand Down Expand Up @@ -141,7 +141,6 @@ steps:
- label: "arm:sudo: {{matrix}}"
skip: true
command: |
source .buildkite/scripts/set-bk-analytics-token.sh
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} true
artifact_paths:
Expand Down Expand Up @@ -171,7 +170,6 @@ steps:
- label: "arm:non-sudo: {{matrix}}"
skip: true
command: |
source .buildkite/scripts/set-bk-analytics-token.sh
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests_tf.sh {{matrix}} false
artifact_paths:
Expand All @@ -198,7 +196,6 @@ steps:
steps:
- label: "x86_64:sudo:rpm"
command: |
source .buildkite/scripts/set-bk-analytics-token.sh
buildkite-agent artifact download build/distributions/** . --step 'package-it'
.buildkite/scripts/steps/integration_tests_tf.sh rpm true
artifact_paths:
Expand Down
6 changes: 5 additions & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ if [[ "$BUILDKITE_STEP_KEY" == *"integration-tests"* ]]; then
# ESS credentials
export API_KEY_TOKEN=$(vault kv get -field apiKey ${CI_ESS_PATH})
echo ${API_KEY_TOKEN} > ./apiKey
export TEST_INTEG_AUTH_ESS_APIKEY_FILE=$(realpath ./apiKey)
export TEST_INTEG_AUTH_ESS_APIKEY_FILE=$(realpath ./apiKey)
fi

if [[ "$BUILDKITE_GROUP_KEY" == *"integration-tests"* ]]; then
source .buildkite/scripts/set-bk-analytics-token.sh
fi

if [[ "$BUILDKITE_PIPELINE_SLUG" == "elastic-agent-binary-dra" ]]; then
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/hooks/pre-command.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Shorten BUILDKITE_MESSAGE if needed to avoid filling the Windows env var buffer
$env:BUILDKITE_MESSAGE = $env:BUILDKITE_MESSAGE.Substring(0, [System.Math]::Min(2048, $env:BUILDKITE_MESSAGE.Length))

if ($env:BUILDKITE_GROUP_KEY -like "*integration-tests*") {
. "$PWD\.buildkite/scripts/set-bk-analytics-token.ps1"
}
3 changes: 1 addition & 2 deletions .buildkite/scripts/set-bk-analytics-token.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# !/bin/bash
set -euo pipefail
source .buildkite/scripts/retry.sh

echo "--- Set BUILDKITE_ANALYTICS_TOKEN :vault:"
BUILDKITE_ANALYTICS_TOKEN=$(retry 5 vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token)
BUILDKITE_ANALYTICS_TOKEN=$(retry -t 5 vault kv get -field token kv/ci-shared/platform-ingest/buildkite_analytics_token)
export BUILDKITE_ANALYTICS_TOKEN

0 comments on commit 5f2d05a

Please sign in to comment.