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

Fix MegaLinter version displayed in logs #2485

Merged
merged 5 commits into from
Mar 27, 2023
Merged

Fix MegaLinter version displayed in logs #2485

merged 5 commits into from
Mar 27, 2023

Conversation

nvuillam
Copy link
Member

Related to #2425

@nvuillam
Copy link
Member Author

nvuillam commented Mar 27, 2023

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ BASH bash-exec 6 0 0.02s
✅ BASH shellcheck 6 0 0.13s
✅ BASH shfmt 6 0 0 0.37s
✅ COPYPASTE jscpd yes no 2.47s
✅ DOCKERFILE hadolint 115 0 11.27s
✅ JSON eslint-plugin-jsonc 21 0 0 2.16s
✅ JSON jsonlint 19 0 0.18s
✅ JSON v8r 21 0 11.47s
⚠️ MARKDOWN markdownlint 311 0 230 6.68s
⚠️ MARKDOWN markdown-link-check 311 102 315.58s
✅ MARKDOWN markdown-table-formatter 311 0 0 19.7s
✅ OPENAPI spectral 1 0 1.11s
⚠️ PYTHON bandit 184 55 1.96s
✅ PYTHON black 184 0 0 4.55s
✅ PYTHON flake8 184 0 1.35s
✅ PYTHON isort 184 0 0 0.72s
✅ PYTHON mypy 184 0 6.7s
✅ PYTHON pylint 184 0 10.94s
⚠️ PYTHON pyright 184 250 15.4s
✅ REPOSITORY checkov yes no 28.51s
✅ REPOSITORY git_diff yes no 0.34s
✅ REPOSITORY secretlint yes no 12.26s
✅ REPOSITORY trivy yes no 20.95s
✅ SPELL cspell 750 0 19.45s
✅ SPELL misspell 570 0 0 0.89s
✅ XML xmllint 3 0 0 0.4s
✅ YAML prettier 81 0 0 2.86s
✅ YAML v8r 23 0 44.44s
✅ YAML yamllint 82 0 1.0s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@nvuillam nvuillam merged commit 85acece into main Mar 27, 2023
@nvuillam nvuillam deleted the fixes/image-version branch March 27, 2023 18:31
@llaville
Copy link
Collaborator

llaville commented Apr 1, 2023

@nvuillam Like it !

----------------------------------------------------------------------------------------------------
------------------------------------ MegaLinter, by OX Security ------------------------------------
----------------------------------------------------------------------------------------------------
 - Image Creation Date: 2023-04-01T14:20:57Z
 - Image Revision: a6134e1daea26bc9d745017dfc24883ac5e2859c
 - Image Version: v6.22.0
----------------------------------------------------------------------------------------------------
The MegaLinter documentation can be found at:
 - https://megalinter.io/6.22.0
----------------------------------------------------------------------------------------------------

And also in descriptors links, like this one

- Using [phplint v5.5] https://megalinter.io/6.22.0/descriptors/php_phplint

@nvuillam
Copy link
Member Author

nvuillam commented Apr 1, 2023

@llaville the retag-push was not enough... I had to update the release workflows to build again FROM newest beta version and add appropriate ENV vars & LABEL :)

@echoix
Copy link
Collaborator

echoix commented Apr 1, 2023

Did you try pulling the image before, to populate the cache with what already exists? This way, maybe only the last layers would need to be "built"

@nvuillam
Copy link
Member Author

nvuillam commented Apr 1, 2023

https://github.com/oxsecurity/megalinter/blob/main/Dockerfile-release

Nope, but the performances are acceptable :)

@nvuillam
Copy link
Member Author

nvuillam commented Apr 1, 2023

I'm not even sure that those lines are necessary, as they are already in the base image... but as i have doubts I put them anyway ^^

Do you think they should be removed ?

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

@echoix
Copy link
Collaborator

echoix commented Apr 1, 2023

I don't have a clue indeed, I haven't played with a similar case yet to know the behaviour.

But what I can imagine that could be an improvement over the Dockerfile-release, is to add a default value to the argument, for the base image at least, so it could be already there if we want to manually run the build, without entering every single argument at the command line.

But I'm wondering if it doesn't add extra useless layers (the env ones) when doing this. And what about basing a release on an already released base, does it still work (imagine without any commits in between)

@nvuillam
Copy link
Member Author

nvuillam commented Apr 1, 2023

We will never manually build a release version :p

Indeed I also think about useless layers :p

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