[meta] add dedicated ci jobs for 6.x (#760)

This commit create dedicated Jenkins jobs for 6.x for master branch and
PRs. This is required to allow having different test suites for 7.x and
6.x in a following PR.
This commit is contained in:
Julien Mailleret 2021-01-27 17:37:00 +01:00 committed by GitHub
parent fec4907c4b
commit e863695018
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 116 additions and 54 deletions

View file

@ -12,12 +12,6 @@
logrotate:
daysToKeep: 30
numToKeep: 100
parameters:
- string:
name: branch_specifier
default: master
description: the Git branch specifier to build (<branchName>, <tagName>,
<commitId>, etc.)
properties:
- github:
url: https://github.com/elastic/ansible-elasticsearch/
@ -41,10 +35,6 @@
name: label
values:
- linux
- axis:
name: VERSION
filename: elasticsearch/test/matrix.yml
type: yaml
- axis:
name: OS
filename: elasticsearch/test/matrix.yml
@ -55,6 +45,25 @@
type: yaml
vault:
role_id: cff5d4e0-61bf-2497-645f-fcf019d10c13
builders:
- shell: |-
#!/usr/local/bin/runbld
set -euo pipefail
export RBENV_VERSION='2.5.7'
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv local $RBENV_VERSION
export ES_XPACK_LICENSE_FILE="$(pwd)/license.json"
echo "Getting xpack_license from secrets service"
set +x
VAULT_TOKEN=$( curl -s -X POST -H "Content-Type: application/json" -L -d "{\"role_id\":\"$VAULT_ROLE_ID\",\"secret_id\":\"$VAULT_SECRET_ID\"}" $VAULT_ADDR/v1/auth/approle/login | jq -r '.auth.client_token' )
curl -s -L -H "X-Vault-Token:$VAULT_TOKEN" $VAULT_ADDR/v1/secret/devops-ci/ansible-elasticsearch/xpack_license | jq -r '.data.value' > ${ES_XPACK_LICENSE_FILE}
set -x
echo "Finished getting xpack_license from secrets service"
make setup
make verify VERSION=$VERSION PATTERN=$TEST_TYPE-$OS
wrappers:
- ansicolor
- timeout:
@ -62,4 +71,3 @@
timeout: 360
fail: true
- timestamps

View file

@ -0,0 +1,39 @@
---
- job:
name: elastic+ansible-elasticsearch+master-6x
display-name: elastic / ansible-elasticsearch - master - 6.x
description: Master branch testing with test kitchen for Elasticsearch 6.x
parameters:
- string:
name: branch_specifier
default: master
description: the Git branch specifier to build (<branchName>, <tagName>,
<commitId>, etc.)
- string:
name: VERSION
default: 6.x
description: Elasticsearch major version
axes:
- axis:
type: slave
name: label
values:
- linux
- axis:
name: OS
filename: elasticsearch/test/matrix-6x.yml
type: yaml
- axis:
name: TEST_TYPE
filename: elasticsearch/test/matrix-6x.yml
type: yaml
triggers:
- timed: H H(02-04) * * *
publishers:
- slack:
notify-back-to-normal: True
notify-every-failure: True
room: infra-release-notify
team-domain: elastic
auth-token-id: release-slack-integration-token
auth-token-credential-id: release-slack-integration-token

View file

@ -3,27 +3,14 @@
name: elastic+ansible-elasticsearch+master
display-name: elastic / ansible-elasticsearch - master
description: Master branch testing with test kitchen
parameters:
- string:
name: branch_specifier
default: master
description: the Git branch specifier to build (<branchName>, <tagName>,
<commitId>, etc.)
triggers:
- timed: H H(02-04) * * *
builders:
- shell: |-
#!/usr/local/bin/runbld
set -euo pipefail
export RBENV_VERSION='2.5.7'
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv local $RBENV_VERSION
export ES_XPACK_LICENSE_FILE="$(pwd)/license.json"
echo "Getting xpack_license from secrets service"
set +x
VAULT_TOKEN=$( curl -s -X POST -H "Content-Type: application/json" -L -d "{\"role_id\":\"$VAULT_ROLE_ID\",\"secret_id\":\"$VAULT_SECRET_ID\"}" $VAULT_ADDR/v1/auth/approle/login | jq -r '.auth.client_token' )
curl -s -L -H "X-Vault-Token:$VAULT_TOKEN" $VAULT_ADDR/v1/secret/devops-ci/ansible-elasticsearch/xpack_license | jq -r '.data.value' > ${ES_XPACK_LICENSE_FILE}
set -x
echo "Finished getting xpack_license from secrets service"
make setup
make verify VERSION=$VERSION PATTERN=$TEST_TYPE-$OS
publishers:
- slack:
notify-back-to-normal: True

View file

@ -0,0 +1,36 @@
---
- job:
name: elastic+ansible-elasticsearch+pull-request-6x
display-name: elastic / ansible-elasticsearch - pull-request - 6.x
description: Pull request testing with test kitchen for Elasticsearch 6.x
parameters:
- string:
name: VERSION
default: 6.x
description: Elasticsearch major version
scm:
- git:
branches:
- $ghprbActualCommit
refspec: +refs/pull/*:refs/remotes/origin/pr/*
axes:
- axis:
type: slave
name: label
values:
- linux
- axis:
name: OS
filename: elasticsearch/test/matrix-6x.yml
type: yaml
- axis:
name: TEST_TYPE
filename: elasticsearch/test/matrix-6x.yml
triggers:
- github-pull-request:
github-hooks: true
org-list:
- elastic
allow-whitelist-orgs-as-admins: true
cancel-builds-on-update: true
status-context: devops-ci

View file

@ -3,8 +3,6 @@
name: elastic+ansible-elasticsearch+pull-request
display-name: elastic / ansible-elasticsearch - pull-request
description: Pull request testing with test kitchen
project-type: matrix
parameters: []
scm:
- git:
branches:
@ -18,22 +16,3 @@
allow-whitelist-orgs-as-admins: true
cancel-builds-on-update: true
status-context: devops-ci
builders:
- shell: |-
#!/usr/local/bin/runbld
set -euo pipefail
export RBENV_VERSION='2.5.7'
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv local $RBENV_VERSION
export ES_XPACK_LICENSE_FILE="$(pwd)/license.json"
echo "Getting xpack_license from secrets service"
set +x
VAULT_TOKEN=$( curl -s -X POST -H "Content-Type: application/json" -L -d "{\"role_id\":\"$VAULT_ROLE_ID\",\"secret_id\":\"$VAULT_SECRET_ID\"}" $VAULT_ADDR/v1/auth/approle/login | jq -r '.auth.client_token' )
curl -s -L -H "X-Vault-Token:$VAULT_TOKEN" $VAULT_ADDR/v1/secret/devops-ci/ansible-elasticsearch/xpack_license | jq -r '.data.value' > ${ES_XPACK_LICENSE_FILE}
set -x
echo "Finished getting xpack_license from secrets service"
make setup
make verify VERSION=$VERSION PATTERN=$TEST_TYPE-$OS

16
test/matrix-6x.yml Normal file
View file

@ -0,0 +1,16 @@
OS:
- ubuntu-1404
- ubuntu-1604
- ubuntu-1804
- debian-8
- debian-9
- debian-10
- centos-7
- centos-8
- amazonlinux-2
TEST_TYPE:
- oss
- oss-upgrade
- oss-to-xpack-upgrade
- xpack
- xpack-upgrade

View file

@ -1,6 +1,3 @@
VERSION:
- 7.x
- 6.x
OS:
- ubuntu-1404
- ubuntu-1604