Skip to content

Commit

Permalink
fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
liorblob committed Mar 19, 2019
1 parent c6e2d66 commit 4287c72
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/scripts/hook_validations/image.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import glob

from Tests.test_utils import *
from Tests.test_utils import re, print_error, os, get_yaml
from Tests.scripts.constants import IMAGE_REGEX, INTEGRATION_REGEX, INTEGRATION_YML_REGEX


Expand Down Expand Up @@ -73,5 +73,6 @@ def is_existing_image(self):
if not (is_image_in_package or is_image_in_yml):
print_error("You have failed to add an image in the yml/package for {}".format(self.file_path))
self._is_valid = False
return False

return True
13 changes: 13 additions & 0 deletions Tests/scripts/validate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ def validate_modified_files(self, modified_files):
if not image_validator.is_valid():
self._is_valid = False

description_validator = DescriptionValidator(file_path)
if not description_validator.is_valid():
self._is_valid = False

integration_validator = IntegrationValidator(file_path, old_file_path=old_file_path)
if not integration_validator.is_backward_compatible():
self._is_valid = False
Expand Down Expand Up @@ -212,6 +216,15 @@ def validate_added_files(self, added_files):
if not image_validator.is_valid():
self._is_valid = False

description_validator = DescriptionValidator(file_path)
if not description_validator.is_valid():
self._is_valid = False

elif re.match(IMAGE_REGEX, file_path, re.IGNORECASE):
image_validator = ImageValidator(file_path)
if not image_validator.is_valid():
self._is_valid = False

def validate_no_secrets_found(self, branch_name):
"""Check if any secrets are found in your change set.
Expand Down

0 comments on commit 4287c72

Please sign in to comment.