Skip to content

Commit

Permalink
Use uv.lock file to build docker images (#4374)
Browse files Browse the repository at this point in the history
* Add uv lock file

* Use lock file to build docker images

* build

* Update megalinter python project version

Use `hatch version minor,dev` after releasing, and `hatch version release` to change to the release version number

* Release MegaLinter v8.3.1

* Revert running build scripts for releasing 8.3.1

* Update docs

---------

Co-authored-by: Nicolas Vuillamy <[email protected]>
  • Loading branch information
echoix and nvuillam authored Dec 14, 2024
1 parent 28f0388 commit 62ebd4a
Show file tree
Hide file tree
Showing 156 changed files with 3,596 additions and 584 deletions.
2 changes: 1 addition & 1 deletion .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3293,7 +3293,7 @@ def generate_version():
stdout=subprocess.PIPE,
text=True,
shell=True,
check=False,
check=True,
)
# Update changelog
if UPDATE_CHANGELOG is True:
Expand Down
7 changes: 7 additions & 0 deletions .automation/generated/linter-licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"npm-package-json-lint": "MIT",
"perlcritic": "Other",
"php": "Other",
"php-cs-fixer": "MIT",
"phpcs": "BSD-3-Clause",
"phplint": "MIT",
"phpstan": "MIT",
Expand All @@ -77,6 +78,7 @@
"raku": "Artistic-2.0",
"remark-lint": "MIT",
"revive": "MIT",
"roslynator": "Other",
"rst-lint": "Unlicense",
"rstcheck": "MIT",
"rubocop": "MIT",
Expand All @@ -97,13 +99,18 @@
"sqlfluff": "MIT",
"standard": "MIT",
"stylelint": "MIT",
"stylua": "MPL-2.0",
"swiftlint": "MIT",
"syft": "Apache-2.0",
"tekton-lint": "Apache-2.0",
"terraform-fmt": "MPL-2.0",
"terragrunt": "MIT",
"terrascan": "Apache-2.0",
"tflint": "MPL-2.0",
"trivy": "Apache-2.0",
"trivy-sbom": "Apache-2.0",
"trufflehog": "AGPL-3.0",
"ts-standard": "MIT",
"tsqllint": "MIT",
"v8r": "MIT",
"vale": "MIT",
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt
FROM ghcr.io/astral-sh/uv:0.5.7 AS uv
FROM python:3.12.8-alpine3.20 AS build-ml-core
WORKDIR /
COPY pyproject.toml .
COPY --from=uv /uv /bin/uv
COPY --from=uv /uv /uvx /bin/
# Install dependencies
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --system -r pyproject.toml
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project
# Copy the project into the image
COPY . .
# Sync the project
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --system .
uv sync --frozen

##################
# Get base image #
Expand Down
18 changes: 9 additions & 9 deletions docs/all_linters.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/descriptors/xml_xmllint.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To apply file formatting you must set `XML_XMLLINT_CLI_LINT_MODE: file` and `XML
| Variable | Description | Default value |
|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
| XML_XMLLINT_AUTOFORMAT | If set to `true`, it will reformat and reindent the output | `false` |
| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | `` |
| XML_XMLLINT_INDENT | The number of indentation spaces when `XML_XMLLINT_AUTOFORMAT` is `true` | ` ` |
| XML_XMLLINT_ARGUMENTS | User custom arguments to add in linter CLI call<br/>Ex: `-s --foo "bar"` | |
| XML_XMLLINT_COMMAND_REMOVE_ARGUMENTS | User custom arguments to remove from command line before calling the linter<br/>Ex: `-s --foo "bar"` | |
| XML_XMLLINT_FILTER_REGEX_INCLUDE | Custom regex including filter<br/>Ex: `(src\|lib)` | Include every file |
Expand Down
24 changes: 24 additions & 0 deletions docs/licenses/php-cs-fixer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: License info for php-cs-fixer within MegaLinter
search:
exclude: true
---
Copyright (c) 2012+ Fabien Potencier, Dariusz Rumiński

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
17 changes: 17 additions & 0 deletions docs/licenses/roslynator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: License info for roslynator within MegaLinter
search:
exclude: true
---
Copyright (c) .NET Foundation and Contributors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
these files except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
Loading

0 comments on commit 62ebd4a

Please sign in to comment.