component-detection
component-detection copied to clipboard
Scanning of files that aren't really Dockerfiles is causing errors
After the upgrade to version 0.197.26 of AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask
, component detection is causing it to fail when attempting to scan files that are named like a Dockerfile but aren't really Dockerfiles.
An example of such a file is https://github.com/dotnet/dotnet-docker/blob/main/eng/dockerfile-templates/Dockerfile.linux.copy-files. It's a template file, not an actual Dockerfile that gets built. But component detection is finding this file and attempting to parse it, leading to this error:
[INFO] Finding components...
[INFO] Starting enumeration of /mnt/vss/_work/1
[INFO] Enumerated 2129 files and 1025 directories in 00:00:00.0722318
[INFO] No instructions received to scan docker images.
[INFO] Discovered dockerfile: /mnt/vss/_work/1/s/dotnet-dotnet-docker/eng/dockerfile-templates/Dockerfile.linux.copy-files
[INFO] No compatible Conda installation found on system. Conda detection will not run.
[ERROR] There was an unexpected error:
[ERROR] SafelyExecute logged ParseException: Parsing failure: unexpected '{'; expected A or C or E or F or H or L or M or O or R or S or U or V or W (Line 1, Column 1); recently consumed:
##[error]Encountered an error while generating the manifest.
##[error]Error details: Component detector failed. Result: Error.
##[error]Manifest generation failed, please check output file for more info.
This is using CD version 1.2.0
Closed in #217