Skip to content

[MGPG-44] gpg:sign fix non-default output directory#14

Closed
Giovds wants to merge 3 commits intoapache:masterfrom
Giovds:MGPG-44-gpg-sign-remove-target-prefix-in-output-directory
Closed

[MGPG-44] gpg:sign fix non-default output directory#14
Giovds wants to merge 3 commits intoapache:masterfrom
Giovds:MGPG-44-gpg-sign-remove-target-prefix-in-output-directory

Conversation

@Giovds
Copy link
Contributor

@Giovds Giovds commented Sep 1, 2021

The command mvn verify assembly:single gpg:sign creates signed artifacts. It places the signed artifact alongside the original as long as the original artifact is stored in the project build directory.

However, if the original artifact is not stored in the project build directory, and depending on the ascDirectory (alias outputDirectory) in the pom configuration of the GPG plugin, this results in unexpected behaviour. For example, setting the ascDirectory to target/tarball results in the following directory structure /path/to/project/target/gpg/target/tarball/.

This PR resolves the issue by checking whether the root directory - relative to the artifact - has been found and mostly adds integration tests to document this behaviour.


Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MGPG-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace MGPG-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Submitted by: Giovanni van der Schelde

Setting the output directory added an extra unnecessary /target directory.
Applied a fix for this issue and mostly adding integration tests.
Copy link

@mthmulders mthmulders left a comment

Choose a reason for hiding this comment

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

Overall, looks good to me, except for the potential flakiness of the test.

I am not too familiar with this plugin so I'd value a second opinion from someone who is more familiar with it.

Submitted by: Giovanni van der Schelde

The integration test for the folder structure was flaky due to
Files.list() returning the items in no particular order.
Submitted by: Giovanni van der Schelde

- Format the test file
- Decrease the length of the test data to increase readability
@mthmulders
Copy link

Running through Jenkins

@mthmulders
Copy link

Failed because branch name is too long; renamed branch to something shorter and trying again.

@asfgit asfgit closed this in fc7e88b Sep 29, 2021
@jira-importer
Copy link

Resolve #215

1 similar comment
@jira-importer
Copy link

Resolve #215

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.

4 participants