This Drone plugin uses the Qodana JVM Community linter and makes it compatible with Drone.
Go to file
Jim Martens fc07fb3e3d Added gitignore 2023-10-31 12:47:59 +01:00
hooks Back to working order 2023-08-03 19:36:49 +02:00
.gitignore Added gitignore 2023-10-31 12:47:59 +01:00
Dockerfile Fix Dockerfile 2023-08-03 13:59:13 +02:00
LICENSE Initial commit 2023-08-03 13:03:45 +02:00
README.md Improved README 2023-08-03 18:34:48 +02:00
tool.sh Don't overwrite gradle user home 2023-08-03 18:39:08 +02:00

README.md

Qodana JVM Community Drone plugin

Apache 2.0 License Docker image version

This Drone plugin uses the Qodana JVM Community linter and makes it compatible with Drone.

Usage

- name: Step name
  image: 2martens/qodana-jvm-community-drone-plugin
  settings:
    qodana_token: <qodana-cloud-token>
    args: <args>

To use the quality gate feature, add --fail-threshold <number> to the args setting.

To use baseline feature, add --baseline qodana.sarif.json to the args setting. This file has to be checked-in to the root of your project.

Example pipeline

This example pipeline uses host volumes and has to be trusted. The Qodana docker stores the cache under /data/cache in the container and this pipeline makes sure that this cache is stored on the host instead.

kind: pipeline
name: default
type: docker

platform:
  os: linux
  arch: arm64

clone:
  skip_verify: true

steps:
  - name: run code analysis
    pull: always
    image: 2martens/qodana-jvm-community-drone-plugin:2023.2
    settings:
      qodana_token:
        from_secret: qodana_token
      args: --baseline qodana.sarif.json --fail-threshold 0
    volumes:
      - name: cache
        path: /data/cache

volumes:
  - name: cache
    host:
      path: /var/lib/drone/cache