Commit 83043bb2 authored by GridexX's avatar GridexX
Browse files

chore(mega_linter): bump tool, image tag version



Signed-off-by: default avatarGridexX <arsene582@gmail.com>
parent c69a5bff
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
# Changelog
All notable changes to this job will be documented in this file.

## [2.0.0] - 2023-03-07
* Bump megalinter image version to v6.20.0
* Bump sarif-codeclimate version to 2.1.2

## [1.9.1] - 2023-02-28
* Fix broken documentation links

+21 −19
Original line number Diff line number Diff line
@@ -25,6 +25,26 @@ By default, this job will run MegaLinter on your project, lint all the files and
!!! info "How can i get results summary directly in the merge request comments?"
   MegaLinter could also write comments directly in the merge request comments section (see `GITLAB_COMMENT_REPORTER` variable). 
   ⚠️ You need to configure an access token between GitLab and MegaLinter, see the [documentation](https://oxsecurity.github.io/megalinter/latest/reporters/GitlabCommentReporter/#configuration){:target="_blank"}.

## Optimize MegaLinter

MegaLinter provides flavored images with pre-defined linters for most of your
projects, you will find the complete list
[here](https://github.com/oxsecurity/megalinter#flavors).

By using a flavor instead of the default image, you'll be able to optimize the
docker image size and your pipeline. If any of the flavors is matching your
project type, all you have to do is overriding the image used in the job, like
this:

```yaml
mega_linter:
  # Replace FLAVOR by the one matching your project
  image: 
    name: oxsecurity/megalinter-<flavor>:${IMAGE_TAG}
    entrypoint: [""] # This is required to override the default entrypoint
```

## Variables

!!! info
@@ -49,27 +69,9 @@ customize its behavior.
| `CONVERTED_OUTPUT_FOLDER` | Folder where are stored `CodeClimate` reports | `converted.report` |
|`GITLAB_COMMENT_REPORTER` | Posts Mega-Linter results summary in the comments of the related merge request ([⚠️ GitLab API access require](https://oxsecurity.github.io/megalinter/latest/reporters/GitlabCommentReporter/#configuration){:target="_blank"}) | `true` |
| `DISABLE_LINTERS` | Comma separated list of linters to be disabled | ` ` |
| `IMAGE_TAG` | The default tag for the docker image | `v6.18.0` |
| `IMAGE_TAG` | The default tag for the docker image | `v6.20.0` |
| `SARIF_CODECLIMATE_VERSION` | Version tag of the [sarif-codeclimate](https://www.npmjs.com/package/sarif-codeclimate) package to convert sarif reports | `2.1.1` |


## Optimize MegaLinter

MegaLinter provides flavored images with pre-defined linters for most of your
projects, you will find the complete list
[here](https://github.com/oxsecurity/megalinter#flavors).

By using a flavor instead of the default image, you'll be able to optimize the
docker image size and your pipeline. If any of the flavors is matching your
project type, all you have to do is overriding the image used in the job, like
this:

```yaml
mega_linter:
  # Replace FLAVOR by the one matching your project
  image: oxsecurity/megalinter-<flavor>:${IMAGE_TAG}
```

## Artifacts

- [CodeClimate](https://codeclimate.com/quality)'s JSON report to display error report directly in merge request widget.
+4 −3
Original line number Diff line number Diff line
@@ -38,10 +38,10 @@ mega_linter:
    # End folder where reports are held
    CONVERTED_OUTPUT_FOLDER: "converted.report"
    # Image tag of the MegaLinter image used in this job
    IMAGE_TAG: "v6.18.0"
    IMAGE_TAG: "v6.20.0"
    # Version tag of the sarif-codeclimate package to convert sarif reports
    # https://www.npmjs.com/package/sarif-codeclimate
    SARIF_CODECLIMATE_VERSION: "2.1.1"
    SARIF_CODECLIMATE_VERSION: "2.1.2"
  script:
    - FAILED=false
    - |
@@ -62,7 +62,8 @@ mega_linter:
  artifacts:
    when: always
    paths:
      - megalinter-reports
      - ${CI_PROJECT_DIR}/${REPORT_OUTPUT_FOLDER}
      - ${CI_PROJECT_DIR}/${CONVERTED_OUTPUT_FOLDER}
    expire_in: 1 week
    reports:
      codequality: "${CI_PROJECT_DIR}/${CONVERTED_OUTPUT_FOLDER}/code-climate.json"
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ JOB_DIR = "job_av"
SCANNED_IMAGES_FILE = os.getenv("SCANNED_IMAGES_FILE")
SCANNED_IMAGES = []

BLACKLIST = ["github/super-linter:v3.14.3", "shiftleft/sast-scan:v1.9.29", "oxsecurity/megalinter:v6.18.0", "github/super-linter:v4.9.0"]
BLACKLIST = ["github/super-linter:v3.14.3", "shiftleft/sast-scan:v1.9.29", "oxsecurity/megalinter:v6.20.0", "github/super-linter:v4.9.0"]


def argparse_setup():