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

Issue with postReleaseGoals parameter #144

Closed
limkinZero opened this issue Jan 6, 2019 · 8 comments
Closed

Issue with postReleaseGoals parameter #144

limkinZero opened this issue Jan 6, 2019 · 8 comments

Comments

@limkinZero
Copy link

Hi @aleksandr-m,

I am using the parameter to deploy the generation of the release within my gitlab-ci
mvn -B gitflow:release -DpostReleaseGoals=deploy -DskipTests=true
and I'm getting errors when signing my artifacts. The fact is that I use the plugin maven-gpg-plugin (v1.6) and getting the following error:

[INFO] --------------------------< com.test:ci-test >--------------------------
[INFO] Building ci-test 0.0.5-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- gitflow-maven-plugin:1.11.0:release (default-cli) @ ci-test ---
[INFO] Checking for uncommitted changes.
[INFO] Local branch 'develop' doesn't exist. Trying to fetch and check it out from 'origin'.
[INFO] Fetching remote branch 'origin develop'.
[INFO] Creating a new branch 'develop' from 'origin/develop' and checking it out.
[INFO] Fetching remote branch 'origin develop'.
[INFO] Comparing local branch 'develop' with remote 'origin/develop'.
[INFO] Fetching remote branch 'origin master'.
[INFO] Comparing local branch 'master' with remote 'origin/master'.
[INFO] Checking out 'develop' branch.
[INFO] Checking for SNAPSHOT versions in dependencies.
[INFO] Cleaning and testing the project.
[INFO] Version is blank. Using default version.
[INFO] Updating version(s) to '0.0.5'.
[INFO] Committing changes.
[INFO] Checking out 'master' branch.
[INFO] Merging (--no-ff) 'develop' branch.
[INFO] Creating '0.0.5' tag.
[INFO] Running Maven goals: deploy
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
...
[ERROR] [INFO] --- maven-gpg-plugin: 1.6: sign (sign-artifacts) @ ci-test ---
[ERROR] gpg: can not open '/ dev / tty': No such device or address

If instead of doing the deploy as a subphase of the release I execute it by itself as mvn deploy, the process ends correctly.

I think the plugin is not passing all the information to the third-party plugins that are running in the phase. I have set the DEBUG mode but the plugin does not get the detailed information of the configuration of the maven-gpg-plugin. I think this could be another bug.

@aleksandr-m
Copy link
Owner

I think the plugin is not passing all the information to the third-party plugins that are running in the phase.

Which information exactly?

I have set the DEBUG mode but the plugin does not get the detailed information

Have you set verbose parameter to true?

@limkinZero
Copy link
Author

limkinZero commented Jan 7, 2019

Have you set verbose parameter to true?

Yes I do but i can´t see the gpg maven plugin configuration.

I put a log file of release and deploy proccess. You can reproduce the error using the plugin gpg-maven-plugin and execute gpg: sign.
Error_release_deploy.log

@aleksandr-m
Copy link
Owner

Have you tried to set --no-tty? See gpg-doesnt-work-in-crontab and gpg: cannot open '/dev/tty': No such device or address.

Try also adding -vv to gpg to see more logs.

@aleksandr-m
Copy link
Owner

@limkinZero Have you resolved this?

@limkinZero
Copy link
Author

Yes but I had to do in two steps. I can't use the post release task. I don't know why the process doesn't take maven got parameters.

@glianeric
Copy link

Could you please describe exactly how you resolved this?

@limkinZero
Copy link
Author

I did in two maven steps changing to master branch.

    - mvn $MAVEN_CLI_OPTS -B gitflow:release -DskipTests=true
    - git checkout master
    - mvn $MAVEN_CLI_OPTS deploy -DperformRelease=true

@wpater
Copy link

wpater commented Mar 16, 2020

I have a similar issue - I am using custom settings - -s ./.m2/settings.xml and it's not provided to the post-release step.

EDIT:
It works with -DargLine="-s ./.m2/settings.xml"

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

No branches or pull requests

4 participants