You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
IamTheFij becc9bf0b1 Add personal image with hadolint 1 week ago
scripts Add personal image with hadolint 1 week ago
tests Add tests 1 week ago
.drone.yml Add personal image with hadolint 1 week ago
.pre-commit-config.yaml Add tests 1 week ago
Dockerfile Initial commit 1 week ago
Dockerfile.personal Add personal image with hadolint 1 week ago
LICENSE Initial commit 1 week ago
Makefile Add personal image with hadolint 1 week ago
Readme.md Add personal image with hadolint 1 week ago

Readme.md

drone-pre-commit

A pre-commit plugin, for the drone.io project, which allows you to run pre-commit checks as part of your build steps.

Examples

An example configuration would be as follows:

steps:
  - name: run checks
    image: iamthefij/drone-pre-commit:latest

Or, if you have additional dependencies to install

steps:
  - name: run ruby dependent checks
    image: iamthefij/drone-pre-commit:latest
    commands:
      - apt-get update
      - apt-get install -y --no-install-recommends ruby
      # You must run your own pre-commit command at the end
      - pre-commit run --all-files

Personal image

A second image is also built for my personal use, but it may be useful to you as well. This image includes the following dependencies:

  • hadolint

To Do

So far this is basic and unopinionated. Either this will become very personal as I tack on dependencies for the hooks I often use, or it’ll become complicated as I add args for everything and build out many tags. I think I’ll probbably try to provide some reasonable base image that can then be extended in a new image or as part of one’s build pipeline.