Skip to content

Commit

Permalink
Pull in upstream ci processes from logstash-input-example (lukewaite#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewaite authored Jun 28, 2017
1 parent 128e348 commit ac00b90
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
---
sudo: false
language: ruby
cache: bundler
env:
rvm:
- jruby-1.7.23
jdk: openjdk8
dist: trusty
script:
- bundle exec rspec spec
- jruby-1.7.25
matrix:
include:
- rvm: jruby-9.1.10.0
env: LOGSTASH_BRANCH=master
- rvm: jruby-1.7.25
env: LOGSTASH_BRANCH=5.x
fast_finish: true
install: true
script: ci/build.sh
jdk: oraclejdk8
21 changes: 21 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# version: 1
########################################################
#
# AUTOMATICALLY GENERATED! DO NOT EDIT
#
########################################################
set -e

echo "Starting build process in: `pwd`"
source ./ci/setup.sh

if [[ -f "ci/run.sh" ]]; then
echo "Running custom build script in: `pwd`/ci/run.sh"
source ./ci/run.sh
else
echo "Running default build scripts in: `pwd`/ci/build.sh"
bundle install
bundle exec rake vendor
bundle exec rspec spec
fi
26 changes: 26 additions & 0 deletions ci/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# version: 1
########################################################
#
# AUTOMATICALLY GENERATED! DO NOT EDIT
#
########################################################
set -e
if [ "$LOGSTASH_BRANCH" ]; then
echo "Building plugin using Logstash source"
BASE_DIR=`pwd`
echo "Checking out branch: $LOGSTASH_BRANCH"
git clone -b $LOGSTASH_BRANCH https://github.com/elastic/logstash.git ../../logstash --depth 1
printf "Checked out Logstash revision: %s\n" "$(git -C ../../logstash rev-parse HEAD)"
cd ../../logstash
echo "Building plugins with Logstash version:"
cat versions.yml
echo "---"
# We need to build the jars for that specific version
echo "Running gradle assemble in: `pwd`"
./gradlew assemble
cd $BASE_DIR
export LOGSTASH_SOURCE=1
else
echo "Building plugin using released gems on rubygems"
fi

0 comments on commit ac00b90

Please sign in to comment.