Skip to content

Commit

Permalink
Merge 11f4094 into fd46587
Browse files Browse the repository at this point in the history
  • Loading branch information
mmhw committed May 30, 2024
2 parents fd46587 + 11f4094 commit 8569734
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .changelog/4314.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where the `pre-commit` command would fail on simple repository of the missing `docker_native_image_config.json` file.
type: fix
pr_number: 4314
2 changes: 2 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ jobs:
source $(poetry env info --path)/bin/activate
cd content
rm -rf .pre-commit-config_template.yaml
rm -f Tests/docker_native_image_config.json
touch .private-repo-settings
demisto-sdk pre-commit --validate --show-diff-on-failure --verbose --mode=ci
- name: Upload artifacts
Expand Down
8 changes: 5 additions & 3 deletions demisto_sdk/commands/pre_commit/hooks/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
NativeImageConfig,
ScriptIntegrationSupportedNativeImages,
)
from demisto_sdk.commands.common.tools import logger
from demisto_sdk.commands.common.tools import is_external_repository, logger
from demisto_sdk.commands.content_graph.objects.integration_script import (
IntegrationScript,
)
Expand Down Expand Up @@ -114,8 +114,10 @@ def docker_tag_to_runfiles(
if obj:
for image in obj.docker_images:
tags_to_files[image].append((file, obj))

return with_native_tags(tags_to_files, docker_flags, docker_image)
if is_external_repository():
return tags_to_files
else:
return with_native_tags(tags_to_files, docker_flags, docker_image)


@functools.lru_cache(maxsize=512)
Expand Down

0 comments on commit 8569734

Please sign in to comment.