Skip to content

A CircleCI Orb of Megalinter. Able to run multiple linters in one workflow

License

Notifications You must be signed in to change notification settings

KubeArchitect/circleci-megalinter-orb

Repository files navigation

CircleCI MegaLinter Orb

CircleCI Build Status GitHub License CircleCI Community

Environment Variables

The following environment variables must be configured:

Variable Description Required
DOCKERHUB_USERNAME Docker Hub username for pulling MegaLinter image Yes
DOCKERHUB_PASSWORD Docker Hub password for pulling MegaLinter image Yes
GITHUB_TOKEN GitHub token for MegaLinter GitHub integration Yes

Orb Parameters

The following parameters can be configured when using the orb:

General Parameters

Parameter Description Default Required
resource_class The resource class to use for the jobs (see resource classes) medium No
tag Choose a specific tag of megalinter (see available tags) latest No
flavor Choose a specific flavor of megalinter (see available flavors) "" No
github_token GitHub token to use for the reporters in megalinter GITHUB_TOKEN No
parallelism Number of parallel executors to use 1 No
persist_megalinter_reports Whether to persist the megalinter-reports folder for use in subsequent jobs true No
entrypoint Change entrypoint of megalinter "/entrypoint.sh" No

Security Notes

  • GitHub Token: Use a token with minimal required permissions (read-only access recommended)
  • Docker Hub: Consider using a restricted access token instead of password
  • For CircleCI security best practices, see Using Contexts

Resources

CircleCI Orb Registry Page - The official registry page of this orb for all versions, executors, commands, and jobs described.

CircleCI Orb Docs - Docs for using, creating, and publishing CircleCI Orbs.

All examples are shown in the examples folder

How to Contribute

We welcome issues and pull requests against this repository!

Contribution Guidelines

  1. Fork and clone the repository
  2. Create a new branch for your changes
  3. Make your changes following our coding standards
  4. Test your changes locally
  5. Submit a pull request with a clear description of the changes

For more details, see our Contributing Guide.

How to Publish an Update

  1. Merge pull requests with desired changes to the main branch.
  2. Find the current version of the orb.
    • You can run circleci orb info RelativeSure/megalinter | grep "latest" to see the current version.
  3. Create a new release on GitHub.
    • Click "Choose a tag" and create a new semantically versioned tag. (ex: v1.0.0)
      • We will have an opportunity to change this before we publish if needed after the next step.
    • Click "+ Auto-generate release notes".
    • This will create a summary of all of the merged pull requests since the previous release.
    • If you have used Conventional Commit Messages it will be easy to determine what types of changes were made, allowing you to ensure the correct version tag is being published.
  4. Now ensure the version tag selected is semantically accurate based on the changes included.
  5. Click "Publish Release".
    • This will push a new tag and trigger your publishing pipeline on CircleCI.

Development Orbs

Prerequisites:

  • An initial semver deployment must be performed in order for development orbs to be published and seen in the Orb Registry.

A Development Orb can be created to help with rapid development or testing. To create a development orb, change the orb-tools/publish job in test-deploy.yml to be the following:

- orb-tools/publish:
    orb_name: RelativeSure/megalinter
    vcs_type: << pipeline.project.type >>
    pub_type: dev
    # Ensure this job requires all test jobs and the pack job.
    requires:
      - orb-tools/pack
      - megalinter/run
    context: < organization context >
    filters: *filters

About

A CircleCI Orb of Megalinter. Able to run multiple linters in one workflow

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages