spotbugs / spotbugs-maven-plugin

Maven Mojo Plug-In to generate reports based on the SpotBugs Analyzer
https://spotbugs.github.io/spotbugs-maven-plugin/
Apache License 2.0
69 stars 51 forks source link

remove the site bot #121

Closed hazendaz closed 4 years ago

hazendaz commented 4 years ago

The site bot caused a regression in already fixed site pages. The site bot is unnecessary as travis is already configured to deploy the site via gh-pages as well as during release.

hazendaz commented 4 years ago

after review, noticed that I did not have gh-pages handled in way outside of the release and in comparison projects never actually had the site automated fully. At the moment, the bot doesn't do it correctly and is messing up the site upon each commit. So options are to review why to see if that can be fixed; or simply remove the bot with no automation or with automation.

hazendaz commented 4 years ago

@KengoTODA I think we need to remove this or figure out why its broken. First, how exactly does the site bot work? Second, why is it not distributing all the files? A normal maven site release is nothing more than 'mvn site site:deploy'. However, in this case it loses a lot of the files. If I run locally I can fix this. The files it seems to drop are jquery folder, groovy api docs, various reports, etc. It's almost like it's running something entirely different. If this cannot be fixed, I'd opt to just disable it but not clear how this is setup. I can just as easily update the site and generally would not do so outside of a typical release which does it automatically.

hazendaz commented 4 years ago

btw - it's currently broken and will become broken every time anything is commited right now which has resulted in a few separate tickets.

KengoTODA commented 4 years ago

Hi @hazendaz, thanks for mentioning me!

Could you tell me which bot do you mean? I cannot find it in integration setting page.

Or do you mean the deployment phase in CI pipeline? I think it works without any problem for now...

hazendaz commented 4 years ago

Hi @KengoTODA , its the deployment phase. What exactly is that doing? It states it's deploying it but in all those final items I do not see that it actually is running site then site:deploy. It appears like it just assumes it's deploying what is there or at least no output. Can you give me some insite into how that is working?

For reference so you can see what is missing, I have restored a saved off copy of gh-pages just before my last merge onto 'spotbugs' branch. You will see 2 commits. The one that this thing is currently messing up and one where I ran mvn site and mvn site:deploy from windows. Branch is located here.

btw - I like the automation but want to ensure it is accurate. With the missing items that this is failing on, it makes the site currently useless (unless I keep manually re-running afterwards).

hazendaz commented 4 years ago

I guess what is throughing me off is that it claims the commit is made by 'spotbugs-bot'. I presume that is something with the gems token of yours. After looking at results here more closely, its failing building the site and thus it's only partially uploading one.

hazendaz commented 4 years ago

I'm trying to rework this entire thing which I'm hoping will give better error messages and effectively do what the original was trying to do. If I get this far, I will at least be getting an email that site distro failed and hopefully that causes subsequent failure of the deploy.

KengoTODA commented 4 years ago

It firstly run mvn site:

https://github.com/spotbugs/spotbugs-maven-plugin/blob/ffd759e430310817997ee9c1922943fa59542e2f/.travis.yml#L20

And force-push the files in target/site directory to gh-pages branch:

https://github.com/spotbugs/spotbugs-maven-plugin/blob/ffd759e430310817997ee9c1922943fa59542e2f/.travis.yml#L31

I think this operation overwrote the changes from your local Windows.

KengoTODA commented 4 years ago

So if you want to add more files in the site, please make sure the final HTML is successfully generated in target/site directory. Maybe you need to add new files under src/site directory.

hazendaz commented 4 years ago

The files are there. The current setup was always failing but echo reset the response code sp travis was happy and only sent partial site. I'm switching the entire thing over to deploy scripts. I should have it working correctly tonight.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Kengo TODA notifications@github.com Sent: Tuesday, July 16, 2019 4:23:46 AM To: spotbugs/spotbugs-maven-plugin Cc: Jeremy Landis; Mention Subject: Re: [spotbugs/spotbugs-maven-plugin] remove the site bot (#121)

So if you want to add more files in the site, please make sure the final HTML is successfully generated in target/site directory. Maybe you need to add new files under src/site directory.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/spotbugs/spotbugs-maven-plugin/issues/121?email_source=notifications&email_token=AAHODI25JPMWKVVME2WYQMTP7WARFA5CNFSM4HZOQE3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ADBEA#issuecomment-511717520, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAHODI5WW2DKHEX7BRNUO23P7WARFANCNFSM4HZOQE3A.

hazendaz commented 4 years ago

Issue resolved. Jdk8 posed a problem. I have switched to jdk 11 to build the site and using the newer style. It's working as expected, site was updated and it is not missing any files.

KengoTODA commented 4 years ago

Awesome!