-
Notifications
You must be signed in to change notification settings - Fork 155
Add dockerlint #407
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
Add dockerlint #407
Conversation
This comment has been minimized.
This comment has been minimized.
You should use this wrapper to execute native commands: https://github.com/PowerShell/PowerShell/blob/b7c66ab3ef584956a2872856ee8b351784f522d9/build.psm1#L1396
|
That's only for windows, plus I changed it to just use bash. |
You should really create a python package. Put it in the GitHub python package registry: https://github.com/features/packages Then do the rest of the steps on the CI machine.
|
All the CI machine is doing right now is downloading and decompressing the executable... plus it already a python package that I'm building into an executable. I suppose I could setup the CI to clone the repo or something but I feel like that wouldn't be an efficient way to do it |
But building it to a native on the other machine, causes the wrong libc to be needed. |
Fair enough, should be fixed now |
This comment has been minimized.
This comment has been minimized.
@TravisEz13 good news: its working. Bad news: it isn't working on windows so does azure devops have an environment variable for if it is on windows so I can skip |
Fyi @TravisEz13 here is example output for the script: /bin/bash --noprofile --norc /home/vsts/work/_temp/529d60fd-1be4-4387-b296-097b95f45f9e.sh
Starting dockerlint...
info: Using dockerfile from path: release/stable/debian9/docker/Dockerfile
issue: line 20 - uses apt install without no-install-recommends lacks-no-install-recommends
issue: line 33 - uses apt install without no-install-recommends lacks-no-install-recommends Meaning that issue lines follow the format of: |
Would be nice if it showed up as a test, but this is fine. |
but we can't commit it broken... |
Yeah, I was going to fix it later today. What test result format does it need to output for it to show up in azure devops? |
One of those |
Alright, I'll implement reporting through JUnit-compatible XML data. |
@PoshChan please rerun CI |
@RDIL, successfully started rebuild of |
test results look good |
thanks |
Alright, merging the junit feature into master, then will fix the issues here. |
Thanks for your contribution |
@TravisEz13 do you have any suggestions for checks I should add? |
Not right now, in the future, we want the from tags to be static (not a varible) |
PR Summary
Adds the dockerlint tool
PR Checklist
Dockerfile
,.sh
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.and also since we are in the middle of a pandemic, here is something to cheer everyone up
