Skip to content

Commit bb57bca

Browse files
authored
Merge branch 'release/0.5.0'
2 parents bdb6ca5 + 57585cf commit bb57bca

29 files changed

+428
-587
lines changed

.release.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Required: local settings
2+
local:
3+
root_dir : <%= ENV['TRAVIS_BUILD_DIR'] %>
4+
5+
# Required: deployment targets
6+
targets:
7+
- type : "bintray"
8+
user : <%= ENV['BINTRAY_SNOWPLOW_GENERIC_USER'] %>
9+
password : <%= ENV['BINTRAY_SNOWPLOW_GENERIC_API_KEY'] %>
10+
11+
# Required: packages to be deployed
12+
packages:
13+
- repo : "snowplow-generic"
14+
name : "kinesis-s3"
15+
user_org : "snowplow"
16+
publish : true
17+
18+
# Will attempt to overwrite a published entity if one is found
19+
override : false
20+
21+
# If the artifact already exists will determine whether or not to fail the release
22+
continue_on_conflict : false
23+
24+
# The version of this package
25+
version : <%= ENV['TRAVIS_TAG'] %>
26+
27+
# Required IF '--check-version' is passed: will assert that both versions are the same
28+
build_version : <%= FUNC['sbt_version(.)'] %>
29+
30+
build_commands:
31+
- sbt assembly
32+
33+
# Required: Artifact
34+
artifacts:
35+
# The artifact name is composed like so: {{prefix}}{{version}}{{suffix}}.zip
36+
- prefix : "kinesis_s3_"
37+
suffix : ""
38+
type : "zip"
39+
40+
# The binaries to put in the zip
41+
binary_paths:
42+
- target/scala-2.11/snowplow-kinesis-s3-<%= ENV['TRAVIS_TAG'] %>

.travis.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
language: scala
22
scala:
3-
- 2.10.1
3+
- 2.11.11
44
jdk:
5-
- oraclejdk7
5+
- oraclejdk8
66

77
before_script:
8-
- echo yes | sudo apt-get install lzop liblzo2-dev
8+
- sudo apt-get install -y lzop liblzo2-dev
9+
10+
before_deploy: pip install --user release-manager==0.2.0
11+
deploy:
12+
- provider: script
13+
script: release-manager --config .release.yml --make-artifact --upload-artifact --check-version
14+
skip_cleanup: true
15+
on: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u3D842lppqlGH4O+GM5G3+fArSnjHmFhVRwhNMsHlGG/brXHerhCPGb2+hkIaIg/sopWP+OoEWZvlRUihv9nOLTCCZy4F45dz/B38XRM9vXZscw1nX5uu/f4LvRtOIsinOHpOCFWtxloh8qWGarcvj0Q6Ix4f/rb4L/ZIN5PthZJVEswchSK9Ee4b6Pt0EIsM2gEPjdQ5RXvYb0IWRVxbgJH7ljtk+WxHDfr67gvLAzrD2X2bKQCp+mJ3xGdiH+Ddu1r8Pb/Z6g4icFAxBWQYaSuw2etvNNGcH+Y77R7Q+Q5Hbp8omXXBj243uje/zZpNwlEeoaVbOms4=

CHANGELOG

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
Version 0.5.0 (2017-06-30)
2+
--------------------------
3+
Add a newline at the end of a gzipped tsv file (#49)
4+
Resolve environment variables in hocon (#67)
5+
Add support for the Chinese Kinesis endpoint (#71)
6+
Do not dismiss failures prior to serialization (#101)
7+
Reduce INFO logging (#50)
8+
Bump Scala version to 2.11 (#81)
9+
Upgrade to Java 8 (#82)
10+
Bump SBT to 0.13.15 (#83)
11+
Bump Kinesis Client Library to 1.7.5 (#55)
12+
Update amazon-kinesis-connectors to 1.3.0 (#17)
13+
Bump hadoop-common to 2.7.3 (#94)
14+
Bump elephant-bird to 4.15 (#95)
15+
Bump hadoop-lzo to 0.4.20 (#93)
16+
Bump scalaz to 7.0.9 (#86)
17+
Bump sbt-assembly to 0.14.5 (#84)
18+
Bump joda-time to 2.9.9 (#96)
19+
Bump config to 1.3.1 (#97)
20+
Bump snowplow-scala-tracker to 0.3.0 (#92)
21+
Bump specs2-core to 3.9.1 (#89)
22+
Replace argot by scopt (#85)
23+
Remove scalazon dependency (#88)
24+
Remove joda-convert dependency (#98)
25+
Remove scalaz-specs2 dependency (#90)
26+
Update README markdown in according with CommonMark (#76)
27+
Add CI/CD to project (#79)
28+
Add Bintray credentials to .travis.yml (#100)
29+
130
Version 0.4.1 (2016-06-01)
231
--------------------------
332
Crash when unable to find stream instead of hanging (#58)

README.md

+14-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Kinesis S3
22

3-
[ ![Build Status] [travis-image] ] [travis]
4-
[ ![Release] [release-image] ] [releases]
5-
[ ![License] [license-image] ] [license]
3+
[![Build Status][travis-image]][travis]
4+
[![Release][release-image]][releases]
5+
[![License][license-image]][license]
66

77
## Overview
88

@@ -24,7 +24,7 @@ The records are treated as byte arrays containing UTF-8 encoded strings (whether
2424

2525
## Quickstart
2626

27-
Assuming git, **[Vagrant] [vagrant-install]** and **[VirtualBox] [virtualbox-install]** installed:
27+
Assuming git, **[Vagrant][vagrant-install]** and **[VirtualBox][virtualbox-install]** installed:
2828

2929
```bash
3030
host$ git clone https://github.com/snowplow/kinesis-s3.git
@@ -49,14 +49,11 @@ NOTE: These are already installed in the Vagrant quickstart environment.
4949
The Kinesis S3 LZO Sink has the following command-line interface:
5050

5151
```
52-
snowplow-kinesis-s3: Version 0.4.1. Copyright (c) 2014-2015, Snowplow Analytics
53-
Ltd.
52+
snowplow-kinesis-s3: Version 0.5.0
5453
55-
Usage: snowplow-lzo-s3-sink [OPTIONS]
54+
Usage: snowplow-kinesis-s3 [options]
5655
57-
OPTIONS
58-
--config filename
59-
Configuration file.
56+
--config <filename>
6057
```
6158

6259
## Running
@@ -78,16 +75,16 @@ guest$ sbt "run --config my.conf"
7875

7976
## Find out more
8077

81-
| Technical Docs | Setup Guide | Roadmap & Contributing |
82-
|-----------------------------|-----------------------|--------------------------------------|
83-
| ![i1] [techdocs-image] | ![i2] [setup-image] | ![i3] [roadmap-image] |
84-
| [Technical Docs] [techdocs] | [Setup Guide] [setup] | _coming soon_ |
78+
| Technical Docs | Setup Guide | Roadmap & Contributing |
79+
|----------------------------|----------------------|------------------------|
80+
| ![i1][techdocs-image] | ![i2][setup-image] | ![i3][roadmap-image] |
81+
| [Technical Docs][techdocs] | [Setup Guide][setup] | _coming soon_ |
8582

8683
## Copyright and license
8784

88-
Kinesis S3 is copyright 2014-2015 Snowplow Analytics Ltd.
85+
Kinesis S3 is copyright 2014-2017 Snowplow Analytics Ltd.
8986

90-
Licensed under the [Apache License, Version 2.0] [license] (the "License");
87+
Licensed under the [Apache License, Version 2.0][license] (the "License");
9188
you may not use this software except in compliance with the License.
9289

9390
Unless required by applicable law or agreed to in writing, software
@@ -99,7 +96,7 @@ limitations under the License.
9996
[travis-image]: https://travis-ci.org/snowplow/kinesis-s3.png?branch=master
10097
[travis]: http://travis-ci.org/snowplow/kinesis-s3
10198

102-
[release-image]: http://img.shields.io/badge/release-0.4.1-blue.svg?style=flat
99+
[release-image]: http://img.shields.io/badge/release-0.5.0-blue.svg?style=flat
103100
[releases]: https://github.com/snowplow/kinesis-s3/releases
104101

105102
[license-image]: http://img.shields.io/badge/license-Apache--2-blue.svg?style=flat

build.sbt

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2014-2017 Snowplow Analytics Ltd. All rights reserved.
3+
*
4+
* This program is licensed to you under the Apache License Version 2.0,
5+
* and you may not use this file except in compliance with the Apache License Version 2.0.
6+
* You may obtain a copy of the Apache License Version 2.0 at
7+
* http://www.apache.org/licenses/LICENSE-2.0.
8+
*
9+
* Unless required by applicable law or agreed to in writing,
10+
* software distributed under the Apache License Version 2.0 is distributed on an
11+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the Apache License Version 2.0 for the specific language governing permissions and
13+
* limitations there under.
14+
*/
15+
lazy val root = project.in(file("."))
16+
.settings(
17+
name := "snowplow-kinesis-s3",
18+
version := "0.5.0",
19+
description := "Kinesis sink for S3"
20+
)
21+
.settings(BuildSettings.buildSettings)
22+
.settings(BuildSettings.sbtAssemblySettings)
23+
.settings(
24+
libraryDependencies ++= Seq(
25+
// Java
26+
Dependencies.Libraries.kinesisClient,
27+
Dependencies.Libraries.kinesisConnector,
28+
Dependencies.Libraries.slf4j,
29+
Dependencies.Libraries.hadoop,
30+
Dependencies.Libraries.elephantbird,
31+
Dependencies.Libraries.hadoopLZO,
32+
Dependencies.Libraries.jodaTime,
33+
// Scala
34+
Dependencies.Libraries.scopt,
35+
Dependencies.Libraries.config,
36+
Dependencies.Libraries.scalaz7,
37+
Dependencies.Libraries.json4sJackson,
38+
Dependencies.Libraries.snowplowTracker,
39+
// Scala (test only)
40+
Dependencies.Libraries.specs2,
41+
// Thrift (test only)
42+
Dependencies.Libraries.collectorPayload
43+
)
44+
)
45+
46+
shellPrompt := { _ => "kinesis-s3> " }

lib/hadoop-lzo-0.4.20-SNAPSHOT.jar

-189 KB
Binary file not shown.

project/BuildSettings.scala

+50-46
Original file line numberDiff line numberDiff line change
@@ -18,66 +18,70 @@ import Keys._
1818
object BuildSettings {
1919

2020
// Basic settings for our app
21-
lazy val basicSettings = Seq[Setting[_]](
21+
lazy val basicSettings = Seq(
2222
organization := "com.snowplowanalytics",
23-
version := "0.4.1",
24-
description := "Kinesis LZO sink for S3",
25-
scalaVersion := "2.10.1",
26-
scalacOptions := Seq("-deprecation", "-encoding", "utf8",
27-
"-feature", "-target:jvm-1.7"),
28-
scalacOptions in Test := Seq("-Yrangepos"),
29-
resolvers ++= Dependencies.resolutionRepos
23+
scalaVersion := "2.11.11",
24+
scalacOptions := compilerOptions,
25+
javacOptions := javaCompilerOptions,
26+
resolvers ++= Dependencies.resolvers
27+
)
28+
29+
lazy val compilerOptions = Seq(
30+
"-deprecation",
31+
"-encoding", "UTF-8",
32+
"-feature",
33+
"-language:existentials",
34+
"-language:higherKinds",
35+
"-language:implicitConversions",
36+
"-unchecked",
37+
"-Yno-adapted-args",
38+
"-Ywarn-dead-code",
39+
"-Ywarn-numeric-widen",
40+
"-Xfuture",
41+
"-Xlint"
42+
)
43+
44+
lazy val javaCompilerOptions = Seq(
45+
"-source", "1.8",
46+
"-target", "1.8"
3047
)
3148

3249
// Makes our SBT app settings available from within the app
33-
lazy val scalifySettings = Seq(sourceGenerators in Compile <+= (sourceManaged in Compile, version, name, organization) map { (d, v, n, o) =>
34-
val file = d / "settings.scala"
35-
IO.write(file, """package com.snowplowanalytics.snowplow.storage.kinesis.s3.generated
36-
|object Settings {
37-
| val organization = "%s"
38-
| val version = "%s"
39-
| val name = "%s"
40-
|}
41-
|""".stripMargin.format(o, v, n))
42-
Seq(file)
43-
})
50+
lazy val scalifySettings = Seq(
51+
sourceGenerators in Compile += Def.task {
52+
val file = (sourceManaged in Compile).value / "settings.scala"
53+
IO.write(file, """package com.snowplowanalytics.snowplow.storage.kinesis.s3.generated
54+
|object Settings {
55+
| val organization = "%s"
56+
| val version = "%s"
57+
| val name = "%s"
58+
|}
59+
|""".stripMargin.format(organization.value, version.value, name.value))
60+
Seq(file)
61+
}.taskValue
62+
)
63+
64+
lazy val buildSettings = basicSettings ++ scalifySettings
4465

4566
// sbt-assembly settings for building a fat jar
46-
import sbtassembly.Plugin._
47-
import AssemblyKeys._
48-
lazy val sbtAssemblySettings = assemblySettings ++ Seq(
67+
import sbtassembly.AssemblyPlugin.autoImport._
68+
lazy val sbtAssemblySettings = Seq(
4969
// Executable jarfile
50-
assemblyOption in assembly ~= { _.copy(prependShellScript = Some(defaultShellScript)) },
70+
assemblyOption in assembly :=
71+
(assemblyOption in assembly).value.copy(prependShellScript = Some(
72+
Seq("#!/usr/bin/env sh", """exec java -jar "$0" "$@"""" + "\n")
73+
)),
5174
// Name it as an executable
52-
jarName in assembly := { s"${name.value}-${version.value}" },
53-
54-
excludedJars in assembly <<= (fullClasspath in assembly) map { cp =>
55-
val excludes = Set(
56-
"junit-4.8.2.jar",
57-
"jsp-2.1-6.1.14.jar",
58-
"jasper-compiler-5.5.12.jar",
59-
"jsp-api-2.1-6.1.14.jar",
60-
"servlet-api-2.5-6.1.14.jar",
61-
"commons-beanutils-1.7.0.jar",
62-
"hadoop-lzo-0.4.19.jar",
63-
"stax-api-1.0.1.jar",
64-
"commons-collections-3.2.1.jar"
65-
)
66-
cp filter { jar => excludes(jar.data.getName) }
67-
},
75+
assemblyJarName in assembly := { s"${name.value}-${version.value}" },
6876

69-
mergeStrategy in assembly := {
77+
assemblyMergeStrategy in assembly := {
7078
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
7179
case PathList("org", "objectweb", "asm", xs @ _*) => MergeStrategy.first
7280
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first
7381
case "application.conf" => MergeStrategy.concat
7482
case x =>
75-
val oldStrategy = (mergeStrategy in assembly).value
83+
val oldStrategy = (assemblyMergeStrategy in assembly).value
7684
oldStrategy(x)
77-
},
78-
79-
assemblyOption in assembly ~= { _.copy(cacheOutput = false) }
85+
}
8086
)
81-
82-
lazy val buildSettings = basicSettings ++ scalifySettings ++ sbtAssemblySettings
8387
}

0 commit comments

Comments
 (0)