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 publication of jars workflow #764

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Add publication of jars workflow #764

merged 1 commit into from
Mar 1, 2023

Conversation

Yury-Fridlyand
Copy link
Contributor

Description

There are new gradle task publishJarsPublicationToSnapshotsRepository which is called in GHA. It publishes client snapshot jars to the corresponding repository.

Tested with publishPluginZipPublicationToMavenLocal, it produced

$ ls -1 ~/.m2/repository/org/opensearch/opensearch-ml-client/3.0.0.0-SNAPSHOT/
maven-metadata-local.xml
opensearch-ml-client-3.0.0.0-SNAPSHOT.jar
opensearch-ml-client-3.0.0.0-SNAPSHOT.module
opensearch-ml-client-3.0.0.0-SNAPSHOT.pom

jar contains

$ tree opensearch-ml-client-3.0.0.0-SNAPSHOT/ | grep -v class
opensearch-ml-client-3.0.0.0-SNAPSHOT/
├── META-INF
│   ├── MANIFEST.MF
│   └── maven
│       ├── org.javassist
│       │   └── javassist
│       │       ├── pom.properties
│       │       └── pom.xml
│       └── org.reflections
│           └── reflections
│               ├── pom.properties
│               └── pom.xml
├── javassist
│   ├── bytecode
│   │   ├── analysis
│   │   ├── annotation
│   │   └── stackmap
│   ├── compiler
│   │   └── ast
│   ├── convert
│   ├── expr
│   ├── runtime
│   ├── scopedpool
│   ├── tools
│   │   ├── reflect
│   │   ├── rmi
│   │   └── web
│   └── util
│       └── proxy
└── org
    ├── opensearch
    │   └── ml
    │       ├── client
    │       └── common
    │         .....
    └── reflections
        ├── adapters
        ├── scanners
        ├── serializers
        ├── util
        └── vfs

69 directories, 697 files
$ ./gradlew --dry-run publishJarsPublicationToMavenLocal
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.4.2
  OS Info               : Linux 5.15.79.1-microsoft-standard-WSL2 (amd64)
  JDK Version           : 11 (Ubuntu JDK)
  JAVA_HOME             : /usr/lib/jvm/java-11-openjdk-amd64
  Random Testing Seed   : E602FED0661BB7B2
  In FIPS 140 mode      : false
=======================================
:opensearch-ml-client:generateEffectiveLombokConfig SKIPPED
:opensearch-ml-common:generateEffectiveLombokConfig SKIPPED
:opensearch-ml-common:compileJava SKIPPED
:opensearch-ml-common:processResources SKIPPED
:opensearch-ml-common:classes SKIPPED
:opensearch-ml-common:jar SKIPPED
:opensearch-ml-client:compileJava SKIPPED
:opensearch-ml-client:processResources SKIPPED
:opensearch-ml-client:classes SKIPPED
:opensearch-ml-client:jar SKIPPED
:opensearch-ml-client:shadowJar SKIPPED
:opensearch-ml-client:generateMetadataFileForJarsPublication SKIPPED
:opensearch-ml-client:generatePomFileForJarsPublication SKIPPED
:opensearch-ml-client:publishJarsPublicationToMavenLocal SKIPPED

Issues Resolved

Fixes #763
Discussed in #755, #754

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc 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.

@Yury-Fridlyand Yury-Fridlyand requested a review from a team March 1, 2023 22:11
@@ -35,4 +35,4 @@ jobs:
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
echo "::add-mask::$SONATYPE_USERNAME"
echo "::add-mask::$SONATYPE_PASSWORD"
./gradlew publishPluginZipPublicationToSnapshotsRepository
./gradlew publishPluginZipPublicationToSnapshotsRepository publishJarsPublicationToSnapshotsRepository
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this new gradle task "publishJarsPublicationToSnapshotsRepository" introduced by a newer version of gradle? I don't see this task in my local env.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps, you have to rebuild the project to refresh the caches

@Zhangxunmt Zhangxunmt merged commit 22b66d5 into opensearch-project:main Mar 1, 2023
@Yury-Fridlyand Yury-Fridlyand deleted the maven-publish-jars-#763 branch March 1, 2023 23:09
@Yury-Fridlyand
Copy link
Contributor Author

Yury-Fridlyand commented Mar 1, 2023

Can you label as backport 2.x please?

opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 2, 2023
Signed-off-by: Yury-Fridlyand <[email protected]>
(cherry picked from commit 22b66d5)
Zhangxunmt pushed a commit that referenced this pull request Mar 2, 2023
Signed-off-by: Yury-Fridlyand <[email protected]>
(cherry picked from commit 22b66d5)

Co-authored-by: Yury-Fridlyand <[email protected]>
peterzhuamazon added a commit to peterzhuamazon/ml-commons that referenced this pull request Jun 3, 2023
peterzhuamazon added a commit that referenced this pull request Jun 3, 2023
* Revert #764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 3, 2023
* Revert #764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit e6dabc0)
ylwu-amzn pushed a commit that referenced this pull request Jun 3, 2023
* Revert #764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit e6dabc0)

Co-authored-by: Peter Zhu <[email protected]>
zane-neo pushed a commit to zane-neo/ml-commons that referenced this pull request Aug 28, 2023
…search-project#959)

* Revert opensearch-project#764 to only use shadowjar publication

Signed-off-by: Peter Zhu <[email protected]>

* Restore changes

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
zane-neo added a commit that referenced this pull request Aug 28, 2023
* Revert #764 to only use shadowjar publication



* Restore changes



---------

Signed-off-by: Peter Zhu <[email protected]>
Co-authored-by: Peter Zhu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish ml-common Client jars to maven
3 participants