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

Added bitbucket template + Fix icon in console logs #2617

Merged
merged 8 commits into from May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -25,6 +25,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Deprecate misspell, as it is not maintained since 2018
- Jscpd: Do not output HTML reports if REPORT_OUTPUT_FOLDER is none
- kubeconform: Simplify installation and get latest version
- Updated cases in console/log output to use ⚠ `Warning Sign (U+26A0)` instead of ◬ `White Up-Pointing Triangle with Dot (U+25EC)`

- Reporters
- Enhancements and fixes on Gitlab Comment Reporter
Expand Down Expand Up @@ -59,6 +60,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Documentation
- Apply many updates after the use of [Vale](https://vale.sh/) on MegaLinter own sources and docs
- Remove ASCII characters from linters helps displayed in MegaLinter documentation
- Add instructions to install MegaLinter on Bitbucket Pipelines

- Linter versions upgrades
- [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 0.76.1 to **0.76.2** on 2023-04-04
Expand Down
22 changes: 22 additions & 0 deletions README.md
Expand Up @@ -89,6 +89,7 @@ _Github PR reporter_
- [GitHub Action](#github-action)
- [GitLab CI](#gitlab-ci)
- [Azure Pipelines](#azure-pipelines)
- [Bitbucket Pipelines](#bitbucket-pipelines)
- [Jenkins](#jenkins)
- [Concourse](#concourse)
- [Pipeline step](#pipeline-step)
Expand Down Expand Up @@ -549,6 +550,27 @@ Add the following job in your `azure-pipelines.yaml` file

To benefit from Pull Request comments, please follow [configuration instructions](https://github.com/oxsecurity/megalinter/tree/main/docs/reporters/AzureCommentReporter.md)

### Bitbucket Pipelines

1. Create a `bitbucket-pipelines.yml` file on the root directory of your repository

2. Copy and paste the following template or add the step to your existing pipeline.

```yaml
image: atlassian/default-image:3
pipelines:
default:
- parallel:
- step:
name: Run MegaLinter
image: oxsecurity/megalinter:v6
script:
- export DEFAULT_WORKSPACE=$BITBUCKET_CLONE_DIR && bash /entrypoint.sh
artifacts:
- megalinter-reports/**
```


### Jenkins

Add the following stage in your Jenkinsfile
Expand Down
21 changes: 21 additions & 0 deletions docs/installation.md
Expand Up @@ -338,6 +338,27 @@ resources:
# VALIDATE_ALL_CODEBASE: true
```

## Bitbucket Pipeline

1. Create a `bitbucket-pipelines.yml` file on the root directory of your repository

2. Copy and paste the following template or add the step to your existing pipeline.

```yaml
image: atlassian/default-image:3

pipelines:
default:
- parallel:
- step:
name: Run MegaLinter
image: oxsecurity/megalinter
script:
- export DEFAULT_WORKSPACE=$BITBUCKET_CLONE_DIR && bash /entrypoint.sh
artifacts:
- megalinter-reports/**
```

## Drone CI

**Warning: Drone CI support is experimental and is undergoing heavy modifications (see issue [#2047](https://github.com/oxsecurity/megalinter/issues/2047)).**
Expand Down
2 changes: 1 addition & 1 deletion megalinter/MegaLinter.py
Expand Up @@ -856,7 +856,7 @@ def check_results(self):
self.check_updated_sources_failure()
elif self.status == "warning":
logging.warning(
c.yellow(" Successfully linted all files, but with ignored errors")
c.yellow("⚠️ Successfully linted all files, but with ignored errors")
)
config.delete(self.request_id)
self.check_updated_sources_failure()
Expand Down
2 changes: 1 addition & 1 deletion megalinter/reporters/ConsoleReporter.py
Expand Up @@ -70,7 +70,7 @@ def produce_report(self):
status = (
"✅"
if linter.status == "success" and linter.return_code == 0
else ""
else "⚠️"
if linter.status != "success" and linter.return_code == 0
else "❌"
)
Expand Down