Commit f134eec3 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '64-dockerfile-lint-no-longer-maintained' into 'master'

Draft: Resolve "dockerfile-lint no longer maintained"

Closes #64

See merge request to-be-continuous/docker!98
parents b2910e05 471e63b8
Loading
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -239,20 +239,6 @@ Here are some advices about your **secrets** (variables marked with a :lock:):

## Jobs

### `docker-lint` job

This job performs a [Lint](https://github.com/projectatomic/dockerfile_lint) on your `Dockerfile`.

It is bound to the `build` stage, and uses the following variables:

| Name                  | Description                            | Default value                           |
| --------------------- | -------------------------------------- | --------------------------------------- |
| `DOCKER_LINT_ENABLED` | Set to `true` to enable dockerlint | _(none: disabled by default)_ |
| `DOCKER_LINT_IMAGE`   | The dockerlint image                   | `registry.hub.docker.com/projectatomic/dockerfile-lint:latest`  |
| `DOCKER_LINT_ARGS`    | Additional `dockerfile_lint` arguments | _(none)_                                |

In case you have to disable some rules, copy and edit the [rules](https://github.com/projectatomic/dockerfile_lint#extending-and-customizing-rule-files) into `mycustomdockerlint.yml` and set `DOCKER_LINT_ARGS: '-r mycustomdockerlint.yml'`

### `docker-hadolint` job

This job performs a [Lint](https://github.com/hadolint/hadolint) on your `Dockerfile`.
+0 −18
Original line number Diff line number Diff line
@@ -116,24 +116,6 @@
    }
  ],
  "features": [
    {
      "id": "lint",
      "name": "dockerfile-lint",
      "description": "This job performs a [Lint](https://github.com/projectatomic/dockerfile_lint) on your `Dockerfile`.",
      "enable_with": "DOCKER_LINT_ENABLED",
      "variables": [
        {
          "name": "DOCKER_LINT_IMAGE",
          "description": "The docker image to lint your Dockerfile",
          "default": "registry.hub.docker.com/projectatomic/dockerfile-lint:latest"
        },
        {
          "name": "DOCKER_LINT_ARGS",
          "description": "Additional `dockerfile_lint` arguments",
          "advanced": true
        }
      ]
    },
    {
      "id": "hadolint",
      "name": "Hadolint",
+0 −14
Original line number Diff line number Diff line
@@ -59,7 +59,6 @@ variables:
  # variabilized tracking image
  TBC_TRACKING_IMAGE: "$CI_REGISTRY/to-be-continuous/tools/tracking:master"

  DOCKER_LINT_IMAGE: "registry.hub.docker.com/projectatomic/dockerfile-lint:latest"
  DOCKER_HADOLINT_IMAGE: "registry.hub.docker.com/hadolint/hadolint:latest-alpine"
  DOCKER_IMAGE: "registry.hub.docker.com/library/docker:latest"
  DOCKER_DIND_IMAGE: "registry.hub.docker.com/library/docker:dind"
@@ -531,19 +530,6 @@ stages:
# ==================================================
# Stage: build
# ==================================================
# lint-job is used to check the syntax of the Dockerfile for best practices.
docker-lint:
  image: "$DOCKER_LINT_IMAGE"
  extends: .docker-base
  stage: build
  dependencies: []
  script:
    - dockerfile_lint -f $DOCKER_FILE $DOCKER_LINT_ARGS
  rules:
    # disable if DOCKER_LINT_ENABLED not set
    - if: '$DOCKER_LINT_ENABLED != "true"'
      when: never
    - !reference [.test-policy, rules]

docker-hadolint:
  image: