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

[BUG] Snapshot build doesn't produce a snapshot build or an artifact named with -SNAPSHOT #1403

Closed
dblock opened this issue Aug 13, 2021 · 4 comments
Labels
maintenance Project maintenance

Comments

@dblock
Copy link
Member

dblock commented Aug 13, 2021

Describe the bug

Coming from opensearch-project/opensearch-build#189, attempting to build a snapshot version of this plugin:

mvn -B clean package -Padvanced -DskipTests -Dopensearch.version=1.0.0-SNAPSHOT -Dbuild.snapshot=true

produces target/releases/opensearch-security-1.0.0.0.zip, I expected it to produce opensearch-security-1.0.0.0-SNAPSHOT.zip like other plugins.

or for it to get renamed in output from assembly step?

./gradlew build buildDeb buildRpm --no-daemon -ParchivePath=target/releases/opensearch-security-1.0.0.0.zip -Dbuild.snapshot=true

Expected behavior

Produce opensearch-security-1.0.0.0-SNAPSHOT.zip and any other artifact to include -SNAPSHOT as well as internal version to include SNAPSHOT so that we don't accidentally promote snapshot builds to release.

@dblock dblock added bug Something isn't working Beta untriaged Require the attention of the repository maintainers and may need to be prioritized labels Aug 13, 2021
@dblock dblock changed the title [BUG] Snapshot build doesn't produce a snapshot artifact [BUG] Snapshot build doesn't produce an artifact named with -SNAPSHOT Aug 13, 2021
@dblock dblock removed the Beta label Aug 13, 2021
@vrozov
Copy link
Contributor

vrozov commented Aug 14, 2021

@dblock -Dbuild.snapshot=true is a gradle option, not a maven option. Passing it to maven does not make maven to build snapshot.

@vrozov vrozov added maintenance Project maintenance and removed bug Something isn't working untriaged Require the attention of the repository maintainers and may need to be prioritized labels Aug 14, 2021
@dblock
Copy link
Member Author

dblock commented Aug 14, 2021

@dblock -Dbuild.snapshot=true is a gradle option, not a maven option. Passing it to maven does not make maven to build snapshot.

How do I build a snapshot version of the security plugin?

@dblock
Copy link
Member Author

dblock commented Aug 17, 2021

With changes in #1409, building a -SNAPSHOT version against OpenSearch 1.1. works like so:

mvn -B clean package -Padvanced -DskipTests -Dopensearch.version=1.1.0-SNAPSHOT
artifact_zip=$(ls $(pwd)/target/releases/opensearch-security-*.zip | grep -v admin-standalone)
./gradlew assemble --no-daemon -ParchivePath=$artifact_zip -Dopensearch.version=1.1.0-SNAPSHOT

@dblock dblock changed the title [BUG] Snapshot build doesn't produce an artifact named with -SNAPSHOT [BUG] Snapshot build doesn't produce a snapshot build or an artifact named with -SNAPSHOT Aug 29, 2021
@dblock
Copy link
Member Author

dblock commented Sep 1, 2021

#1409 was closed in favor of opensearch-project/opensearch-build#356

@dblock dblock closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Project maintenance
Projects
None yet
Development

No branches or pull requests

2 participants