Skip to content

Commit 0734354

Browse files
bzhaoopenstackliusheng
authored andcommitted
Add hbase periodic build job (apache#556)
* Add hbase periodic build job This PR add a new hbase periodic job at UTC 10:00 * Use full dir * Split hbase jobs * Fix nits * fix check * fix * fix * Use protobuf 2.6.1 first The version 2.6.1 is available for ubuntu. But from test, I got failed during build the hbase. The reason is lacking some google libraries. * Add tags and new task for getting current install java/mvn info * Change maven url for download * Fix ARCH and test project branch * Fix BuildType
1 parent c1d6a71 commit 0734354

File tree

6 files changed

+96
-1
lines changed

6 files changed

+96
-1
lines changed

playbooks/hbase-arm-build/run.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
- hosts: all
2+
become: yes
3+
roles:
4+
- install-openjdk
5+
- install-maven
6+
tasks:
7+
- name: Build hbase
8+
shell: |
9+
set -xeo pipefail
10+
apt install protobuf-compiler -y
11+
# build begin
12+
mvn package -DskipTests | tee "{{ ansible_user_dir }}/workspace/logs/hbase_build.log"
13+
args:
14+
executable: /bin/bash
15+
chdir: '{{ zuul.project.src_dir }}'
16+
environment: '{{ global_env }}'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
maven_version: '3.6.1'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
- name: Install Apache Maven {{ maven_version }}
2+
shell: |
3+
wget "https://www.apache.org/dist/maven/maven-3/{{ maven_version }}/binaries/apache-maven-{{ maven_version }}-bin.tar.gz"
4+
tar xzvf apache-maven-{{ maven_version }}-bin.tar.gz
5+
args:
6+
executable: /bin/bash
7+
chdir: '{{ zuul.project.src_dir }}'
8+
environment: '{{ global_env }}'
9+
10+
- name: Set maven env vars
11+
set_fact:
12+
maven_env:
13+
PATH: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/apache-maven-{{ maven_version }}/bin:{{ ansible_env.PATH }}'
14+
no_log: yes
15+
16+
- name: Merge maven env vars into global env
17+
set_fact:
18+
global_env: '{{ global_env | combine(maven_env) }}'
19+
no_log: yes
20+
21+
- name: Show installed maven info
22+
shell: |
23+
set -ex
24+
which mvn
25+
mvn --version
26+
args:
27+
executable: /bin/bash
28+
environment: '{{ global_env }}'

roles/install-openjdk/tasks/main.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,29 @@
55
apt-get install openjdk-{{ java_version }}-jdk -y
66
executable: /bin/bash
77
environment: '{{ global_env }}'
8+
9+
- name: Get host jvm path
10+
shell: echo $(dirname $(dirname $(update-alternatives --list javac)))
11+
no_log: yes
12+
register: real_java_home
13+
14+
- name: Set java env vars
15+
set_fact:
16+
java_env:
17+
JAVA_HOME: "{{ real_java_home.stdout }}"
18+
PATH: '{{ real_java_home.stdout }}/bin:{{ ansible_env.PATH }}'
19+
no_log: yes
20+
21+
- name: Merge java env vars into global env
22+
set_fact:
23+
global_env: '{{ global_env | combine(java_env) }}'
24+
no_log: yes
25+
26+
- name: Show installed java info
27+
shell: |
28+
set -ex
29+
which javac
30+
javac -version
31+
args:
32+
executable: /bin/bash
33+
environment: '{{ global_env }}'

zuul.d/jobs.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,7 @@
19841984
- Application:Kubernetes@master
19851985
- Application:Docker@latest-release
19861986
- OS:ubuntu-xenial
1987-
- Arch:Aarch64
1987+
- Arch:aarch64
19881988
- BuildType:Integration test
19891989

19901990
- job:
@@ -2139,3 +2139,19 @@
21392139
- OS:ubuntu-xenial
21402140
- Arch:x86_64
21412141
- BuildType:Integration test
2142+
2143+
# hbase arm build periodic job
2144+
- job:
2145+
name: hbase-build-arm64
2146+
parent: init-test
2147+
description: |
2148+
Hbase build in openlab arm instance.
2149+
run: playbooks/hbase-arm-build/run.yaml
2150+
nodeset: ubuntu-xenial-arm64
2151+
tags:
2152+
- Category:BigData
2153+
- Project:apache/hbase
2154+
- Application:Hbase@master
2155+
- OS:ubuntu-xenial
2156+
- Arch:aarch64
2157+
- BuildType:Compile

zuul.d/projects.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,10 @@
220220
branches: master
221221
- rust-openstack-0.2.3-acceptance-queens:
222222
branches: master
223+
224+
- project:
225+
name: apache/hbase
226+
periodic-10/22:
227+
jobs:
228+
- hbase-build-arm64:
229+
branches: master

0 commit comments

Comments
 (0)