Skip to content

Commit

Permalink
deployment preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Jan 5, 2024
1 parent 3faeec6 commit a8f1260
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 118 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ updates:
schedule:
interval: "weekly"
reviewers:
- "aravindanr"
- "jxu-nflx"
- "apanicker-nflx"
- "v1r3n"
- "boney9"
- "c4lm"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pull Request type
- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes (Please run `./gradlew generateLock saveLock` to refresh dependencies)
- [ ] Build related changes
- [ ] WHOSUSING.md
- [ ] Other (please describe):

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/generate_gh_pages.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
workflow_dispatch

jobs:
build:
Expand Down
56 changes: 26 additions & 30 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
name: Publish OSS Conductor


name: Publish Conductor OSS toMaven Central
on:
release:
types:
- released
- prereleased

permissions:
contents: read

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
publish:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
name: Gradle Build and Publish
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Checkout Conductor version tag and publish an initial release
- name: Build and Deploy Conductor Main
- name: Set up Zulu JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish release
run: |
export TAG=$(git tag)
export CONDUCTOR_VERSION=`echo $TAG | cut -f2 -d"v"`
echo "CONDUCTOR_VERSION is $CONDUCTOR_VERSION"
echo "Tag to checkout and publish $TAG"
git clone -b $TAG https://github.com/conductor-oss/conductor.git
cd conductor
git checkout tags/$TAG
git describe --tags --abbrev=0
ls -ltr
echo "Updating build.gradle - and printing its content"
cat ../deploy.gradle
cp ../deploy.gradle .
echo "apply from: "\"\$rootDir/deploy.gradle\""" >> build.gradle
cat build.gradle
cat deploy.gradle
./gradlew publish -PmavenCentral -Pusername=${{ secrets.SONATYPE_USERNAME }} -Ppassword=${{ secrets.SONATYPE_PASSWORD }}
echo "All done"
export VERSION="${{github.ref_name}}"
export PUBLISH_VERSION=`echo ${VERSION:1}`
echo Publishing version $PUBLISH_VERSION
./gradlew publish -Pversion=$PUBLISH_VERSION -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 }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
28 changes: 0 additions & 28 deletions .github/workflows/stale.yml

This file was deleted.

4 changes: 2 additions & 2 deletions annotations-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ sourceSets {
dependencies {
implementation project(':conductor-annotations')
api 'com.google.guava:guava:31.1-jre'
api 'com.squareup:javapoet:1.13.+'
api 'com.github.jknack:handlebars:4.3.+'
api 'com.squareup:javapoet:1.13.0'
api 'com.github.jknack:handlebars:4.3.1'
api 'com.google.protobuf:protobuf-java:3.21.12'
api 'jakarta.annotation:jakarta.annotation-api:2.1.1'
api gradleApi()
Expand Down
31 changes: 6 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,12 @@ plugins {
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
id 'application'
id 'jacoco'
id 'nebula.netflixoss' version '10.6.0'
id 'maven-publish'
id 'signing'
id 'java-library'
id "com.diffplug.spotless" version "5.0.0"
}

/*
* Copyright 2023 Conductor authors
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*/

// Establish version and status
ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name

Expand All @@ -43,17 +32,17 @@ subprojects {

apply from: "$rootDir/dependencies.gradle"
apply from: "$rootDir/springboot-bom-overrides.gradle"
apply from: "$rootDir/deploy.gradle"

allprojects {
apply plugin: 'nebula.netflixoss'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java-library'
apply plugin: 'project-report'

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

group = 'com.netflix.conductor'
group = 'org.conductoross'

configurations.all {
exclude group: 'ch.qos.logback', module: 'logback-classic'
Expand Down Expand Up @@ -111,14 +100,6 @@ allprojects {
}
}

jacocoTestReport {
reports {
html.required = true
xml.required = true
csv.required = false
}
}

task server {
dependsOn ':conductor-server:bootRun'
}
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ext {
revGrpc = '1.57.2'
revGuava = '30.0-jre'
revHamcrestAllMatchers = '1.8'
revHealth = '1.1.+'
revHealth = '1.1.4'
revProtoBuf = '3.21.12'
revJakartaAnnotation = '2.1.1'
revJAXB = '4.0.1'
Expand Down
10 changes: 0 additions & 10 deletions dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@
"locked": "2.20.0"
}
},
"jacocoAgent": {
"org.jacoco:org.jacoco.agent": {
"locked": "0.8.8"
}
},
"jacocoAnt": {
"org.jacoco:org.jacoco.ant": {
"locked": "0.8.8"
}
},
"runtimeClasspath": {
"org.apache.logging.log4j:log4j-api": {
"locked": "2.20.0"
Expand Down
33 changes: 19 additions & 14 deletions deploy.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@

allprojects {
subprojects {

apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'signing'

group = 'org.conductoross'
def conductorVersion = System.getenv('CONDUCTOR_VERSION')
if (conductorVersion) {
println "Inferred version from env variable 'CONDUCTOR_VERSION': $conductorVersion"
version = conductorVersion
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Conductor OSS'
description = 'Conductor OSS build.'
Expand Down Expand Up @@ -44,8 +47,7 @@ allprojects {

repositories {
maven {
println "Publishing to Sonatype Repository"
url = "https://s01.oss.sonatype.org/${project.version.endsWith('-SNAPSHOT') ? "content/repositories/snapshots/" : "service/local/staging/deploy/maven2/"}"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username project.properties.username
password project.properties.password
Expand All @@ -56,14 +58,17 @@ allprojects {

signing {
def signingKeyId = findProperty('signingKeyId')
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
System.out.println("signingKeyId: " + signingKeyId)
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
if (signingKeyId) {
println 'Signing artifacts with keys'
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

sign publishing.publications
}

sign publishing.publications
}

}
2 changes: 1 addition & 1 deletion es6-persistence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ dependencies {

switch (org.gradle.internal.os.OperatingSystem.current()) {
case org.gradle.internal.os.OperatingSystem.MAC_OS:
//tasks.forEach(task -> task.onlyIf { project.hasProperty('ES6Test') })
tasks.forEach(task -> task.onlyIf { project.hasProperty('ES6Test') })
break;
}

0 comments on commit a8f1260

Please sign in to comment.