From c956caa49c27bb8a199d553efe958f7621e007ec Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Fri, 24 Jan 2020 11:18:21 +0100 Subject: [PATCH] [apm-server] add ci tests for apm-server chart --- ...m-charts+master+integration-apm-server.yml | 39 +++++++++++++++++++ .ci/jobs/elastic+helm-charts+master.yml | 2 + ...ts+pull-request+integration-apm-server.yml | 39 +++++++++++++++++++ .ci/jobs/elastic+helm-charts+pull-request.yml | 3 ++ helpers/matrix.yml | 5 +++ 5 files changed, 88 insertions(+) create mode 100644 .ci/jobs/elastic+helm-charts+master+integration-apm-server.yml create mode 100644 .ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml diff --git a/.ci/jobs/elastic+helm-charts+master+integration-apm-server.yml b/.ci/jobs/elastic+helm-charts+master+integration-apm-server.yml new file mode 100644 index 000000000..8a6d1b75b --- /dev/null +++ b/.ci/jobs/elastic+helm-charts+master+integration-apm-server.yml @@ -0,0 +1,39 @@ +--- +- job: + name: elastic+helm-charts+master+integration-apm-server + display-name: elastic / helm-charts - master - integration apm-server + description: Master - integration apm-server + scm: + - git: + wipe-workspace: 'True' + axes: + - axis: + type: slave + name: label + values: + - docker&&virtual + - axis: + type: yaml + name: APM_SERVER_SUITE + filename: helpers/matrix.yml + - axis: + type: yaml + name: KUBERNETES_VERSION + filename: helpers/matrix.yml + builders: + - shell: |- + #!/usr/local/bin/runbld + set -euo pipefail + + source /usr/local/bin/bash_standard_lib.sh + + set +x + VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") + export VAULT_TOKEN + unset VAULT_ROLE_ID VAULT_SECRET_ID + set -x + + cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + + cd helpers/terraform/ + ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${APM_SERVER_SUITE} CHART=apm-server diff --git a/.ci/jobs/elastic+helm-charts+master.yml b/.ci/jobs/elastic+helm-charts+master.yml index 373f63456..819e948b6 100644 --- a/.ci/jobs/elastic+helm-charts+master.yml +++ b/.ci/jobs/elastic+helm-charts+master.yml @@ -37,6 +37,8 @@ current-parameters: true - name: elastic+helm-charts+master+integration-logstash current-parameters: true + - name: elastic+helm-charts+master+integration-apm-server + current-parameters: true publishers: - trigger-parameterized-builds: - project: elastic+helm-charts+master+cluster-cleanup diff --git a/.ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml b/.ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml new file mode 100644 index 000000000..55b331e9d --- /dev/null +++ b/.ci/jobs/elastic+helm-charts+pull-request+integration-apm-server.yml @@ -0,0 +1,39 @@ +--- +- job: + name: elastic+helm-charts+pull-request+integration-apm-server + display-name: elastic / helm-charts - pull-request - integration apm-server + description: Pull request - integration apm-server + scm: + - git: + refspec: +refs/pull/*:refs/remotes/origin/pr/* + axes: + - axis: + type: slave + name: label + values: + - docker&&virtual + - axis: + type: yaml + name: APM_SERVER_SUITE + filename: helpers/matrix.yml + - axis: + type: yaml + name: KUBERNETES_VERSION + filename: helpers/matrix.yml + builders: + - shell: |- + #!/usr/local/bin/runbld + set -euo pipefail + + source /usr/local/bin/bash_standard_lib.sh + + set +x + VAULT_TOKEN=$(retry 5 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") + export VAULT_TOKEN + unset VAULT_ROLE_ID VAULT_SECRET_ID + set -x + + cluster_name="helm-${KUBERNETES_VERSION//./}-${branch_specifier:0:10}" + + cd helpers/terraform/ + ./in-docker make integration KUBERNETES_VERSION=${KUBERNETES_VERSION} CLUSTER_NAME=${cluster_name} SUITE=${APM_SERVER_SUITE} CHART=apm-server diff --git a/.ci/jobs/elastic+helm-charts+pull-request.yml b/.ci/jobs/elastic+helm-charts+pull-request.yml index f9d40e48c..96b7a72b4 100644 --- a/.ci/jobs/elastic+helm-charts+pull-request.yml +++ b/.ci/jobs/elastic+helm-charts+pull-request.yml @@ -54,6 +54,9 @@ - name: elastic+helm-charts+pull-request+integration-logstash current-parameters: true predefined-parameters: branch_specifier=${ghprbActualCommit} + - name: elastic+helm-charts+pull-request+integration-apm-server + current-parameters: true + predefined-parameters: branch_specifier=${ghprbActualCommit} publishers: - trigger-parameterized-builds: - project: elastic+helm-charts+pull-request+cluster-cleanup diff --git a/helpers/matrix.yml b/helpers/matrix.yml index e83f64623..493c51cc9 100644 --- a/helpers/matrix.yml +++ b/helpers/matrix.yml @@ -32,6 +32,11 @@ LOGSTASH_SUITE: - oss - elasticsearch - 6.x +APM_SERVER_SUITE: + - default + - oss + - security + - 6.x KUBERNETES_VERSION: - '1.13' - '1.14'