Commit d8f43e00 authored by Thomas Boni's avatar Thomas Boni
Browse files

initial version of super_linter job

parent 08942601
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
Copyright 2020 Go2Scale

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.
+45 −0
Original line number Diff line number Diff line
# ✅ Super linter

## Description

Simple combination of various linters, to help validate the quality of your source code.
TODO (link to repo etc)

## How to use it

1. TODO
2. Choose a version in [version list](#versions)
3. Add the corresponding URL to your `.gitlab-ci.yml` file (see [Getting
   started](/getting-started)). Example:

    ```yaml
    include:
      - remote: 'https://jobs.go2scale.io/super_linter.yml'
    ```

4. If you need to customize the job (stage, variables, ...) 👉 check the [jobs
   customization](/getting-started/#jobs-customization)

5. Well done, your job is ready to work ! 😀

## Job details

* Job name: `super_linter`
* Docker image:
[`github/super-linter`](https://hub.docker.com/r/github/super-linter)
* Default stage: `static_tests`
* When: `always`

### Variables

| Name | Description | Default |
| ---- | ----------- | ------- |
| `TODO` | TODO | `TODO` |

### Artifacts

We use [Junit](https://junit.org/junit5/)'s XML report to display error report
directly in pipeline `Test` tab and in merge request widget.

!!! warning
    TODO: describe that the report isn't full right now. https://github.com/dhershman1/tap-junit/issues/30
+5 −0
Original line number Diff line number Diff line
name: super_linter
description: Simple combination of various linters, to help validate the quality of your source code.
default_stage: static_tests
icon: 
maintainer: thomasboni
+31 −0
Original line number Diff line number Diff line
# Job from go2scale hub --> hub.go2scale.io

stages:
  - static_tests

super-linter:
  stage: static_tests
  image:
    name: github/super-linter:v3
    entrypoint: [""]
  script:
    - /action/lib/linter.sh
  after_script:
    - npm install -g tap-junit@${TAP_JUNIT_VERSION}
    - mkdir $CONVERTED_REPORTS_FOLDER
    - cd $OUTPUT_FOLDER
    - for report in *; do
    -     cat $report | tap-junit > ${CONVERTED_REPORTS_FOLDER}/${report}.xml
    - done
  variables:
    RUN_LOCAL: "true"
    DEFAULT_WORKSPACE: $CI_BUILDS_DIR
    OUTPUT_FORMAT: "tap"
    OUTPUT_FOLDER: "super-linter.report"
    CONVERTED_REPORTS_FOLDER: "converted-xml.report"
    TAP_JUNIT_VERSION: "3.1.2"
  artifacts:
    reports:
      junit: "$CONVERTED_REPORTS_FOLDER/*.xml"
    expire_in: 30 days
  allow_failure: true
+1 −0
Original line number Diff line number Diff line
* Initial version