richardforth / apache2buddy

apache2buddy
Apache License 2.0
385 stars 72 forks source link

--- a2bchk.sh --- showing MD5 mismatch #402

Closed dakman closed 2 years ago

dakman commented 2 years ago

image

prolly an issue with the comparison/ if statement or how you are cutting the string

dakman commented 2 years ago

oops was using sh to run it ... make sure u chmod and ./a2bchk.sh to use /bin/bash or it will error out

dakman commented 2 years ago

i didnt catch this cause i saw .sh at the end thinking this script didnt have the /bin/bash env at the top

richardforth commented 2 years ago

Thanks for checking the MD5UMs!

I've re-opened this issue as it reminded me that I need to add this to the Jenkinsfile to make sure the Jenkins tests pick up the MD5 and SHA256 sums match during the testing pipeline.

As you can see from your screenshot, the MD5 sums matched anyway, I'm still not 100% sure why it failed like that but youre right, either chmodding it 700 or 755 and ./a2bchk.sh or source a2bchk.sh should both work.

I always put a shebang line at the top of all my scripts so Ive never called one with sh before.

Anyway thanks for raising this, as soon as I've added it in to the jenkins pipeline and tested, I'll close this one off again.

richardforth commented 2 years ago

Added to all stages of the Jenkinsfile