1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/test/groovy/com/sap/piper
Alexander Link a864cf0f60
Fix docker.includes in WhitesourceConfigurationHelper (#1666)
* Fix docker.includes in WhitesourceConfigurationHelper

Not sure, but it seems the [`docker.includes` parameter](https://whitesource.atlassian.net/wiki/spaces/WD/pages/804814917/Unified+Agent+Configuration+File+and+Parameters#UnifiedAgentConfigurationFileandParameters-DockerImages) needs to be a regex.

Our pipeline is failing with:
```
10:22:33  [ERROR] [2020-06-15 08:22:33,740 +0000] - Resolve DockerEntity Exception Dangling meta character '*' near index 0
10:22:33  *.tar
10:22:33  ^
10:22:33  [DEBUG] [2020-06-15 08:22:33,743 +0000] - Resolve DockerEntity Exception {}
10:22:33  java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
10:22:33  *.tar
10:22:33  ^
10:22:33  	at java.base/java.util.regex.Pattern.error(Unknown Source)
10:22:33  	at java.base/java.util.regex.Pattern.sequence(Unknown Source)
10:22:33  	at java.base/java.util.regex.Pattern.expr(Unknown Source)
10:22:33  	at java.base/java.util.regex.Pattern.compile(Unknown Source)
10:22:33  	at java.base/java.util.regex.Pattern.<init>(Unknown Source)
10:22:33  	at java.base/java.util.regex.Pattern.compile(Unknown Source)
10:22:33  	at org.whitesource.utils.WssStringUtils.isMatchingPattern(WssStringUtils.java:49)
10:22:33  	at org.whitesource.agent.dependency.resolver.docker.DockerResolver.filterTarImagesToScan(DockerResolver.java:296)
10:22:33  	at org.whitesource.agent.dependency.resolver.docker.DockerResolver.resolveDockerEntities(DockerResolver.java:186)
10:22:33  	at org.whitesource.fs.scanOrigins.DockerEntityScanOrigin.scan(DockerEntityScanOrigin.java:66)
10:22:33  	at org.whitesource.fs.scanOrigins.ScanOrigin.runOriginScan(ScanOrigin.java:36)
10:22:33  	at org.whitesource.fs.FileSystemAgent.createProjects(FileSystemAgent.java:132)
10:22:33  	at org.whitesource.fs.Main.scanAndSend(Main.java:157)
10:22:33  	at org.whitesource.fs.Main.main(Main.java:102)
10:22:33  [WARN] [2020-06-15 08:22:33,744 +0000] - Resolve DockerEntity Exception Dangling meta character '*' near index 0
10:22:33  *.tar
10:22:33  ^
```

* Switch docker.includes to slashy string

* Fix docker includes pattern in tests

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: D070410 <srinikitha.kondreddy@sap.com>
2020-06-15 17:02:28 +02:00
..
analytics feat(sonar): write flag for sonar execution to influx (#1534) 2020-05-14 13:46:40 +02:00
cm commonPipelineEnvironment: add propertiesMap (#526) 2019-04-10 10:56:36 +02:00
integration feat(newman): fetch xsuaa credentials in newman execution (#1325) 2020-06-12 10:04:03 +02:00
k8s remove semikolons 2019-05-23 14:28:32 +02:00
mta Test platform interoperability 2019-12-16 10:03:34 +01:00
tools/neo Add extensions to neoDeploy 2019-05-16 09:13:23 +02:00
variablesubstitution Fix: yaml util handling for boolean with value false (#1629) 2020-06-04 06:03:12 +02:00
versioning Fix maven parameter handling (#1493) 2020-05-06 17:43:32 +02:00
BashUtilsTest.groovy Improve neo deploy (#440) 2019-01-28 11:32:24 +01:00
CfManifestUtilsTest.groovy Implement workaround for incompatible change in cloud foundry API (#343) 2018-10-17 11:01:09 +02:00
ConfigurationHelperTest.groovy Revert "ConfigurationLoader, ConfigurationHelper working without script reference" 2019-11-26 10:51:32 +01:00
ConfigurationLoaderTest.groovy Revert "ConfigurationLoader, ConfigurationHelper working without script reference" 2019-11-26 10:51:32 +01:00
ConfigurationMergerTest.groovy use new config handler in steps (#253) 2018-08-15 11:53:28 +02:00
DebugReportTest.groovy Add option to always run stages in a pod (#1414) 2020-04-17 10:31:04 +02:00
DescriptorUtilsTest.groovy Patch Urls (#929) 2019-11-11 17:40:23 +01:00
DockerUtilsTest.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
EnvironmentUtilsTest.groovy Added EnvironmentUtils needed by DebugReport 2020-02-03 17:07:56 +01:00
GitUtilsTest.groovy Better readable rule names: loggingRule 2019-01-23 14:54:50 +01:00
JenkinsUtilsTest.groovy Protecode as GoLang (#1119) 2020-02-06 16:16:34 +01:00
MapUtilsTest.groovy Clarify precedence in MapUtils#merge() (#983) 2019-11-14 14:33:23 +01:00
MtaUtilsTest.groovy Update mta yaml file to support cloud MBT mtar deploy to neo. (#1198) 2020-02-20 14:57:50 +01:00
PiperGoUtilsTest.groovy Revert to again use curl to download binary (#1637) 2020-06-10 10:11:20 +02:00
PrerequisitesTest.groovy Better readable rule names: loggingRule 2019-01-23 14:54:50 +01:00
UtilsTest.groovy Ignore invalid entries in custom defaults (#1558) 2020-05-18 10:59:02 +02:00
WhitesourceConfigurationHelperTest.groovy Fix docker.includes in WhitesourceConfigurationHelper (#1666) 2020-06-15 17:02:28 +02:00