Skip to content

Commit

Permalink
OSS Prep
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Sep 10, 2022
1 parent 6697f42 commit 65472b5
Show file tree
Hide file tree
Showing 40 changed files with 4,197 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/build_on_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Main branch PR Build
on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
name: Gradle Build
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Zulu JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Build
run: ./gradlew clean build
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on: [ push, pull_request ]

jobs:
build:
runs-on: ubuntu-latest
name: Gradle Build
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Zulu JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Build
run: ./gradlew clean build
49 changes: 49 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish release to Maven Central
on:
release:
types:
- released
- prereleased

jobs:
publish:
runs-on: ubuntu-latest
environment: prod
name: Gradle Build and Publish
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Zulu JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Publish
run: |
export VERSION=${{github.ref_name}}
export REL_VER=`echo ${VERSION:1}`
echo "Release version is $REL_VER"
echo "RELEASE_VERSION=$REL_VER" >> $GITHUB_ENV
./gradlew publish -Pversion=$REL_VER -PmavenCentral -Pusername=${{ secrets.SONATYPE_USERNAME }} -Ppassword=${{ secrets.SONATYPE_PASSWORD }}
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}













259 changes: 259 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

80 changes: 79 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,79 @@
# orkes-queues
# Orkes Queues
Orkes Queues is a high performance queuing recipe based on the Redis as the underlying store.

[![CI](https://github.com/orkes-io/orkes-queues/actions/workflows/ci.yaml/badge.svg)](https://github.com/orkes-io/orkes-queues/actions/workflows/ci.yml)
[![CI](https://img.shields.io/badge/license-orkes%20community%20license-green)](https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt)

<pre>
______ .______ __ ___ _______ _______.
/ __ \ | _ \ | |/ / | ____| / |
| | | | | |_) | | ' / | |__ | (----`
| | | | | / | < | __| \ \
| `--' | | |\ \----.| . \ | |____.----) |
\______/ | _| `._____||__|\__\ |_______|_______/

______ __ __ _______ __ __ _______ _______.
/ __ \ | | | | | ____|| | | | | ____| / |
| | | | | | | | | |__ | | | | | |__ | (----`
| | | | | | | | | __| | | | | | __| \ \
| `--' '--.| `--' | | |____ | `--' | | |____.----) |
\_____\_____\\______/ |_______| \______/ |_______|_______/
</pre>

## Getting Started
Orkes Queues is a library that can be used to create a message broker. Currently, the library is used as the underlying
queuing infrastructure for Orkes Conductor

### Requirements
1. Redis version 6.2+
2. The library supports Redis Standalone, Sentinel and Cluster modes

### Delivery semantics
Orkes Queues provides `at-least once` delivery semantics.

### Using Library

#### Gradle

```groovy
// https://mvnrepository.com/artifact/io.orkes.queues/orkes-conductor-queues
implementation 'io.orkes.queues:orkes-conductor-queues:VERSION'
```

#### Maven
```xml
<!-- https://mvnrepository.com/artifact/io.orkes.queues/orkes-conductor-queues -->
<dependency>
<groupId>io.orkes.queues</groupId>
<artifactId>orkes-conductor-queues</artifactId>
<version>VERSION</version>
</dependency>
```

### Using with Conductor
1. Update Netflix/Conductor's server module and add the following dependency:

```groovy
// https://mvnrepository.com/artifact/io.orkes.queues/orkes-conductor-queues
implementation 'io.orkes.queues:orkes-conductor-queues:VERSION'
```

2. Set the configuration to use queues in your `conductor.properties` file:
```properties
conductor.queue.type=redis_standalone
```

### Contributions
We welcome community contributions and PRs to this repository.

### Get Support
Use GitHub issue tracking for filing issues and Discussion Forum for any other questions, ideas or support requests.
Orkes (http://orkes.io) development team creates and maintains the Orkes-Conductor releases.

### License
Copyright 2022 Orkes, Inc
Licensed under Orkes Community License. You may obtain a copy of the License at:
```
https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt
```
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
4 changes: 4 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Security Policy

## Reporting a Vulnerability
Please open an issue to report vulnerability related to source code in this repository.
179 changes: 179 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
buildscript {
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.5.7"
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.+'
}
}

plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}

ext {
group = 'io.orkes.queue'
appVersion = '0.0.2-SNAPSHOT'
springBootVersion = '2.5.6'

versions = [
revConductor : '3.10.7',
revTestContainer : '1.17.2',
revGuava : '30.0-jre',
revLog4j : '2.17.1',
revJedis : '3.3.0',
revMockServerClient : '5.12.0',
revCommonsLang : '3.12.0',
revLombok : '1.18.24',
revLucene : '7.7.3',
revSpectator : '0.122.0',
revOpenapi : '1.6.+',
revAwsSdk : '1.12.153',
revProtoBuf : '3.13.0',
revRarefiedRedis : '0.0.17'
]
}

def relVersion = System.getenv('REL_VER')
if (relVersion) {
println "Inferred version from env variable 'REL_VER': $relVersion"
appVersion = relVersion
}

subprojects {

group = 'io.orkes.queues'
version = "${appVersion}"

apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'com.diffplug.spotless'

repositories {
mavenCentral()
}

java {
withSourcesJar()
withJavadocJar()
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
testCompileOnly {
extendsFrom annotationProcessor
}
all {
exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
}

dependencies {
implementation "org.apache.logging.log4j:log4j-core:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-api:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-jul:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-web:${versions.revLog4j}!!"
implementation "org.apache.logging.log4j:log4j-to-slf4j:${versions.revLog4j}!!"

compileOnly "org.projectlombok:lombok:${versions.revLombok}"
annotationProcessor "org.projectlombok:lombok:${versions.revLombok}"
testAnnotationProcessor "org.projectlombok:lombok:${versions.revLombok}"
implementation "org.apache.commons:commons-lang3:${versions.revCommonsLang}"
}

dependencyManagement {
imports {
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
}
}

test {
useJUnitPlatform()
testLogging {
events = ["SKIPPED", "FAILED"]
exceptionFormat = "full"
showStandardStreams = false
}
}


compileJava {
sourceCompatibility = 11
targetCompatibility = 11
}

spotless {
java {
googleJavaFormat().aosp()
removeUnusedImports()
importOrder('java', 'javax', 'org', 'com.netflix', 'io.orkes','', '\\#com.netflix', '\\#')
licenseHeaderFile("$rootDir/licenseheader.txt")
}
}
build.dependsOn(spotlessApply)


publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Orkes Queues'
description = 'High Performance Distributed Queues'
url = 'https://github.com/orkes-io/orkes-queues'
scm {
connection = 'scm:git://github.com/orkes-io/orkes-queues.git'
developerConnection = 'scm:git://github.com/orkes-io/orkes-queues.git'
url = 'https://github.com/orkes-io/orkes-queues'
}
licenses {
license {
name = 'Orkes Community License'
url = 'https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt'
}
}
developers {
developer {
organization = 'Orkes'
organizationUrl = 'https://orkes.io'
name = 'Orkes Development Team'
email = '[email protected]'
}
}
}
}
}

repositories {
maven {
if (project.hasProperty("mavenCentral")) {
println "Publishing to Sonatype Repository"
url = "https://s01.oss.sonatype.org/${project.version.endsWith('-SNAPSHOT') ? "content/repositories/snapshots/" : "service/local/staging/deploy/maven2/"}"
credentials {
username project.properties.username
password project.properties.password
}
}
}
}

def signingKeyId = findProperty('signingKeyId')
if(signingKeyId) {
println 'Signing the artifact with keys'
signing {
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

sign publishing.publications
}
}

}
}
Binary file added dump.rdb
Binary file not shown.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.parallel=true
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 65472b5

Please sign in to comment.