Commit Graph

6 Commits (79c0dd49cbb89f918778f85b83b250f15eb64c1f)

Author SHA1 Message Date
Dincer Celik e21a142111 Make tools bash compatible
Change-Id: Iccccc91b0a44f92bcbb2442638a93e7624da112b
3 years ago
Martin André 378a16c357 Add script to check for forbidden instructions
When building images for binary type, it is expected to not install
executables from untrusted sources, and gem, sensu-install, npm or
pip packages for instance should come from the distro itself.

This commit adds a `` script that checks for
forbidden commands in the rendered Dockerfile templates for the binary
type builds and hooks this script with the pep8 CI job.

The output is just informative for now until we've fixed the culprit
Dockerfiles, then we'll make the script return an error code and with
the ability to fail the pep8 CI check. This should prevent unwanted
commands from entering binary type Dockerfiles.

Change-Id: I66e54bd18f4256cdca6c0c50626de4f975c246b8
4 years ago
Zuul b1796384f7 Merge "Validate Dockerfile indentation in pep8" 5 years ago
Jeffrey Zhang 898caa8c4c Make validate-all-dockerfile work with python3
Change-Id: I9895c958a4cea91fca014d8f28f448a00b2ae02c
5 years ago
Martin André 3364720f34 Validate Dockerfile indentation in pep8
Delegate code style validation to computers, they're better than human
at it :)

This commit adds a new `tools/` script that
errors when it finds an indented Dockerfile instruction, and enables
the validation in the pep8 check.

Also adjust the logic of `tools/` so that it
doesn't stop on first errors but instead shows all of them.

Fixes the remaining indentations in Dockerfiles.

Change-Id: I53c0d38304cb4f6d64a5dfab67f70d69b3eae587
6 years ago
Swapnil Kulkarni (coolsvap) eb1bfc2c2e Add support to lint the install commands in Dockerfiles
Change-Id: Icb47ba8b13b13889e28bb285321f11344400edc2
7 years ago