Skip to content

Commit

Permalink
update to Cassandra 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
smiklosovic committed Dec 14, 2022
1 parent 2f20a2c commit 092a170
Show file tree
Hide file tree
Showing 20 changed files with 1,363 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- "cassandra-3.0/target/cassandra-ldap-3.0*.jar"
- "cassandra-3.11/target/cassandra-ldap-3.11*.jar"
- "cassandra-4.0/target/cassandra-ldap-4.0*.jar"
- "cassandra-4.1/target/cassandra-ldap-4.1*.jar"

build-2-2:
machine:
Expand Down Expand Up @@ -174,6 +175,41 @@ jobs:
- "cassandra-ldap-4.0*.deb"
- "cassandra-ldap-4.0*.rpm"

build-4-1:
machine:
image: ubuntu-2004:202201-02

working_directory: ~/cassandra-ldap

environment:
MAVEN_OPTS: -Xmx3200m
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64

steps:

- checkout

- restore_cache:
keys:
- m2-{{ checksum "pom.xml" }}
- m2-

# Java 8 for Cassandra as image contains Java 11
- run: sudo apt install openjdk-8-jdk
- run: mvn clean install -DoutputDirectory=/tmp/artifacts

- save_cache:
paths:
- ~/.m2
key: m2-{{ checksum "pom.xml" }}

- persist_to_workspace:
root: /tmp/artifacts
paths:
- "cassandra-ldap-4.1*.jar"
- "cassandra-ldap-4.1*.deb"
- "cassandra-ldap-4.1*.rpm"

publish-github-release-2-2:
docker:
- image: cimg/go:1.17
Expand Down Expand Up @@ -227,6 +263,19 @@ jobs:
go get github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/
publish-github-release-4-1:
docker:
- image: cimg/go:1.17
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish 4.1 Release on GitHub"
command: |
set -xue
go get github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./artifacts/
workflows:
version: 2
main:
Expand Down Expand Up @@ -259,6 +308,12 @@ workflows:
ignore: /.*/
tags:
only: /^v4.0.\d+-\d+\.\d+\.\d+$/
- build-4-1:
filters:
branches:
ignore: /.*/
tags:
only: /^v4.1.\d+-\d+\.\d+\.\d+$/
- publish-github-release-2-2:
requires:
- build-2-2
Expand Down Expand Up @@ -291,3 +346,11 @@ workflows:
ignore: /.*/
tags:
only: /^v4.0.\d+-\d+\.\d+\.\d+$/
- publish-github-release-4-1:
requires:
- build-4-1
filters:
branches:
ignore: /.*/
tags:
only: /^v4.1.\d+-\d+\.\d+\.\d+$/
181 changes: 181 additions & 0 deletions cassandra-4.1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
<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/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.instaclustr</groupId>
<artifactId>cassandra-ldap-parent</artifactId>
<version>1.1.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>cassandra-ldap-4.1.0</artifactId>
<version>1.0.0</version>

<name>Cassandra LDAP Authenticator for Cassandra 4.1</name>
<description>Pluggable LDAP authentication implementation for Apache Cassandra 4.1</description>

<properties>
<version.cassandra4>4.1.0</version.cassandra4>

<version.shrinkwrap.bom>1.2.6</version.shrinkwrap.bom>
<version.shrinkwrap.resolvers>3.1.3</version.shrinkwrap.resolvers>

<version.embedded.cassandra>4.0.1</version.embedded.cassandra>
<version.cassandra.driver>3.11.0</version.cassandra.driver>
<version.testng>6.14.3</version.testng>
<version.awaitility>4.0.3</version.awaitility>
<version.testcontainers>1.15.3</version.testcontainers>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-bom</artifactId>
<version>${version.shrinkwrap.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>${version.cassandra4}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.instaclustr</groupId>
<artifactId>cassandra-ldap-base</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- test -->

<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-depchain</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<version>${version.shrinkwrap.resolvers}</version>
<scope>test</scope>
<type>pom</type>
</dependency>

<dependency>
<groupId>com.github.nosan</groupId>
<artifactId>embedded-cassandra</artifactId>
<version>${version.embedded.cassandra}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>${version.cassandra.driver}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${version.testng}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${version.awaitility}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${version.testcontainers}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.shade.plugin.version}</version>
<configuration>
<finalName>cassandra-ldap-${version.cassandra4}-${project.version}</finalName>
</configuration>
</plugin>
<plugin>
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
<version>${version.jdeb}</version>
</plugin>
<plugin>
<groupId>de.dentrassi.maven</groupId>
<artifactId>rpm</artifactId>
<version>${version.rpm}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>rpm</goal>
</goals>
<configuration>
<requires>
<require>
<name>cassandra</name>
<version>4.0</version>
<greaterOrEqual/>
</require>
</requires>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

7 changes: 7 additions & 0 deletions cassandra-4.1/src/deb/control/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Package: [[name]]
Version: [[version]]
Section: misc
Priority: optional
Architecture: all
Depends: cassandra (>= 4.1)
Maintainer: [[maintainer]]
Loading

0 comments on commit 092a170

Please sign in to comment.