Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Commit a2874b2

Browse files
authored
Merge pull request #625 from keyurkarnik/master
USERGRID-1359 : Create the ASF Jenkins build pipeline for Usergrid Stack
2 parents ac1e6e4 + b82c786 commit a2874b2

2 files changed

Lines changed: 100 additions & 0 deletions

File tree

stack/Jenkinsfile

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
pipeline {
19+
agent { label 'ubuntu' }
20+
21+
tools {
22+
maven 'Maven 3 (latest)'
23+
jdk 'JDK 1.8 (latest)'
24+
}
25+
26+
options {
27+
timeout(time: 30, unit: 'MINUTES')
28+
}
29+
30+
31+
stages {
32+
stage ('Initialize') {
33+
steps {
34+
sh '''
35+
echo "PATH = ${PATH}"
36+
echo "M2_HOME = ${M2_HOME}"
37+
'''
38+
}
39+
}
40+
41+
stage ('Build Usergrid-Java') {
42+
steps {
43+
git 'https://github.com/apache/usergrid-java.git'
44+
sh '''
45+
mvn clean install -DskipTests=true
46+
'''
47+
}
48+
}
49+
50+
stage ('Start C* and ES') {
51+
steps {
52+
sh '''
53+
mkdir -p temp
54+
cd temp
55+
rm -rf *
56+
wget http://archive.apache.org/dist/cassandra/2.1.20/apache-cassandra-2.1.20-bin.tar.gz
57+
tar -xvf apache-cassandra-2.1.20-bin.tar.gz
58+
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.tar.gz
59+
tar -xvf elasticsearch-1.7.5.tar.gz
60+
apache-cassandra-2.1.20/bin/cassandra
61+
elasticsearch-1.7.5/bin/elasticsearch -d
62+
cd ..
63+
echo "Started C* and ES. Waiting 3 mins before starting tests ..."
64+
sleep 180
65+
'''
66+
}
67+
}
68+
69+
stage ('Build Usergrid Stack') {
70+
steps {
71+
git 'https://github.com/apache/usergrid.git'
72+
sh '''
73+
mvn clean install -DskipTests=true -f stack/pom.xml
74+
'''
75+
}
76+
}
77+
}
78+
79+
post {
80+
always {
81+
echo 'End of pipeline'
82+
junit 'stack/**/surefire-reports/*.xml'
83+
sh 'ps -ef | grep cassandra'
84+
sh 'ps -ef | grep elastic'
85+
deleteDir() /* clean up our workspace */
86+
}
87+
success {
88+
echo 'Usergrid build and tests succeeded'
89+
}
90+
failure {
91+
echo 'Usergrid build and/or tests failed'
92+
}
93+
94+
}
95+
}
96+
97+
98+
99+

stack/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@
14591459
<exclude>**/dummy.txt</exclude>
14601460
<exclude>**/cloudbees.xml</exclude>
14611461
<exclude>**/catalina_base/**</exclude>
1462+
<exclude>**/*.p12</exclude>
14621463

14631464
</excludes>
14641465
</configuration>

0 commit comments

Comments
 (0)