diff --git a/build.gradle b/build.gradle index dba2ea8..8333aec 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ plugins { group 'org.opensearch.driver' // keep version in sync with version in Driver source -version '2.0.0.0' +version '1.2.0.0' boolean snapshot = "true".equals(System.getProperty("build.snapshot", "false")); if (snapshot) { @@ -47,16 +47,16 @@ repositories { dependencies { implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.3" - implementation group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.11.452' + implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "2.13.4.2" + implementation group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.12.1' testImplementation('org.junit.jupiter:junit-jupiter-api:5.3.1') testImplementation('org.junit.jupiter:junit-jupiter-params:5.3.1') - testImplementation('com.github.tomakehurst:wiremock:2.27.2') + testImplementation('com.github.tomakehurst:wiremock-jre8-standalone:2.34.0') testImplementation('org.mockito:mockito-core:2.23.0') testImplementation('org.junit.jupiter:junit-jupiter-engine:5.3.1') testImplementation('org.junit-pioneer:junit-pioneer:0.3.0') - testImplementation('org.eclipse.jetty:jetty-server:9.2.24.v20180105') + testImplementation('org.eclipse.jetty:jetty-server:9.4.48.v20220622') // Enforce wiremock to use latest guava and json-smart testImplementation('com.google.guava:guava:31.1-jre') diff --git a/jenkins/jdbc-stage-maven-release.jenkinsfile b/jenkins/jdbc-stage-maven-release.jenkinsfile index 2b0d6c0..dd9ac3d 100644 --- a/jenkins/jdbc-stage-maven-release.jenkinsfile +++ b/jenkins/jdbc-stage-maven-release.jenkinsfile @@ -1,92 +1,16 @@ -lib = library(identifier: 'jenkins@main', retriever: modernSCM([ +lib = library(identifier: 'jenkins@1.5.3', retriever: modernSCM([ $class: 'GitSCMSource', - remote: 'https://github.com/opensearch-project/opensearch-build.git', + remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', ])) -pipeline { - agent { - docker { - label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' - image 'opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2' - args '-e JAVA_HOME=/opt/java/openjdk-11' - alwaysPull true - } - } - options { - timeout(time: 30, unit: 'MINUTES') - throttleJobProperty( - categories: [], - limitOneJobWithMatchingParams: false, - maxConcurrentPerNode: 0, - maxConcurrentTotal: 1, - paramsToUseForLimit: '', - throttleEnabled: true, - throttleOption: 'project', +standardReleasePipelineWithGenericTrigger( + tokenIdCredential: 'jenkins-sql-jdbc-opensearch-generic-webhook-token', + causeString: 'A tag was cut on opensearch-project/sql-jdbc repository causing this workflow to run', + downloadReleaseAsset: true, + publishRelease: false) { + publishToMaven( + signingArtifactsPath: "$WORKSPACE/repository/", + mavenArtifactsPath: "$WORKSPACE/repository/", + autoPublish: true ) - } - triggers { - GenericTrigger( - genericVariables: [ - [key: 'ref', value: '$.ref'], - [key: 'VERSION', value: '$.ref', regexpFilter: 'refs/tags/v' ], - ], - tokenCredentialId: 'jenkins-sql-jdbc-generic-webhook-token', - causeString: 'A tag was cut on opensearch-project/sql repository causing this workflow to run', - printContributedVariables: false, - printPostContent: false, - regexpFilterText: '$ref', - regexpFilterExpression: '^sql-jdbc-release-[0-9\.]*$' - ) - } - environment { - ARTIFACT_PATH = "$WORKSPACE/build/repository/org/opensearch/driver/opensearch-sql-jdbc/$VERSION" - } - stages { - stage('Publish to Maven Local') { - steps { - // checkout the commit - checkout([ - $class: 'GitSCM', userRemoteConfigs: [[url: 'https://github.com/opensearch-project/sql.git']], - branches: [[name: "$ref"]] - ]) - - dir('sql-jdbc') { - // publish maven artifacts - sh('./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository') - } - } - } - stage('Sign') { - steps { - script { - signArtifacts( - artifactPath: "${ARTIFACT_PATH}", - type: 'maven', - platform: 'linux' - ) - } - } - } - stage('Stage Maven Artifacts') { - environment { - REPO_URL = 'https://aws.oss.sonatype.org/' - STAGING_PROFILE_ID = "${SONATYPE_STAGING_PROFILE_ID}" - BUILD_ID = "${BUILD_NUMBER}" - } - steps { - // checkout the build repo - git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main' - - // stage artifacts for release with Sonatype - withCredentials([usernamePassword(credentialsId: 'jenkins-sonatype-creds', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) { - sh('$WORKSPACE/publish/stage-maven-release.sh $WORKSPACE/build/repository/') - } - } - } - } - post { - always { - cleanWs disableDeferredWipeout: true, deleteDirs: true - } - } -} + } \ No newline at end of file diff --git a/src/main/java/org/opensearch/jdbc/internal/Version.java b/src/main/java/org/opensearch/jdbc/internal/Version.java index 977e743..4beaaad 100644 --- a/src/main/java/org/opensearch/jdbc/internal/Version.java +++ b/src/main/java/org/opensearch/jdbc/internal/Version.java @@ -9,7 +9,7 @@ public enum Version { // keep this in sync with the gradle version - Current(1, 0, 0, 0); + Current(1, 2, 0, 0); private int major; private int minor; diff --git a/src/test/java/org/opensearch/jdbc/test/TLSServer.java b/src/test/java/org/opensearch/jdbc/test/TLSServer.java index cb57fdb..1bd7cb8 100644 --- a/src/test/java/org/opensearch/jdbc/test/TLSServer.java +++ b/src/test/java/org/opensearch/jdbc/test/TLSServer.java @@ -70,7 +70,7 @@ public static Server startSecureServer( ServerConnector httpsConnector = null; // setup ssl - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setKeyStorePath(keyStorePath); sslContextFactory.setKeyStorePassword(keyStorePassword); sslContextFactory.setKeyStoreType(keyStoreType); @@ -132,8 +132,6 @@ private static ServerConnector createServerConnector( connectionFactories ); connector.setPort(port); - connector.setStopTimeout(0); - connector.getSelectorManager().setStopTimeout(0); connector.setHost(bindAddress); return connector;