Skip to content

Commit 851c414

Browse files
committed
new build system for jruby9k
1 parent 97019e1 commit 851c414

File tree

4 files changed

+72
-9
lines changed

4 files changed

+72
-9
lines changed

.travis.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
---
2-
services:
3-
- redis-server
4-
sudo: false
52
language: ruby
63
cache: bundler
4+
env:
75
rvm:
8-
- jruby-1.7.25
6+
- jruby-1.7.25
7+
services:
8+
- redis-server
9+
sudo: false
10+
matrix:
11+
include:
12+
- rvm: jruby-1.7.25
13+
env: LOGSTASH_BRANCH=master
14+
- rvm: jruby-1.7.25
15+
env: LOGSTASH_BRANCH=5.x
16+
- rvm: jruby-9.1.9.0
17+
env: LOGSTASH_BRANCH=feature/9000
18+
allow_failures:
19+
- rvm: jruby-9.1.9.0
20+
fast_finish: true
21+
install: true
22+
script: ci/build.sh
923
jdk: oraclejdk8
10-
script:
11-
- bundle exec rspec spec --order rand
12-
- bundle exec rspec spec --order rand -t redis
13-
before_install: []

Gemfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
source 'https://rubygems.org'
22

3-
# Specify your gem's dependencies in logstash-mass_effect.gemspec
43
gemspec
4+
5+
logstash_path = "../../logstash"
6+
7+
if Dir.exist?(logstash_path) && ENV["LOGSTASH_SOURCE"] == 1
8+
gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
9+
gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
10+
end

ci/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
# version: 1
3+
########################################################
4+
#
5+
# AUTOMATICALLY GENERATED! DO NOT EDIT
6+
#
7+
########################################################
8+
set -e
9+
10+
echo "Starting build process in: `pwd`"
11+
./ci/setup.sh
12+
13+
if [[ -f "ci/run.sh" ]]; then
14+
echo "Running custom build script in: `pwd`/ci/run.sh"
15+
./ci/run.sh
16+
else
17+
echo "Running default build scripts in: `pwd`/ci/build.sh"
18+
bundle install
19+
bundle exec rake vendor
20+
bundle exec rspec spec
21+
fi

ci/setup.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# version: 1
3+
########################################################
4+
#
5+
# AUTOMATICALLY GENERATED! DO NOT EDIT
6+
#
7+
########################################################
8+
set -e
9+
if [ "$LOGSTASH_BRANCH" ]; then
10+
echo "Building plugin using Logstash source"
11+
BASE_DIR=`pwd`
12+
echo "Checking out branch: $LOGSTASH_BRANCH"
13+
git clone -b $LOGSTASH_BRANCH https://github.com/elastic/logstash.git ../../logstash --depth 1
14+
printf "Checked out Logstash revision: %s\n" "$(git -C ../../logstash rev-parse HEAD)"
15+
cd ../../logstash
16+
echo "Building plugins with Logstash version:"
17+
cat versions.yml
18+
echo "---"
19+
# We need to build the jars for that specific version
20+
echo "Running gradle assemble in: `pwd`"
21+
./gradlew assemble
22+
cd $BASE_DIR
23+
export LOGSTASH_SOURCE=1
24+
else
25+
echo "Building plugin using released gems on rubygems"
26+
fi

0 commit comments

Comments
 (0)