From 6fb40a899a793e4187eaf872f02f718c38ffc88f Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Thu, 21 Oct 2021 10:27:12 -0700 Subject: [PATCH] Add optional pull request release tests CI job --- ...asticsearch+pull-request+release-tests.yml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .ci/jobs.t/elastic+elasticsearch+pull-request+release-tests.yml diff --git a/.ci/jobs.t/elastic+elasticsearch+pull-request+release-tests.yml b/.ci/jobs.t/elastic+elasticsearch+pull-request+release-tests.yml new file mode 100644 index 0000000000000..91eba35d76e14 --- /dev/null +++ b/.ci/jobs.t/elastic+elasticsearch+pull-request+release-tests.yml @@ -0,0 +1,49 @@ +--- +- job: + name: "elastic+elasticsearch+pull-request+release-tests" + display-name: "elastic / elasticsearch - pull request release-tests" + description: "Testing of Elasticsearch pull requests - release-tests" + workspace: "/dev/shm/elastic+elasticsearch+pull-request+release-tests" + scm: + - git: + refspec: "+refs/pull/${ghprbPullId}/*:refs/remotes/origin/pr/${ghprbPullId}/*" + branches: + - "${ghprbActualCommit}" + triggers: + - github-pull-request: + org-list: + - elastic + allow-whitelist-orgs-as-admins: true + trigger-phrase: '.*run\W+elasticsearch-ci/release-tests.*' + github-hooks: true + status-context: elasticsearch-ci/release-tests + cancel-builds-on-update: true + excluded-regions: + - ^docs/.* + white-list-labels: + - 'test-release' + black-list-target-branches: + - 7.15 + - 6.8 + builders: + - inject: + properties-file: '.ci/java-versions.properties' + properties-content: | + JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA + RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA + JAVA8_HOME=$HOME/.java/java8 + JAVA11_HOME=$HOME/.java/java11 + JAVA15_HOME=$HOME/.java/openjdk15 + - shell: | + #!/usr/local/bin/runbld --redirect-stderr + + # Fetch beats artifacts + export ES_VERSION=$(grep 'elasticsearch' build-tools-internal/version.properties | awk '{print $3}') + export BEATS_DIR=$(pwd)/distribution/docker/build/artifacts/beats + + mkdir -p ${BEATS_DIR} + curl -o "${BEATS_DIR}/metricbeat-${ES_VERSION}-linux-x86_64.tar.gz" https://snapshots-no-kpi.elastic.co/downloads/beats/metricbeat/metricbeat-${ES_VERSION}-SNAPSHOT-linux-x86_64.tar.gz + curl -o "${BEATS_DIR}/filebeat-${ES_VERSION}-linux-x86_64.tar.gz" https://snapshots-no-kpi.elastic.co/downloads/beats/filebeat/filebeat-${ES_VERSION}-SNAPSHOT-linux-x86_64.tar.gz + + $WORKSPACE/.ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dbuild.snapshot=false \ + -Dtests.jvm.argline=-Dbuild.snapshot=false -Dlicense.key=${WORKSPACE}/x-pack/license-tools/src/test/resources/public.key -Dbuild.id=deadbeef build