Skip to content

Commit

Permalink
Merge branch 'main' into uptime_jwt_shared_secret_reload
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis authored Sep 19, 2023
2 parents 8088b3e + 2197886 commit a28bc62
Show file tree
Hide file tree
Showing 1,303 changed files with 18,835 additions and 7,042 deletions.
5 changes: 5 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ if [[ "${USE_SNYK_CREDENTIALS:-}" == "true" ]]; then
SNYK_TOKEN=$(vault read -field=token secret/ci/elastic-elasticsearch/migrated/snyk)
export SNYK_TOKEN
fi

if [[ "$BUILDKITE_AGENT_META_DATA_PROVIDER" != *"k8s"* ]]; then
# Run in the background, while the job continues
nohup .buildkite/scripts/setup-monitoring.sh </dev/null >/dev/null 2>&1 &
fi
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["7.17.14", "8.9.3", "8.10.0", "8.11.0"]
BWC_VERSION: ["7.17.14", "8.10.2", "8.11.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
28 changes: 22 additions & 6 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1584,8 +1584,8 @@ steps:
env:
BWC_VERSION: 8.9.2

- label: "{{matrix.image}} / 8.9.3 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.9.3
- label: "{{matrix.image}} / 8.10.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.10.0
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -1598,10 +1598,10 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.9.3
BWC_VERSION: 8.10.0

- label: "{{matrix.image}} / 8.10.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.10.0
- label: "{{matrix.image}} / 8.10.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.10.1
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -1614,7 +1614,23 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.10.0
BWC_VERSION: 8.10.1

- label: "{{matrix.image}} / 8.10.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.10.2
timeout_in_minutes: 300
matrix:
setup:
image:
- rocky-8
- ubuntu-2004
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.10.2

- label: "{{matrix.image}} / 8.11.0 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh --build-cache -Dorg.elasticsearch.build.cache.url=https://gradle-enterprise.elastic.co/cache/ -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.11.0
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
diskSizeGb: 350
machineType: custom-32-98304
machineType: n1-standard-32
env: {}
- group: platform-support-windows
steps:
Expand All @@ -50,7 +50,7 @@ steps:
agents:
provider: gcp
image: family/elasticsearch-{{matrix.image}}
machineType: custom-32-98304
machineType: n1-standard-32
diskType: pd-ssd
diskSizeGb: 350
env:
Expand Down
22 changes: 16 additions & 6 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -972,26 +972,36 @@ steps:
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.9.2
- label: 8.9.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.9.3#bwcTest
- label: 8.10.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.10.0#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.9.3
- label: 8.10.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.10.0#bwcTest
BWC_VERSION: 8.10.0
- label: 8.10.1 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.10.1#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.10.0
BWC_VERSION: 8.10.1
- label: 8.10.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.10.2#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.10.2
- label: 8.11.0 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.11.0#bwcTest
timeout_in_minutes: 300
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/pull-requests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"jobs": [
{
"enabled": true,
"pipeline_slug": "elasticsearch-pull-request",
"allow_org_users": true,
"allowed_repo_permissions": [
"admin",
"write"
],
"set_commit_status": false,
"build_on_commit": true,
"build_on_comment": true,
"trigger_comment_regex": "buildkite\\W+elasticsearch-ci.+",
"labels": ["buildkite-opt-in"],
"cancel_intermediate_builds": true,
"cancel_intermediate_builds_on_comment": false
}
]
}
36 changes: 22 additions & 14 deletions .buildkite/scripts/periodic.trigger.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -euo pipefail

exit 0

echo "steps:"

source .buildkite/scripts/branches.sh
Expand All @@ -14,23 +12,33 @@ for BRANCH in "${BRANCHES[@]}"; do
LAST_GOOD_COMMIT=$(echo "${BUILD_JSON}" | jq -r '.commit')

cat <<EOF
- trigger: elasticsearch-periodic
label: Trigger periodic pipeline for $BRANCH
async: true
build:
branch: "$BRANCH"
commit: "$LAST_GOOD_COMMIT"
- trigger: elasticsearch-periodic-packaging
label: Trigger periodic-packaging pipeline for $BRANCH
async: true
build:
branch: "$BRANCH"
commit: "$LAST_GOOD_COMMIT"
- trigger: elasticsearch-periodic-platform-support
label: Trigger periodic-platform-support pipeline for $BRANCH
async: true
build:
branch: "$BRANCH"
commit: "$LAST_GOOD_COMMIT"
EOF

### Only platform-support enabled for right now
# cat <<EOF
# - trigger: elasticsearch-periodic
# label: Trigger periodic pipeline for $BRANCH
# async: true
# build:
# branch: "$BRANCH"
# commit: "$LAST_GOOD_COMMIT"
# - trigger: elasticsearch-periodic-packaging
# label: Trigger periodic-packaging pipeline for $BRANCH
# async: true
# build:
# branch: "$BRANCH"
# commit: "$LAST_GOOD_COMMIT"
# - trigger: elasticsearch-periodic-platform-support
# label: Trigger periodic-platform-support pipeline for $BRANCH
# async: true
# build:
# branch: "$BRANCH"
# commit: "$LAST_GOOD_COMMIT"
# EOF
done
24 changes: 24 additions & 0 deletions .buildkite/scripts/setup-monitoring.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -euo pipefail

ELASTIC_AGENT_URL=$(vault read -field=url secret/ci/elastic-elasticsearch/elastic-agent-token)
ELASTIC_AGENT_TOKEN=$(vault read -field=token secret/ci/elastic-elasticsearch/elastic-agent-token)

if [[ ! -d /opt/elastic-agent ]]; then
sudo mkdir /opt/elastic-agent
sudo chown -R buildkite-agent:buildkite-agent /opt/elastic-agent
cd /opt/elastic-agent

archive=elastic-agent-8.10.1-linux-x86_64.tar.gz
if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then
archive=elastic-agent-8.10.1-linux-arm64.tar.gz
fi

curl -L -O "https://artifacts.elastic.co/downloads/beats/elastic-agent/$archive"

tar xzf "$archive" --directory=. --strip-components=1
fi

cd /opt/elastic-agent
sudo ./elastic-agent install -f --url="$ELASTIC_AGENT_URL" --enrollment-token="$ELASTIC_AGENT_TOKEN"
3 changes: 2 additions & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ BWC_VERSION:
- "8.9.0"
- "8.9.1"
- "8.9.2"
- "8.9.3"
- "8.10.0"
- "8.10.1"
- "8.10.2"
- "8.11.0"
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
- ^x-pack/docs/.*
white-list-labels:
- 'build-benchmark'
black-list-labels:
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
- ^x-pack/docs/.*
white-list-labels:
- 'build-benchmark'
black-list-labels:
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- 'test-windows'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
axes:
- axis:
type: slave
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
black-list-labels:
- '>test-mute'
- 'test-full-bwc'
- 'buildkite-opt-in'
axes:
- axis:
type: slave
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
- ^x-pack/docs/.*
white-list-labels:
- 'cloud-deploy'
black-list-labels:
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- ^x-pack/docs/.*
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- ^x-pack/docs/.*
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
- build-tools/.*
- build-tools-internal/.*
- plugins/examples/.*
black-list-labels:
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
1 change: 1 addition & 0 deletions .ci/jobs.t/elastic+elasticsearch+pull-request+full-bwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- 'test-full-bwc'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
axes:
- axis:
type: slave
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
black-list-labels:
- '>test-mute'
- ':Delivery/Packaging'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- ':Delivery/Packaging'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- ':Delivery/Packaging'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
black-list-labels:
- '>test-mute'
- ':Delivery/Packaging'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
black-list-labels:
- '>test-mute'
- ':Delivery/Packaging'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- ':Delivery/Packaging'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- ':Delivery/Packaging'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
axes:
- axis:
type: label-expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- 'Team:Security'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
builders:
- inject:
# Use FIPS-specific Java versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- 'test-windows'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
builders:
- inject:
properties-file: '.ci/java-versions.properties'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- 'Team:Security'
black-list-labels:
- '>test-mute'
- 'buildkite-opt-in'
builders:
- inject:
# Use FIPS-specific Java versions
Expand Down
Loading

0 comments on commit a28bc62

Please sign in to comment.