Skip to content

Commit

Permalink
comment out modules older than 3.x, update circleci config
Browse files Browse the repository at this point in the history
  • Loading branch information
smiklosovic committed Sep 9, 2024
1 parent 13751c3 commit 2d4e74a
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 225 deletions.
243 changes: 25 additions & 218 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ version: 2.1
jobs:
build:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2204:2024.05.1

working_directory: ~/cassandra-ldap

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

steps:

Expand All @@ -23,91 +23,19 @@ jobs:
- ~/.m2
key: m2-{{ checksum "pom.xml" }}

- run: sudo apt install openjdk-8-jdk
- run: mvn --version && whereis java && mvn clean install -Dversion.cassandra22=2.2.19 -Dversion.cassandra30=3.0.28 -Dversion.cassandra311=3.11.14 -Dversion.cassandra4=4.0.7 -Dversion.cassandra41=4.1.0
- run: sudo apt-get update && sudo apt install openjdk-11-jdk
- run: mvn --version && whereis java && mvn clean install -Dversion.cassandra4=4.0.7 -Dversion.cassandra41=4.1.0 -Dversion.cassandra50=5.0.0

- persist_to_workspace:
root: ~/cassandra-ldap
paths:
- "cassandra-2.2/target/cassandra-ldap-2.2**.jar"
- "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"
- "cassandra-5.0/target/cassandra-ldap-5.0*.jar"

build-2-2:
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 -DskipTests

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

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

build-3-0:
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-3.0*.jar"
- "cassandra-ldap-3.0*.deb"
- "cassandra-ldap-3.0*.rpm"

build-3-11:
build-4-0:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2204:2024.05.1

working_directory: ~/cassandra-ldap

Expand All @@ -124,8 +52,7 @@ jobs:
- m2-{{ checksum "pom.xml" }}
- m2-

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

- save_cache:
Expand All @@ -136,13 +63,13 @@ jobs:
- persist_to_workspace:
root: /tmp/artifacts
paths:
- "cassandra-ldap-3.11*.jar"
- "cassandra-ldap-3.11*.deb"
- "cassandra-ldap-3.11*.rpm"
- "cassandra-ldap-4.0*.jar"
- "cassandra-ldap-4.0*.deb"
- "cassandra-ldap-4.0*.rpm"

build-4-0:
build-4-1:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2204:2024.05.1

working_directory: ~/cassandra-ldap

Expand All @@ -159,8 +86,7 @@ jobs:
- m2-{{ checksum "pom.xml" }}
- m2-

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

- save_cache:
Expand All @@ -171,13 +97,13 @@ jobs:
- persist_to_workspace:
root: /tmp/artifacts
paths:
- "cassandra-ldap-4.0*.jar"
- "cassandra-ldap-4.0*.deb"
- "cassandra-ldap-4.0*.rpm"
- "cassandra-ldap-4.1*.jar"
- "cassandra-ldap-4.1*.deb"
- "cassandra-ldap-4.1*.rpm"

build-4-1:
build-5-0:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2204:2024.05.1

working_directory: ~/cassandra-ldap

Expand All @@ -194,8 +120,7 @@ jobs:
- m2-{{ checksum "pom.xml" }}
- m2-

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

- save_cache:
Expand All @@ -206,75 +131,9 @@ jobs:
- 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
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish 2.2 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/
publish-github-release-3-0:
docker:
- image: cimg/go:1.17
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish 3.0 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/
publish-github-release-3-11:
docker:
- image: cimg/go:1.17
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish 3.11 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/
publish-github-release-4-0:
docker:
- image: cimg/go:1.17
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish 4.0 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/
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/
- "cassandra-ldap-5.0*.jar"
- "cassandra-ldap-5.0*.deb"
- "cassandra-ldap-5.0*.rpm"

workflows:
version: 2
Expand All @@ -284,24 +143,6 @@ workflows:
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
- build-2-2:
filters:
branches:
ignore: /.*/
tags:
only: /^v2.2.\d+\-\d+\.\d+\.\d+$/
- build-3-0:
filters:
branches:
ignore: /.*/
tags:
only: /^v3.0.\d+\-\d+\.\d+\.\d+$/
- build-3-11:
filters:
branches:
ignore: /.*/
tags:
only: /^v3.11.\d+\-\d+\.\d+\.\d+$/
- build-4-0:
filters:
branches:
Expand All @@ -314,43 +155,9 @@ workflows:
ignore: /.*/
tags:
only: /^v4.1.\d+-\d+\.\d+\.\d+$/
- publish-github-release-2-2:
requires:
- build-2-2
filters:
branches:
ignore: /.*/
tags:
only: /^v2.2.\d+\-\d+\.\d+\.\d+$/
- publish-github-release-3-0:
requires:
- build-3-0
filters:
branches:
ignore: /.*/
tags:
only: /^v3.0.\d+\-\d+\.\d+\.\d+$/
- publish-github-release-3-11:
requires:
- build-3-11
filters:
branches:
ignore: /.*/
tags:
only: /^v3.11.\d+\-\d+\.\d+\.\d+$/
- publish-github-release-4-0:
requires:
- build-4-0
filters:
branches:
ignore: /.*/
tags:
only: /^v4.0.\d+-\d+\.\d+\.\d+$/
- publish-github-release-4-1:
requires:
- build-4-1
- build-5-0:
filters:
branches:
ignore: /.*/
tags:
only: /^v4.1.\d+-\d+\.\d+\.\d+$/
only: /^v5.0.\d+-\d+\.\d+\.\d+$/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ cassandra-3.0/dependency-reduced-pom.xml
cassandra-3.11/dependency-reduced-pom.xml
cassandra-4.0/dependency-reduced-pom.xml
cassandra-4.1/dependency-reduced-pom.xml
cassandra-5.0/dependency-reduced-pom.xml

# Compiled class file
*.class
Expand Down
6 changes: 6 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ and create users based on a configured LDAP server. This implementation provides
Role management must be performed through the usual Cassandra role management— CassandraAuthorizer.
See **How it works** for more details.

## Deprecation note

By releasing of Cassandra 5.0, the Cassandra team has stopped to actively develop / support Cassandra versions
3.0 and 3.11. We keep the source code of respective 3.0 and 3.11 modules in the repository, but they are
commented out from main `pom.xml` as they require Java 8 but Cassandra 5.0 requires Java 11 and the testing framework we use for running embedded Cassandra can not deal with Java 11 while testing Cassandra 3.x even we set source and target for Maven to 1.8. If you want to build 3.x modules, please be sure you run Java 8 and you build only the respective module you want.

## Project Structure and Building

This project consists of 5 modules; the `base` module is the module on which all other implementation modules
Expand Down
5 changes: 5 additions & 0 deletions base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
<name>Cassandra LDAP Authenticator common code</name>
<description>Common code for Apache Cassandra LDAP plugin</description>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.cassandra</groupId>
Expand Down
3 changes: 3 additions & 0 deletions cassandra-2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<version.testng>6.14.3</version.testng>
<version.awaitility>4.0.3</version.awaitility>
<version.testcontainers>1.15.3</version.testcontainers>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencyManagement>
Expand Down
3 changes: 3 additions & 0 deletions cassandra-3.0/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<version.testng>6.14.3</version.testng>
<version.awaitility>4.0.3</version.awaitility>
<version.testcontainers>1.15.3</version.testcontainers>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencyManagement>
Expand Down
3 changes: 3 additions & 0 deletions cassandra-3.11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<version.testng>6.14.3</version.testng>
<version.awaitility>4.0.3</version.awaitility>
<version.testcontainers>1.15.3</version.testcontainers>

<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencyManagement>
Expand Down
Loading

0 comments on commit 2d4e74a

Please sign in to comment.