1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/resources/metadata/hadolint.yaml
Christopher Fenner 81c8553d6a
refactor(hadolint): implement step in GO (#1169)
* initial commit of yaml file

* initial commit for HaDoLint in GO

* add helper function to load file from url

* load config file

* write report information to disk

* comment the code

* refactor groovy code

* remove download function from FileUtils

* use http.Downloader

* rename step files

* update generated files

* update generated files

* remove duplicate commands

* add credentials for config url

* add generated test file

* reuse piperExecuteBin functions

* correct step name

* update go step

* deactivate test

* fix import

* use differing go step name

* rename step

* correct result publishing

* correct command name

* expose tls insecure flag

* hand through error

* disable tls verification

* fix tls disabling

* use credentials

* mow

* reformat

* add qgate only if set

* correct report name

* remove old defaults

* add qgate to defaults

* handle report name

* restore default

* remove unused step config

* use piperExecuteBin

* remove obsolete type

* add test cases

* remove groovy tests

* move client parameter handling to run function

* use custom interfaces and mockery

* remove commented code

* correct struct names

* rename parameter dockerfile

* add further asserts

* cleanup

* change file permission to read/write

* remove tokenize

* add further comments

* init http client only if necessary

* add todo

* Revert "rename parameter dockerfile"

This reverts commit 2a570685b8.

* add alias for dockerfile parameter

* correct test case

* Apply suggestions from code review

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* add comment about mock assertions

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-16 15:14:54 +01:00

79 lines
2.9 KiB
YAML

metadata:
name: hadolintExecute
description: Executes the Haskell Dockerfile Linter which is a smarter Dockerfile linter that helps you build [best practice](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) Docker images.
longDescription: |-
Executes the Haskell Dockerfile Linter which is a smarter Dockerfile linter that helps you build [best practice](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/) Docker images.
The linter is parsing the Dockerfile into an abstract syntax tree (AST) and performs rules on top of the AST.
spec:
inputs:
secrets:
- name: configurationCredentialsId
type: jenkins
description: Jenkins 'Username with password' credentials ID containing username/password for access to your remote configuration file.
params:
- name: configurationUrl
type: string
description: URL pointing to the .hadolint.yaml exclude configuration to be used for linting. Also have a look at `configurationFile` which could avoid central configuration download in case the file is part of your repository.
mandatory: false
scope:
- PARAMETERS
- STAGES
- STEPS
default: null
- name: configurationUsername
type: string
description: The username to authenticate
scope:
- PARAMETERS
- STAGES
- STEPS
secret: true
resourceRef:
- name: configurationCredentialsId
type: secret
param: username
- name: configurationPassword
type: string
description: The password to authenticate
scope:
- PARAMETERS
- STAGES
- STEPS
secret: true
resourceRef:
- name: configurationCredentialsId
type: secret
param: password
- name: dockerFile
aliases:
- name: dockerfile
type: string
description: Dockerfile to be used for the assessment.
mandatory: false
scope:
- GENERAL
- PARAMETERS
- STAGES
- STEPS
default: ./Dockerfile
- name: configurationFile
type: string
description: Name of the configuration file used locally within the step. If a file with this name is detected as part of your repo downloading the central configuration via `configurationUrl` will be skipped. If you change the file's name make sure your stashing configuration also reflects this.
mandatory: false
scope:
- PARAMETERS
- STAGES
- STEPS
default: .hadolint.yaml
- name: reportFile
type: string
description: Name of the result file used locally within the step.
scope:
- PARAMETERS
- STAGES
- STEPS
default: hadolint.xml
containers:
- name: hadolint
image: hadolint/hadolint:latest-debian