Skip to content

Commit 8159a00

Browse files
authored
Merge pull request voxpupuli#1024 from elastic/add-jbb-defs
[ci] add JJBB definitions
2 parents 835e679 + 2704899 commit 8159a00

7 files changed

+260
-0
lines changed

.ci/jobs/defaults.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
3+
##### GLOBAL METADATA
4+
5+
- meta:
6+
cluster: devops-ci
7+
8+
##### JOB DEFAULTS
9+
10+
- job:
11+
project-type: matrix
12+
logrotate:
13+
daysToKeep: 30
14+
numToKeep: 100
15+
parameters:
16+
- string:
17+
name: branch_specifier
18+
default: master
19+
description: the Git branch specifier to build (<branchName>, <tagName>,
20+
<commitId>, etc.)
21+
properties:
22+
- github:
23+
url: https://github.com/elastic/puppet-elasticsearch/
24+
- inject:
25+
properties-content: |-
26+
HOME=$JENKINS_HOME
27+
VAULT_PATH=secret/devops-ci/puppet-elasticsearch/xpack_license
28+
node: master
29+
scm:
30+
- git:
31+
name: origin
32+
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
33+
reference-repo: /var/lib/jenkins/.git-references/puppet-elasticsearch.git
34+
branches:
35+
- ${branch_specifier}
36+
url: https://github.com/elastic/puppet-elasticsearch.git
37+
basedir: ''
38+
wipe-workspace: 'True'
39+
triggers:
40+
- github
41+
vault:
42+
url: https://secrets.elastic.co:8200
43+
role_id: cff5d4e0-61bf-2497-645f-fcf019d10c13
44+
wrappers:
45+
- ansicolor
46+
- timeout:
47+
type: absolute
48+
timeout: 360
49+
fail: true
50+
- timestamps
51+
publishers:
52+
- email:
53+
recipients: [email protected]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
- job:
3+
name: elastic+puppet-elasticsearch+master+acceptance
4+
display-name: elastic / puppet-elasticsearch - master - acceptance
5+
description: Master - acceptance
6+
axes:
7+
- axis:
8+
type: slave
9+
name: label
10+
values:
11+
- linux
12+
- axis:
13+
name: OS
14+
filename: spec/matrix.yml
15+
type: yaml
16+
- axis:
17+
name: TEST_TYPE
18+
filename: spec/matrix.yml
19+
type: yaml
20+
builders:
21+
- shell: |-
22+
#!/usr/local/bin/runbld
23+
set -euo pipefail
24+
25+
export RBENV_VERSION='2.3.0'
26+
export PATH="$HOME/.rbenv/bin:$PATH"
27+
eval "$(rbenv init -)"
28+
rbenv local $RBENV_VERSION
29+
30+
# We need to not use [VERSION] in the matrix name since having
31+
# square brackets in the directories breaks some of the puppet tests
32+
case "$TEST_TYPE" in
33+
latest)
34+
test=acceptance
35+
;;
36+
snapshot)
37+
test=snapshot
38+
;;
39+
*)
40+
test="acceptance[$TEST_TYPE]"
41+
;;
42+
esac
43+
44+
echo '--color' >> ~/.rspec
45+
bundle install
46+
bundle exec rake "beaker:$OS:$test"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
- job:
3+
name: elastic+puppet-elasticsearch+master+intake
4+
display-name: elastic / puppet-elasticsearch - master - intake
5+
description: Master - intake
6+
axes:
7+
- axis:
8+
type: slave
9+
name: label
10+
values:
11+
- linux
12+
- axis:
13+
name: PUPPET_VERSION
14+
filename: spec/matrix.yml
15+
type: yaml
16+
builders:
17+
- shell: |-
18+
#!/usr/local/bin/runbld
19+
set -euo pipefail
20+
21+
export RBENV_VERSION='2.3.0'
22+
export PATH="$HOME/.rbenv/bin:$PATH"
23+
eval "$(rbenv init -)"
24+
rbenv local $RBENV_VERSION
25+
26+
echo '--color' >> ~/.rspec
27+
bundle install
28+
bundle exec rake intake
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
- job:
3+
name: elastic+puppet-elasticsearch+master
4+
display-name: elastic / puppet-elasticsearch - master
5+
description: Master branch testing
6+
project-type: multijob
7+
scm:
8+
- git:
9+
wipe-workspace: 'False'
10+
triggers:
11+
- timed: H H(02-04) * * *
12+
builders:
13+
- multijob:
14+
name: intake phase
15+
projects:
16+
- name: elastic+puppet-elasticsearch+master+intake
17+
predefined-parameters: branch_specifier=master
18+
- multijob:
19+
name: acceptance phase
20+
projects:
21+
- name: elastic+puppet-elasticsearch+master+acceptance
22+
predefined-parameters: branch_specifier=master
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
- job:
3+
name: elastic+puppet-elasticsearch+pull-request+acceptance
4+
display-name: elastic / puppet-elasticsearch - pull-request - acceptance
5+
description: Pull request testing - acceptance
6+
scm:
7+
- git:
8+
refspec: +refs/pull/*:refs/remotes/origin/pr/*
9+
axes:
10+
- axis:
11+
type: slave
12+
name: label
13+
values:
14+
- linux
15+
- axis:
16+
name: OS
17+
filename: spec/matrix.yml
18+
type: yaml
19+
- axis:
20+
name: TEST_TYPE
21+
filename: spec/matrix.yml
22+
type: yaml
23+
builders:
24+
- shell: |-
25+
#!/usr/local/bin/runbld
26+
set -euo pipefail
27+
28+
export RBENV_VERSION='2.3.0'
29+
export PATH="$HOME/.rbenv/bin:$PATH"
30+
eval "$(rbenv init -)"
31+
rbenv local $RBENV_VERSION
32+
33+
# We need to not use [VERSION] in the matrix name since having
34+
# square brackets in the directories breaks some of the puppet tests
35+
case "$TEST_TYPE" in
36+
latest)
37+
test=acceptance
38+
;;
39+
snapshot)
40+
test=snapshot
41+
;;
42+
*)
43+
test="acceptance[$TEST_TYPE]"
44+
;;
45+
esac
46+
47+
echo '--color' >> ~/.rspec
48+
bundle install
49+
bundle exec rake "beaker:$OS:$test"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
- job:
3+
name: elastic+puppet-elasticsearch+pull-request+intake
4+
display-name: elastic / puppet-elasticsearch - pull-request - intake
5+
description: Pull request testing - intake
6+
scm:
7+
- git:
8+
refspec: +refs/pull/*:refs/remotes/origin/pr/*
9+
axes:
10+
- axis:
11+
type: slave
12+
name: label
13+
values:
14+
- linux
15+
- axis:
16+
name: PUPPET_VERSION
17+
filename: spec/matrix.yml
18+
type: yaml
19+
builders:
20+
- shell: |-
21+
#!/usr/local/bin/runbld
22+
set -euo pipefail
23+
24+
export RBENV_VERSION='2.3.0'
25+
export PATH="$HOME/.rbenv/bin:$PATH"
26+
eval "$(rbenv init -)"
27+
rbenv local $RBENV_VERSION
28+
29+
echo '--color' >> ~/.rspec
30+
bundle install
31+
bundle exec rake intake
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
- job:
3+
name: elastic+puppet-elasticsearch+pull-request
4+
display-name: elastic / puppet-elasticsearch - pull-request
5+
description: Pull request testing
6+
project-type: multijob
7+
scm:
8+
- git:
9+
branches:
10+
- $ghprbActualCommit
11+
refspec: +refs/pull/*:refs/remotes/origin/pr/*
12+
wipe-workspace: 'False'
13+
triggers:
14+
- github-pull-request:
15+
github-hooks: true
16+
org-list:
17+
- elastic
18+
allow-whitelist-orgs-as-admins: true
19+
cancel-builds-on-update: false
20+
status-context: devops-ci
21+
builders:
22+
- multijob:
23+
name: intake phase
24+
projects:
25+
- name: elastic+puppet-elasticsearch+pull-request+intake
26+
predefined-parameters: branch_specifier=${ghprbActualCommit}
27+
- multijob:
28+
name: acceptance phase
29+
projects:
30+
- name: elastic+puppet-elasticsearch+pull-request+acceptance
31+
predefined-parameters: branch_specifier=${ghprbActualCommit}

0 commit comments

Comments
 (0)