Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JDBC driver jenkins CI workflow #140

Merged
merged 4 commits into from
Oct 24, 2022

Conversation

Yury-Fridlyand
Copy link

@Yury-Fridlyand Yury-Fridlyand commented Oct 22, 2022

Description

Jenkins file

Combined from this and this.
It calls publishing gradle workflow to generate artifacts.

Gradle workflow

New workflow (should be called from sql-jdbc dir)

./gradlew publishPublishMavenPublicationToLocalRepoRepository
Files generated by gradle
$ tree build | grep -vF .class
build
├── classes
│   └── java
│       └── main
│           └── org
│               └── opensearch
│                   └── jdbc
│                       ├── auth
│                       ├── config
│                       ├── internal
│                       │   ├── exceptions
│                       │   ├── results
│                       │   └── util
│                       ├── logging
│                       ├── protocol
│                       │   ├── exceptions
│                       │   └── http
│                       ├── transport
│                       │   └── http
│                       │       └── auth
│                       │           └── aws
│                       └── types
├── libs
│   └── opensearch-sql-jdbc-2.0.0.0.jar
├── publications
│   └── publishMaven
│       └── pom-default.xml
├── repository
│   └── org
│       └── opensearch
│           └── client
│               └── opensearch-sql-jdbc
│                   ├── 2.0.0.0
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.jar
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.jar.md5
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.jar.sha1
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.pom
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.pom.md5
│                   │   └── opensearch-sql-jdbc-2.0.0.0.pom.sha1
│                   ├── maven-metadata.xml
│                   ├── maven-metadata.xml.md5
│                   └── maven-metadata.xml.sha1
├── resources
│   └── main
│       └── META-INF
│           └── services
│               └── java.sql.Driver
└── tmp
    ├── compileJava
    ├── jar
    │   └── MANIFEST.MF
    └── publishPublishMavenPublicationToLocalRepoRepository
        └── org
            └── opensearch
                └── client
                    └── opensearch-sql-jdbc
                        ├── maven-metadata-remote.xml
                        └── resolver-status.properties

42 directories, 159 files

See artifacts in artifacts.zip. The jar file has no dependencies inside.

jar content
$ tree
.
├── META-INF
│   ├── MANIFEST.MF
│   └── services
│       └── java.sql.Driver
└── org
    └── opensearch
        └── jdbc
            ├── ConnectionImpl.class
            ├── DatabaseMetaDataImpl$ColumnMetadataStatement$ColumnMetadataResultSet.class
            ├── DatabaseMetaDataImpl$ColumnMetadataStatement.class
            ├── DatabaseMetaDataImpl$ResultSetColumnDescriptor.class
            ├── DatabaseMetaDataImpl.class
            ├── Driver.class
            ├── OpenSearchConnection.class
            ├── OpenSearchDataSource.class
            ├── OpenSearchVersion.class
            ├── PreparedStatementImpl.class
            ├── ResultSetImpl.class
            ├── ResultSetMetaDataImpl.class
            ├── StatementImpl.class
            ├── auth
            │   └── AuthenticationType.class
            ├── config
            │   ├── AuthConnectionProperty.class
            │   ├── AwsCredentialsProviderProperty.class
            │   ├── BoolConnectionProperty.class
            │   ├── ConnectionConfig$1.class
            │   ├── ConnectionConfig$Builder.class
            │   ├── ConnectionConfig.class
            │   ├── ConnectionProperty.class
            │   ├── ConnectionPropertyException.class
            │   ├── FetchSizeProperty.class
            │   ├── HostConnectionProperty.class
            │   ├── HostnameVerificationConnectionProperty.class
            │   ├── IntConnectionProperty.class
            │   ├── KeyStoreLocationConnectionProperty.class
            │   ├── KeyStorePasswordConnectionProperty.class
            │   ├── KeyStoreTypeConnectionProperty.class
            │   ├── LogLevelConnectionProperty.class
            │   ├── LogOutputConnectionProperty.class
            │   ├── LoginTimeoutConnectionProperty.class
            │   ├── PasswordConnectionProperty.class
            │   ├── PathConnectionProperty.class
            │   ├── PortConnectionProperty.class
            │   ├── RegionConnectionProperty.class
            │   ├── RequestCompressionConnectionProperty.class
            │   ├── StringConnectionProperty.class
            │   ├── TrustSelfSignedConnectionProperty.class
            │   ├── TrustStoreLocationConnectionProperty.class
            │   ├── TrustStorePasswordConnectionProperty.class
            │   ├── TrustStoreTypeConnectionProperty.class
            │   ├── UseSSLConnectionProperty.class
            │   └── UserConnectionProperty.class
            ├── internal
            │   ├── JdbcWrapper.class
            │   ├── Version.class
            │   ├── exceptions
            │   │   └── ObjectClosedException.class
            │   ├── results
            │   │   ├── ColumnMetaData.class
            │   │   ├── Cursor.class
            │   │   ├── Row.class
            │   │   └── Schema.class
            │   └── util
            │       ├── AwsHostNameUtil.class
            │       ├── JavaUtil.class
            │       ├── SqlParser.class
            │       └── UrlParser.class
            ├── logging
            │   ├── FilePrintWriterLogger.class
            │   ├── Layout.class
            │   ├── LogLevel.class
            │   ├── Logger.class
            │   ├── LoggerFactory.class
            │   ├── LoggingSource$1.class
            │   ├── LoggingSource.class
            │   ├── NoOpLogger.class
            │   ├── PrintWriterLogger.class
            │   └── StandardLayout.class
            ├── protocol
            │   ├── ClusterMetadata.class
            │   ├── ColumnDescriptor.class
            │   ├── ConnectionResponse.class
            │   ├── JdbcDateTimeFormatter.class
            │   ├── JdbcQueryParam.class
            │   ├── JdbcQueryRequest.class
            │   ├── Parameter.class
            │   ├── Protocol.class
            │   ├── ProtocolFactory.class
            │   ├── QueryRequest.class
            │   ├── QueryResponse.class
            │   ├── RequestError.class
            │   ├── exceptions
            │   │   ├── InternalServerErrorException.class
            │   │   ├── MalformedResponseException.class
            │   │   └── ResponseException.class
            │   └── http
            │       ├── HttpException.class
            │       ├── HttpResponseHandler.class
            │       ├── JdbcCursorQueryRequest.class
            │       ├── JsonClusterMetadata.class
            │       ├── JsonConnectionResponse.class
            │       ├── JsonCursorHttpProtocol.class
            │       ├── JsonCursorHttpProtocolFactory.class
            │       ├── JsonCursorQueryRequest.class
            │       ├── JsonHttpProtocol.class
            │       ├── JsonHttpProtocolFactory.class
            │       ├── JsonHttpResponseHandler$JsonContentParser.class
            │       ├── JsonHttpResponseHandler.class
            │       ├── JsonOpenSearchVersion.class
            │       ├── JsonQueryRequest.class
            │       ├── JsonQueryResponse$JsonRequestError.class
            │       ├── JsonQueryResponse$SchemaEntry.class
            │       └── JsonQueryResponse.class
            ├── transport
            │   ├── Transport.class
            │   ├── TransportException.class
            │   ├── TransportFactory.class
            │   └── http
            │       ├── ApacheHttpClientConnectionFactory.class
            │       ├── ApacheHttpTransport.class
            │       ├── ApacheHttpTransportFactory.class
            │       ├── HttpParam.class
            │       ├── HttpTransport.class
            │       ├── JclLoggerAdapter.class
            │       ├── LoggingInputStream.class
            │       ├── LoggingManagedHttpClientConnection.class
            │       ├── LoggingOutputStream.class
            │       └── auth
            │           └── aws
            │               └── AWSRequestSigningApacheInterceptor.class
            └── types
                ├── BaseTypeConverter.class
                ├── BinaryType.class
                ├── BooleanType.class
                ├── ByteType.class
                ├── DateType.class
                ├── DoubleType.class
                ├── FloatType.class
                ├── IntegerType.class
                ├── LongType.class
                ├── NumberType.class
                ├── OpenSearchType.class
                ├── ShortType.class
                ├── StringType.class
                ├── TimeType.class
                ├── TimestampType.class
                ├── TypeConverter.class
                ├── TypeConverters$1.class
                ├── TypeConverters$BigIntTypeConverter.class
                ├── TypeConverters$BinaryTypeConverter.class
                ├── TypeConverters$BooleanTypeConverter.class
                ├── TypeConverters$DateTypeConverter.class
                ├── TypeConverters$DoubleTypeConverter.class
                ├── TypeConverters$FloatTypeConverter.class
                ├── TypeConverters$IntegerTypeConverter.class
                ├── TypeConverters$NullTypeConverter.class
                ├── TypeConverters$RealTypeConverter.class
                ├── TypeConverters$SmallIntTypeConverter.class
                ├── TypeConverters$TimeTypeConverter.class
                ├── TypeConverters$TimestampTypeConverter.class
                ├── TypeConverters$TinyIntTypeConverter.class
                ├── TypeConverters$VarcharTypeConverter.class
                ├── TypeConverters.class
                ├── TypeHelper.class
                └── UnrecognizedOpenSearchTypeException.class

20 directories, 146 files

Shadow copy publishing could be invoked by

./gradlew publishShadowPublicationToLocalRepoRepository
Artifacts
$ tree build | grep -vF .class
build
├── classes
│   └── java
│       └── main
│           └── org
│               └── opensearch
│                   └── jdbc
│                       ├── auth
│                       ├── config
│                       ├── internal
│                       │   ├── exceptions
│                       │   ├── results
│                       │   └── util
│                       ├── logging
│                       ├── protocol
│                       │   ├── exceptions
│                       │   └── http
│                       ├── transport
│                       │   └── http
│                       │       └── auth
│                       │           └── aws
│                       └── types
├── libs
│   ├── opensearch-sql-jdbc-2.0.0.0-javadoc.jar
│   ├── opensearch-sql-jdbc-2.0.0.0-sources.jar
│   └── opensearch-sql-jdbc-2.0.0.0.jar
├── publications
│   └── shadow
│       └── pom-default.xml
├── repository
│   └── org
│       └── opensearch
│           └── client
│               └── opensearch-sql-jdbc
│                   ├── 2.0.0.0
│                   │   ├── opensearch-sql-jdbc-2.0.0.0-javadoc.jar
│                   │   ├── opensearch-sql-jdbc-2.0.0.0-javadoc.jar.md5
│                   │   ├── opensearch-sql-jdbc-2.0.0.0-javadoc.jar.sha1
│                   │   ├── opensearch-sql-jdbc-2.0.0.0-sources.jar
│                   │   ├── opensearch-sql-jdbc-2.0.0.0-sources.jar.md5
│                   │   ├── opensearch-sql-jdbc-2.0.0.0-sources.jar.sha1
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.jar
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.jar.md5
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.jar.sha1
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.pom
│                   │   ├── opensearch-sql-jdbc-2.0.0.0.pom.md5
│                   │   └── opensearch-sql-jdbc-2.0.0.0.pom.sha1
│                   ├── maven-metadata.xml
│                   ├── maven-metadata.xml.md5
│                   └── maven-metadata.xml.sha1
├── resources
│   └── main
│       └── META-INF
│           └── services
│               └── java.sql.Driver
└── tmp
    ├── compileJava
    ├── javadocJar
    │   └── MANIFEST.MF
    ├── publishShadowPublicationToLocalRepoRepository
    │   └── org
    │       └── opensearch
    │           └── client
    │               └── opensearch-sql-jdbc
    │                   ├── maven-metadata-remote.xml
    │                   └── resolver-status.properties
    ├── shadowJar
    │   └── MANIFEST.MF
    └── sourcesJar
        └── MANIFEST.MF

44 directories, 169 files
Shadow copy content
$ tree . | grep -vF .class
.
├── META-INF
│   ├── MANIFEST.MF
│   ├── services
│   │   └── java.sql.Driver
│   └── versions
│       └── 9
├── mozilla
│   └── public-suffix-list.txt
└── org
    └── opensearch
        ├── jdbc
        │   ├── auth
        │   ├── config
        │   ├── internal
        │   │   ├── exceptions
        │   │   ├── results
        │   │   └── util
        │   ├── logging
        │   ├── protocol
        │   │   ├── exceptions
        │   │   └── http
        │   ├── transport
        │   │   └── http
        │   │       └── auth
        │   │           └── aws
        │   └── types
        └── sql
            └── jdbc
                └── shadow
                    ├── com
                    │   ├── amazonaws
                    │   │   ...
                    │   └── fasterxml
                    │       └── jackson
                    │           ...
                    ├── org
                    │   ├── apache
                    │   │   ├── commons
                    │   │   │   ├── codec
                    │   │   │   │   ...
                    │   │   │   └── logging
                    │   │   │       └── impl
                    │   │   └── http
                    │   │       ...
                    │   └── joda
                    │       └── time
                    │           ...
                    └── software
                        └── amazon
                            └── ion
                                ...

223 directories, 3902 files

Obsolete references

I removed obsolete references to com.amazonaws.opensearch (replaced by org.opensearch where applicable).

Issues Resolved

Adds JDBC driver publishing workflow

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
@codecov

This comment was marked as spam.

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
@Yury-Fridlyand Yury-Fridlyand changed the title Dev jdbc jenkins ci Add JDBC driver jenkins CI workflow Oct 24, 2022
@Yury-Fridlyand Yury-Fridlyand marked this pull request as ready for review October 24, 2022 18:39
@Yury-Fridlyand
Copy link
Author

Should I update com.amazonaws.opensearch references to org.opensearch?

@MaxKsyunz
Copy link

Should I update com.amazonaws.opensearch references to org.opensearch?

👍 Makes sense to me.

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
GenericTrigger(
genericVariables: [
[key: 'ref', value: '$.ref'],
[key: 'VERSION', value: '$.ref', regexpFilter: 'refs/tags/v' ],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect this will need to be updated to account for the non-standard tag jdbc release will need. I asked on the build ticket what they'd like to see.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I can change it later on integration branch.

@Yury-Fridlyand Yury-Fridlyand merged commit 6ed5ecd into integ-jdbc-jenkins-ci Oct 24, 2022
@Yury-Fridlyand Yury-Fridlyand deleted the dev-jdbc-jenkins-ci branch October 24, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants