Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Chore - Travis support #3

Merged
merged 10 commits into from
Aug 30, 2016
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: java
jdk:
- openjdk7
- oraclejdk7
- oraclejdk8
env:
global:
- secure: "q+fkZBCN8ET5RrgaG4RGt1t1aSjsL6LN6BSt/Yvx2H5a2DtGmNA/A/gcAEnKlyv0BgXAcrzAzCCIgXvt2P4om5DcBU/yOTEga+/46r7+iVnmfQGcW81NHQA1rlIYvuBqXGDo9yo1B3eRr8vTj3fzEE3K8jjchHQUlgRdUum3DNKeZwACodV2fpj9ZslyoX4HRpWg3ctqvB0R7/4NwtXnXrOw8hHDF8OrQK3JiCxAoZnA16/Fwc0d8yN4Or10N1XiWbNdLFek+Y3nVTdGRUZjsqp/VhvgIwzmtnuiCeF2iuMCpYy6C9SAFG4Tyn5VLmFzEqXMrbxuMBp8c2GCcFQb0jxEiWKsT0Nufqc1pYlUSl2S12D8yokEo5H9/NcH/2p2b5zqzcWzFe1c5YEn0Ktj8d/01GDYfkuPyoQ0UmjC6h68iozk5mogPT0t7eUf7i0wll72v4kGB2xOK3VY+53LA7DS+f/0HeDi47tXgPkA8bg2dGZTTD+JHXcqyMTt9Ey96a42cauLQ4PGfujc6fPJUw31sxx2IURj1USdxut/a5PEa+LL+xGrKKgOW4GMUwjrYMnLf9e3Y/uR4EoHmYYwsoNtD0g6bEt7C83JZrQd5Sp3mN6gEU0sjp2/iBPqS+tB3z6eRUur8ctnk6EC82WHmRwZHeoKLVOktAPCKumBnWY="
- secure: "04af3/9b67O5xd1U8GDhCqRQedHM3RP5HokdsOwAe8vN3EyyyKWXQafBkKsPvmDh5Uu/CYQppOYS4pQxB9ikweTfj34DbyyxpqJmjYE4KFvdQuFd0msyXhLCg6xfvS4KO6zjUQ8/c3rNQap4hx/icQ50/NES4rkUkxIZ/VKQ4jPXcBzPegEC6Le50Vw2tR8FT4erdNuABnGf1WnWGUUa3i6xdQQPyw8kdTIun08HxE6M9F+JJRH8jH3b7KizQhGdACAk4fnCOmFSgu7pm6ACXRJYqAfg055i5mr77yZXfeUIcIY3l45uY1uR8sxEbLUE/KwwlLGLVZWDI4xU6JIGisbrmMce+vz6YKUT9gHF3iAEJ5e4N18nJcRyHVrqcuRzv5Py0rFPZ70dr7aW/tk0JrTz6+FZ4FNIOdvIQe4qWy2TVns0EkERdtYGTdsigWfa/sKF/P5+/2foUOlnR06p55NHpIjaHRKy/XFVV1gyURUlRUGExVoIMX21bAMxGYMFMH7LfddRsly028lXwibRMkQGBeyVRYKQmqJvN3mTPbuAWmZZdaVpqn1jkgETlT6/qz43zv9y8jAOzZ22SeHEXe3NiexChqkAJWIH3cBYshMhy8H1fmYAIVYHvI+BPsbi+qDYSnAlAUDqoLWXPAvWUX89dAIXYRNcKplzpFsjWvM="
deploy:
provider: script
script: ./scripts/deploy.sh
skip_cleanup: true
on:
branch: master
jdk: oraclejdk8
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![License](https://img.shields.io/badge/license-Apache%202-brightgreen.svg)](LICENSE) [![Master Build Status](https://travis-ci.org/builtamont-oss/cassandra-migration.svg?branch=master)](https://travis-ci.org/builtamont-oss/cassandra-migration)

# Cassandra Migration

`cassandra-migration` is a simple and lightweight Apache Cassandra database schema migration tool.
Expand All @@ -10,10 +12,10 @@ It is designed to work similar to Flyway, supporting plain CQL and Java-based mi

Ensure the following prerequisites are met:

* Java SDK 1.7+ (tested with Azul Zulu JDK 1.7.0_111 and 1.8.0_102)
* Apache Cassandra 3.0.x (tested with DataStax Enterprise Community 3.0.x)
* Pre-existing Keyspace
* **Java SDK 1.7+:**<br />The library is developed using Azul Zulu 1.8, and release-tested (Travis CI) with OpenJDK 1.7, Oracle JDK 1.7, and Oracle JDK 1.8
* **Apache Cassandra 3.0.x:**<br />The library is currently tested using embedded Cassandra, testing with standalone Cassandra (DataStax Community Edition) is in the roadmap
* **Pre-existing Keyspace:**<br />Cassandra's Keyspace should be managed outside the migration tool by sysadmins (e.g. tune replication factor, etc)

Import this library as a dependency (Maven example):
``` xml
<dependency>
Expand All @@ -23,8 +25,6 @@ Import this library as a dependency (Maven example):
</dependency>
```

*NOTE: Cassandra's Keyspace should be managed outside the migration tool by sysadmins (e.g. tune replication factor, etc)*

### Migration version table

``` shell
Expand Down Expand Up @@ -187,6 +187,18 @@ Please read [CONTRIBUTING] for more details.

https://github.com/builtamont/cassandra-migration/releases

## Version 0.9 Release Pending Actions

* Replace `config.Cluster.java` and `config.Keyspace.java` to the one provided by DataStax Cassandra driver
* Add additional features from upstream open PRs
* Add standalone Cassandra (DataStax Community Edition) integration test

## Non-Critical Pending Actions

* Refactor build system to use Gradle
* Refactor constructor and method signatures to avoid passing `null`s (via Kotlin `lateinit`, and / or use of `Option` values)
* Refactor methods body to idiomatic Kotlin

[Axel Fontaine / BoxFuse Flyway]: https://github.com/flyway/flyway
[Contrast Security's Cassandra Migration]: https://github.com/Contrast-Security-OSS/cassandra-migration
[Contrast Security Cassandra Migration project license page]: https://github.com/Contrast-Security-OSS/cassandra-migration/blob/master/LICENSE
Expand Down
22 changes: 13 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://www.w3.org/2001/XMLSchema-instance ">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd http://www.w3.org/2001/XMLSchema-instance ">

<modelVersion>4.0.0</modelVersion>
<groupId>com.builtamont</groupId>
<artifactId>cassandra-migration</artifactId>
Expand All @@ -7,7 +10,7 @@
<description>
Database migration tool for Cassandra
</description>
<url>https://github.com/builtamont/cassandra-migration</url>
<url>https://github.com/builtamont-oss/cassandra-migration</url>

<licenses>
<license>
Expand All @@ -19,7 +22,7 @@
<packaging>jar</packaging>

<organization>
<name>Builtamont Tech</name>
<name>Builtamont Tech International</name>
<url>builtamonttech.com</url>
</organization>

Expand All @@ -35,16 +38,16 @@
</distributionManagement>

<scm>
<url>https://github.com/builtamont/cassandra-migration</url>
<connection>scm:git:https://github.com/builtamont/cassandra-migration.git</connection>
<developerConnection>scm:git:https://github.com/builtamont/cassandra-migration.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/builtamont-oss/cassandra-migration</url>
<connection>scm:git:https://github.com/builtamont-oss/cassandra-migration.git</connection>
<developerConnection>scm:git:https://github.com/builtamont-oss/cassandra-migration.git</developerConnection>
</scm>

<developers>
<developer>
<id>hhandoko</id>
<name>Herdy Handoko</name>
<url>http://github.com/hhandoko</url>
</developer>
</developers>

Expand All @@ -56,6 +59,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<kotlin.version>1.0.3</kotlin.version>
<slf4j.version>1.7.13</slf4j.version>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
Expand All @@ -69,13 +73,13 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.13</version>
<version>${slf4j.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.13</version>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
16 changes: 3 additions & 13 deletions maven-central-deploy.sh → scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

###
# File : maven-central-deploy.sh
# File : deploy.sh
# License :
# Original - Copyright (c) 2015 - 2016 Contrast Security
# Derivative - Copyright (c) 2016 Citadel Technology Solutions Pte Ltd
# Copyright (c) 2016 Citadel Technology Solutions Pte Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,13 +18,4 @@
# limitations under the License.
###

# Deploy maven artifact in current directory into Maven central repository
# using maven-release-plugin goals

read -p "Really deploy to maven cetral repository (yes/no)? "

if ( [ "$REPLY" == "yes" ] ) then
mvn -P release release:clean release:prepare release:perform -B -e | tee maven-central-deploy.log
else
echo 'Exit without deploy'
fi
mvn deploy --settings settings.xml -DskipTests=true -B
13 changes: 13 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">

<servers>
<server>
<!-- Maven Central Deployment -->
<id>ossrh</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
</servers>
</settings>