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

Artifacts path update at right location #376

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,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 publishAllPublicationsToSnapshotsRepository
./gradlew opensearch-job-scheduler-spi:publishAllPublicationsToSnapshotsRepository && ./gradlew publishPluginZipPublicationToSnapshotsRepository && ./gradlew publishPluginJarToSnapshotsRepository
74 changes: 53 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ forbiddenApisTest.ignoreFailures = true
validateNebulaPom.enabled = false
loggerUsageCheck.enabled = false

tasks.matching {it.path in [":publishNebulaPublicationToSnapshotsRepository"]}.all { task ->
task.dependsOn 'generatePomFileForPluginZipPublication'
tasks.matching {it.path in [":publishNebulaPublicationToSnapshotsRepository",":validatePluginJarPom",":validatePluginZipPom"]}.all { task ->
task.dependsOn 'generatePomFileForPluginZipPublication','generatePomFileForNebulaPublication','generatePomFileForPluginJarPublication'
}

opensearchplugin {
Expand Down Expand Up @@ -103,25 +103,25 @@ allprojects {
}
publications {
// add license information to generated poms
all {
pom {
name = "opensearch-job-scheduler"
description = "OpenSearch Job Scheduler plugin"
groupId = "org.opensearch.plugin"
}
pom.withXml { XmlProvider xml ->
Node node = xml.asNode()
node.appendNode('inceptionYear', '2021')

Node license = node.appendNode('licenses').appendNode('license')
license.appendNode('name', project.licenseName)
license.appendNode('url', project.licenseUrl)

Node developer = node.appendNode('developers').appendNode('developer')
developer.appendNode('name', 'OpenSearch')
developer.appendNode('url', 'https://github.com/opensearch-project/job-scheduler')
}
}
// all {
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove the commented out lines?

Copy link
Member Author

Choose a reason for hiding this comment

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

Took care off

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Copy link
Member

Choose a reason for hiding this comment

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

I'm still seeing commented out lines in the PR.

Copy link
Member

Choose a reason for hiding this comment

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

+1 lm still seeing commented code.

// pom {
// name = "opensearch-job-scheduler"
// description = "OpenSearch Job Scheduler plugin"
// groupId = "org.opensearch.plugin"
// }
// pom.withXml { XmlProvider xml ->
// Node node = xml.asNode()
// node.appendNode('inceptionYear', '2021')
//
// Node license = node.appendNode('licenses').appendNode('license')
// license.appendNode('name', project.licenseName)
// license.appendNode('url', project.licenseUrl)
//
// Node developer = node.appendNode('developers').appendNode('developer')
// developer.appendNode('name', 'OpenSearch')
// developer.appendNode('url', 'https://github.com/opensearch-project/job-scheduler')
// }
// }
}
}
}
Expand All @@ -135,6 +135,38 @@ publishing {
description = "OpenSearch Job Scheduler plugin"
groupId = "org.opensearch.plugin"
}
pom.withXml { XmlProvider xml ->
Node node = xml.asNode()
node.appendNode('inceptionYear', '2021')

Node license = node.appendNode('licenses').appendNode('license')
license.appendNode('name', project.licenseName)
license.appendNode('url', project.licenseUrl)

Node developer = node.appendNode('developers').appendNode('developer')
developer.appendNode('name', 'OpenSearch')
developer.appendNode('url', 'https://github.com/opensearch-project/job-scheduler')
}
}
pluginJar(MavenPublication){ publication ->
pom {
name = "opensearch-job-scheduler"
description = "OpenSearch Job Scheduler plugin"
packaging = "jar"
groupId = "org.opensearch"
}
pom.withXml { XmlProvider xml ->
Node node = xml.asNode()
node.appendNode('inceptionYear', '2021')

Node license = node.appendNode('licenses').appendNode('license')
license.appendNode('name', project.licenseName)
license.appendNode('url', project.licenseUrl)

Node developer = node.appendNode('developers').appendNode('developer')
developer.appendNode('name', 'OpenSearch')
developer.appendNode('url', 'https://github.com/opensearch-project/job-scheduler')
}
}
}
repositories {
Expand Down