diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-05-30 11:50:04 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-05-30 11:50:05 +0000 |
| commit | 330541fe6c913f39b99bfab74bce3a968bdbeadf (patch) | |
| tree | ec0288f01205cd71a9662f4eb41e1eb4ce86333c /tools/validate-install-command.sh | |
| parent | b397cd72e1d343b1d58b82ea3ff32f58bfcb6440 (diff) | |
| parent | eb1bfc2c2e157e90a57f2a0f5186db0dea4c3909 (diff) | |
| download | kolla-330541fe6c913f39b99bfab74bce3a968bdbeadf.tar.gz kolla-330541fe6c913f39b99bfab74bce3a968bdbeadf.zip | |
Merge "Add support to lint the install commands in Dockerfiles"
Diffstat (limited to 'tools/validate-install-command.sh')
| -rwxr-xr-x | tools/validate-install-command.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/validate-install-command.sh b/tools/validate-install-command.sh new file mode 100755 index 000000000..bc7409690 --- /dev/null +++ b/tools/validate-install-command.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +RES=0 + +for dockerfile in "$@"; do + if grep "apt-get install\|yum install" "$dockerfile"; then + echo "ERROR: $dockerfile has incorrectly formatted install command Should be in the form 'apt-get|yum -y install ...'" >&2 + RES=1 + fi +done + +exit $RES |
