1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/src/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 remove semikolons 2019-05-23 14:28:32 +02:00
integration feat(newman): fetch xsuaa credentials in newman execution (#1325) 2020-06-12 10:04:03 +02:00
k8s Avoid NotSerializableException #3 (#1252) 2020-03-06 14:05:14 +01:00
mta Update MtaMultiplexer.groovy 2019-12-16 09:28:58 +01:00
tools/neo Merge remote-tracking branch 'github/master' into HEAD 2019-05-24 14:26:07 +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
API.groovy Improve 2019-01-23 10:16:11 +01:00
BashUtils.groovy Fix maven parameter handling (#1493) 2020-05-06 17:43:32 +02:00
BuildTool.groovy Fix injection of download cache parameters (#1605) 2020-05-27 18:20:10 +02:00
CfManifestUtils.groovy Implement workaround for incompatible change in cloud foundry API (#343) 2018-10-17 11:01:09 +02:00
CloudPlatform.groovy add multicloud deploy step 2019-04-12 17:51:38 +02:00
ConfigurationHelper.groovy Revert "ConfigurationLoader, ConfigurationHelper working without script reference" 2019-11-26 10:51:32 +01:00
ConfigurationLoader.groovy Revert "ConfigurationLoader, ConfigurationHelper working without script reference" 2019-11-26 10:51:32 +01:00
ConfigurationMerger.groovy fix NonCPS issues (#796) 2019-07-29 10:17:56 +02:00
ConfigurationType.groovy Enable configuration via yaml file + mavenExecute as example (#18) 2017-12-06 12:03:06 +01:00
DebugReport.groovy Add option to always run stages in a pod (#1414) 2020-04-17 10:31:04 +02:00
DefaultValueCache.groovy Reload default value cache also in case we have only customDefaultsFromFile present (#1612) 2020-05-28 21:07:30 +02:00
DeploymentType.groovy add multicloud deploy step 2019-04-12 17:51:38 +02:00
DescriptorUtils.groovy Rename dlang to dub (#762) 2019-07-03 11:27:07 +02:00
DockerUtils.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
DownloadCacheUtils.groovy Fix reading download cache variables on node (#1660) 2020-06-11 21:59:55 +02:00
EnvironmentUtils.groovy Added EnvironmentUtils needed by DebugReport 2020-02-03 17:07:56 +01:00
GenerateDocumentation.groovy Put GenerateDocumentation annotation inside groovy file 2019-01-23 16:19:34 +01:00
GenerateStageDocumentation.groovy Templates - Add advanced confirm stage (#720) 2019-05-22 10:42:59 +02:00
GitUtils.groovy [fix] Do not fail scanning for ChangeDocumentId/TransportRequestId in case of CR/LF 2019-11-22 16:38:03 +01:00
JenkinsUtils.groovy Revert to again use curl to download binary (#1637) 2020-06-10 10:11:20 +02:00
JsonUtils.groovy githubPublishRelease - ensure proper JSON encoding (#807) 2019-07-26 14:03:20 +02:00
MapUtils.groovy Clarify precedence in MapUtils#merge() (#983) 2019-11-14 14:33:23 +01:00
MtaUtils.groovy Update mta yaml file to support cloud MBT mtar deploy to neo. (#1198) 2020-02-20 14:57:50 +01:00
PiperGoUtils.groovy Revert to again use curl to download binary (#1637) 2020-06-10 10:11:20 +02:00
Prerequisites.groovy Fix codeclimate remarks 2018-11-05 12:59:40 +01:00
QualityCheck.groovy Add ReportAggregator to collect information about executed stages and create reports (#1291) 2020-03-21 18:42:27 +01:00
QualityCheckCategory.groovy Add ReportAggregator to collect information about executed stages and create reports (#1291) 2020-03-21 18:42:27 +01:00
ReportAggregator.groovy Adapt paths to pipeline_report debug_report and maven_settings templates (#1311) 2020-03-23 20:01:58 +01:00
SidecarUtils.groovy Handle sidecar parameters in dockerExecuteOnKubernetes (#869) 2019-09-12 10:52:05 +02:00
StepAssertions.groovy Improve neo deploy (#440) 2019-01-28 11:32:24 +01:00
Utils.groovy Enable use of customDefaults from Project Config also in Groovy (#1521) 2020-05-12 13:50:18 +02:00
WhitesourceConfigurationHelper.groovy Fix docker.includes in WhitesourceConfigurationHelper (#1666) 2020-06-15 17:02:28 +02:00