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

Possibility to mark the job as failure? #9

Open
arolfes opened this issue Feb 12, 2021 · 8 comments
Open

Possibility to mark the job as failure? #9

arolfes opened this issue Feb 12, 2021 · 8 comments

Comments

@arolfes
Copy link

arolfes commented Feb 12, 2021

Hi @jwgmeligmeyling ,

At first thank you for the Action

I started using your GHA in the micronaut-camunda-bpm project.
so far it works as I understood from your readme
arolfes/micronaut-camunda-bpm@5753bec

image

I personally miss a possibility to mark the job as failure run when there was at least one violation found.

Did I configure something wrong? Or will it always be green when upload succeed?
What other chance do I have to mark the build as failure?

Best Regards

@jwgmeligmeyling
Copy link
Owner

It doesnt have this feature yet, but it was definitely intended to have it

@jwgmeligmeyling
Copy link
Owner

This would be the extension point: https://github.com/jwgmeligmeyling/spotbugs-github-action/blob/master/src/main.ts#L81

@arolfes
Copy link
Author

arolfes commented Feb 13, 2021

Ok, let me try to provide an PR. Thanks for the hint

@arolfes
Copy link
Author

arolfes commented Feb 15, 2021

I implented a threshold where you can configure the number of annations which leads the upload to fail

But I can't create the PR because I'm not able to build the current master which relates to my local setup
Can you help me?

@arolfes
Copy link
Author

arolfes commented Feb 15, 2021

ok, upgrading every dependency to latest except nodejs works fine

@arolfes
Copy link
Author

arolfes commented Feb 15, 2021

arl@dev-vm-20:/workspace/sources/arolfes/spotbugs-github-action (master)$ rm -rf node_modules/
arl@dev-vm-20:/workspace/sources/arolfes/spotbugs-github-action (master)$ npm install
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 725 packages from 477 contributors and audited 730 packages in 90.388s

68 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

arl@dev-vm-20:/workspace/sources/arolfes/spotbugs-github-action (master)$ npm run build

> [email protected] build /workspace/sources/arolfes/spotbugs-github-action
> tsc

arl@dev-vm-20:/workspace/sources/arolfes/spotbugs-github-action (master)$ npm run pack

> [email protected] pack /workspace/sources/arolfes/spotbugs-github-action
> ncc build

ncc: Version 0.20.5
ncc: Compiling file index.js
1022kB  dist/index.js
1022kB  [57369ms] - ncc 0.20.5
arl@dev-vm-20:/workspace/sources/arolfes/spotbugs-github-action (master)$ npm test

> [email protected] test /workspace/sources/arolfes/spotbugs-github-action
> jest

 PASS  __tests__/main.test.ts (58.646 s)
  ✓ parses file (298 ms)

Creating annotations for /workspace/sources/arolfes/spotbugs-github-action/reports/spotbugsXml.xml
/workspace/sources/arolfes/spotbugs-github-action/reports/spotbugsXml.xml has 12 violations
::debug::/home/runner/work/athena-hibernate-test/athena-hibernate-test/external/capsule-crm/src/main/java/com/pallasathenagroup/capsule/client/impl/CapsuleTargetTest.java does exists
Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        58.831 s
Ran all test suites.
arl@dev-vm-20:/workspace/sources/arolfes/spotbugs-github-action (master)$ 

arolfes referenced this issue in arolfes/spotbugs-github-action Feb 15, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 15, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 15, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 15, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 15, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 15, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 19, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 19, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 19, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Feb 19, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Sep 22, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes added a commit to arolfes/spotbugs-github-action that referenced this issue Sep 22, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
arolfes referenced this issue in arolfes/spotbugs-github-action Sep 22, 2021
step is marked as failure when threshold param is lower then current
uploaded failures
@elektrovert
Copy link

Hi there,

Will this functionality have the possibility to do a complete build then mark it as failed if there are any errors?
Or will it just fail when the threshold is reached?
In my mind the best behaviour for this type of feature is to build a complete report, annotate the code with the errors, then fail the build.

@ataylormays-duetto
Copy link

Hello, any update on this change? It'd be a helpful feature!

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