Skip to content

Commit 03484f1

Browse files
committed
Use the new YAML ORT configuration file instead of HOCON
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 324e41e commit 03484f1

File tree

4 files changed

+68
-81
lines changed

4 files changed

+68
-81
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ ort-scan:
145145

146146
ORT_ADVISOR_PROVIDERS: "OSV"
147147

148-
ORT_CLI_CONFIG_FILE: "${CI_PROJECT_DIR}/ort.conf"
148+
ORT_CLI_CONFIG_FILE: "${CI_PROJECT_DIR}/config.yml"
149149

150150
ORT_CONFIG_DIR: "ort-configuration"
151151
ORT_CONFIG_COPYRIGHT_GARBAGE_FILE: "${ORT_CONFIG_DIR}/copyright-garbage.yml"

scripts/config.yml.template

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
ort:
2+
licenseFilePatterns:
3+
licenseFilenames: [
4+
'copying*',
5+
'copyright',
6+
'licence*',
7+
'*.licence',
8+
'license*',
9+
'*.license',
10+
'unlicence',
11+
'unlicense'
12+
]
13+
14+
patentFilenames: [
15+
'patents'
16+
]
17+
18+
rootLicenseFilenames: [
19+
'readme*'
20+
]
21+
22+
severeIssueThreshold: $ORT_SEVERE_ISSUE_THRESHOLD
23+
severeRuleViolationThreshold: $ORT_SEVERE_RULE_VIOLATION_THRESHOLD
24+
25+
enableRepositoryPackageCurations: $ORT_ENABLE_REPOSITORY_PACKAGE_CURATIONS
26+
enableRepositoryPackageConfigurations: $ORT_ENABLE_REPOSITORY_PACKAGE_CONFIGURATIONS
27+
28+
scanner:
29+
archive:
30+
fileStorage:
31+
localFileStorage:
32+
directory: ~/.ort/scanner/archive
33+
compression: false
34+
35+
$ORT_POSTGRES
36+
37+
options:
38+
ScanCode:
39+
commandLine: $ORT_SCANCODE_CLI_PARAMS
40+
parseLicenseExpressions: $ORT_SCANCODE_PARSE_LICENSE_EXPRESSIONS
41+
minVersion: $ORT_SCANCODE_MIN_VERSION
42+
maxVersion: $ORT_SCANCODE_MAX_VERSION
43+
44+
storages:
45+
local:
46+
backend:
47+
localFileStorage:
48+
directory: ~/.ort/scanner/results
49+
compression: false
50+
51+
$ORT_POSTGRES
52+
53+
storageReaders: ['$ORT_STORAGE_READERS']
54+
storageWriters: ['$ORT_STORAGE_WRITERS']
55+
56+
ignorePatterns: [
57+
'**/*.ort.yml',
58+
'**/META-INF/DEPENDENCIES'
59+
]

scripts/ort.conf.tmpl

Lines changed: 0 additions & 71 deletions
This file was deleted.

scripts/setup-ort-cli-config.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#!/bin/bash -e
22

3-
# Create HOCON configuration file used by ORT.
3+
# Create the YAML configuration file used by ORT.
44

55
ORT_POSTGRES=$(cat <<-END
6-
postgresStorage {
7-
url = "$ORT_DB_URL"
8-
schema = "public"
9-
username = "$ORT_POSTGRES_USERNAME"
10-
password = "$ORT_POSTGRES_PASSWORD"
11-
sslmode = "require"
12-
}
6+
postgresStorage:
7+
url: '$ORT_DB_URL'
8+
schema: 'public'
9+
username: '$ORT_POSTGRES_USERNAME'
10+
password: '$ORT_POSTGRES_PASSWORD'
11+
sslmode: 'require'
1312
END
1413
)
1514

@@ -29,4 +28,4 @@ else
2928
ORT_POSTGRES=""
3029
fi
3130

32-
envsubst < $CI_PROJECT_DIR/scripts/ort.conf.tmpl > $ORT_CLI_CONFIG_FILE
31+
envsubst < $CI_PROJECT_DIR/scripts/config.yml.template > $ORT_CLI_CONFIG_FILE

0 commit comments

Comments
 (0)