Skip to content

Commit 0c26d1a

Browse files
committed
[bugfix] Fix dependency-check-maven ossindex access in CI
1 parent fb30553 commit 0c26d1a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.circleci/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,24 @@ commands:
307307
- attach_workspace:
308308
at: C:\Users\circleci\project
309309

310+
create_maven_settings:
311+
steps:
312+
- run:
313+
name: Create Maven settings.xml
314+
command: |
315+
mkdir -p ~/.m2
316+
cat > ~/.m2/settings.xml <<EOF
317+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0">
318+
<servers>
319+
<server>
320+
<id>ossindex</id>
321+
<username>${OSSINDEX_USERNAME}</username>
322+
<password>${OSSINDEX_TOKEN}</password>
323+
</server>
324+
</servers>
325+
</settings>
326+
EOF
327+
310328
jobs:
311329
license-check:
312330
parameters:
@@ -429,6 +447,7 @@ jobs:
429447
compute_size: << parameters.compute_size >>
430448
- install_maven:
431449
compute_size: << parameters.compute_size >>
450+
- create_maven_settings:
432451
- restore_cache:
433452
keys:
434453
- << parameters.maven_cache_name_prefix >>-dependency-check-data-{{ checksum "/tmp/dependency-check-data/odc.mv.db" }}

elemental-parent/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
<nvdApiKeyEnvironmentVariable>NVD_API_KEY</nvdApiKeyEnvironmentVariable>
258258
<nvdApiServerId>nvd-api</nvdApiServerId>
259259

260+
<ossIndexServerId>ossindex</ossIndexServerId>
260261
<!-- The OSS Index Server (https://ossindex.sonatype.org) can sometimes be flaky -->
261262
<ossIndexWarnOnlyOnRemoteErrors>true</ossIndexWarnOnlyOnRemoteErrors>
262263

0 commit comments

Comments
 (0)