[MNG-8685] Propagate GitHub Actions debug mode to Maven#2253
[MNG-8685] Propagate GitHub Actions debug mode to Maven#2253ledoyen wants to merge 1 commit intoapache:masterfrom
Conversation
When in debug mode, GitHub Actions adds the `RUNNER_DEBUG` environment variable, cf https://github.com/actions/toolkit/blob/1b1e81526b802d1d641911393281c2fb45ed5f11/packages/core/src/core.ts#L258-L260. It would be a great improvement for scoped troubleshooting to propagate this option to Maven. The use case is the following: * A GitHub Actions workflow fails on a call to `mvn` * We relaunch the failed jobs with the [debug mode enabled](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/re-running-workflows-and-jobs#about-re-running-workflows-and-jobs) * Maven also displays its debug logs this time 🎉 It felt like such a minor change could avoid a new Jira entry, however I still can create one if you think it's best.
slawekjaranowski
left a comment
There was a problem hiding this comment.
Idea is ok, but I would like to implement as possibility to execute
mvn ... --verbose=$ENV_NAME
I would like not add vendor specific name to code
eg, jenkins can have another values
It also will have a impact on out integration tests ....
Couldn't agree more! |
|
Agreed, there is ther place in core as well: Maybe we want to pull these out into something like "CIDetector" helpers? |
Am fine with doing that, but having those encapsulated in some (helper) classes, like Jenkins, GH, etc.... The trick of this PR would be to not have to alter mvn invocation, like we use both: Jenkins and GH, and mvn could really "react" to both. |
|
My alt proposal: #2254 |
|
Superseded by #2254 |
|
Resolve #9622 |
When in debug mode, GitHub Actions adds the
RUNNER_DEBUGenvironment variable, cf https://github.com/actions/toolkit/blob/1b1e81526b802d1d641911393281c2fb45ed5f11/packages/core/src/core.ts#L258-L260.It would be a great improvement for scoped troubleshooting to propagate this option to Maven. The use case is the following:
mvnIt felt like such a minor change could avoid a new Jira entry, however I still can create one if you think it's best.
https://issues.apache.org/jira/browse/MNG-8685
Following this checklist to help us incorporate your
contribution quickly and easily:
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.
[MNG-XXX] SUMMARY,where you replace
MNG-XXXandSUMMARYwith the appropriate JIRA issue.[MNG-XXX] SUMMARY.Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
mvn clean verifyto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
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.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.