Skip to content

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

Merged
merged 34 commits into from May 6, 2020
Merged

Add dockerlint #407

merged 34 commits into from May 6, 2020

Conversation

RDIL
Copy link
Collaborator

@RDIL RDIL commented Apr 14, 2020

PR Summary

Adds the dockerlint tool

PR Checklist

and also since we are in the middle of a pandemic, here is something to cheer everyone up
Screenshot 2020-05-06 at 9 08 22 AM

@RDIL

This comment has been minimized.

@TravisEz13
Copy link
Member

TravisEz13 commented Apr 15, 2020

You should use this wrapper to execute native commands: https://github.com/PowerShell/PowerShell/blob/b7c66ab3ef584956a2872856ee8b351784f522d9/build.psm1#L1396

GitHub
PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

@RDIL
Copy link
Collaborator Author

RDIL commented Apr 15, 2020

That's only for windows, plus I changed it to just use bash.

@TravisEz13
Copy link
Member

TravisEz13 commented Apr 15, 2020

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.

GitHub
With GitHub Packages you can safely publish and consume packages within your organization or with the entire world.

@RDIL
Copy link
Collaborator Author

RDIL commented Apr 15, 2020

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

@TravisEz13
Copy link
Member

But building it to a native on the other machine, causes the wrong libc to be needed.

@RDIL
Copy link
Collaborator Author

RDIL commented Apr 15, 2020

Fair enough, should be fixed now

@RDIL

This comment has been minimized.

@RDIL
Copy link
Collaborator Author

RDIL commented Apr 15, 2020

@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

@RDIL
Copy link
Collaborator Author

RDIL commented Apr 30, 2020

@RDIL RDIL marked this pull request as ready for review May 1, 2020 18:17
@RDIL RDIL requested a review from anmenaga as a code owner May 1, 2020 18:17
@RDIL
Copy link
Collaborator Author

RDIL commented May 1, 2020

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:
issue: line [NUMBER] - [DESCRIPTION] [PROBLEM-ID]

@TravisEz13
Copy link
Member

Would be nice if it showed up as a test, but this is fine.

@TravisEz13
Copy link
Member

but we can't commit it broken...

@RDIL
Copy link
Collaborator Author

RDIL commented May 1, 2020

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?

@TravisEz13
Copy link
Member

TravisEz13 commented May 1, 2020

@RDIL
Copy link
Collaborator Author

RDIL commented May 1, 2020

Alright, I'll implement reporting through JUnit-compatible XML data.

@RDIL
Copy link
Collaborator Author

RDIL commented May 3, 2020

@PoshChan please rerun CI

@PoshChan
Copy link
Collaborator

PoshChan commented May 3, 2020

@RDIL, successfully started rebuild of docker-PR

@TravisEz13
Copy link
Member

test results look good

@TravisEz13
Copy link
Member

thanks

@RDIL
Copy link
Collaborator Author

RDIL commented May 4, 2020

Alright, merging the junit feature into master, then will fix the issues here.

@RDIL RDIL changed the title WIP Add dockerlint Add dockerlint May 6, 2020
@TravisEz13 TravisEz13 merged commit 97b027c into PowerShell:master May 6, 2020
@TravisEz13
Copy link
Member

Thanks for your contribution

@RDIL
Copy link
Collaborator Author

RDIL commented May 6, 2020

@TravisEz13 do you have any suggestions for checks I should add?

@TravisEz13
Copy link
Member

Not right now, in the future, we want the from tags to be static (not a varible)

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

Successfully merging this pull request may close these issues.

3 participants