15
15
# SPDX-License-Identifier: Apache-2.0
16
16
# License-Filename: LICENSE
17
17
18
- stages :
18
+ stages :
19
19
- build
20
20
- deploy
21
21
- ort-scan
@@ -31,30 +31,30 @@ variables:
31
31
description : |
32
32
Project version number or release name (use the version from package metadata, not VCS revision).
33
33
By default, the Git short SHA is used.
34
- VCS_TYPE :
34
+ VCS_TYPE :
35
35
value : " git"
36
36
description : " Identifier of the project version control system (git, git-repo, mercurial or subversion)."
37
- VCS_URL :
37
+ VCS_URL :
38
38
value : " "
39
39
description : " VCS URL (clone URL) of project to scan."
40
- VCS_REVISION :
40
+ VCS_REVISION :
41
41
value : " "
42
42
description : |
43
43
SHA1 or tag to scan (not branch names, because they can move). If VCS_TYPE is 'git-repo',
44
44
SHA1 must be unabbreviated, tag names must be prefixed with 'refs/tags/'.
45
45
VCS_PATH :
46
46
value : " "
47
47
description : |
48
- Leave this field empty unless one of the following special cases applies: project VCS_TYPE is
48
+ Leave this field empty unless one of the following special cases applies: project VCS_TYPE is
49
49
git-repo - specify path to repo manifest file (e.g. olympia.xml,
50
- note VCS_URL must point to a manifest repository)
50
+ note VCS_URL must point to a manifest repository)
51
51
you require sparse checkout - specify repository sub-path to download and scan
52
52
(e.g. projects/gradle/, note sparse checkout is possible only for VCS_TYPE
53
53
git, mercurial or subversion)
54
54
ORT_CONFIG_FILE :
55
55
value : " "
56
56
description : |
57
- Path to repository configuration file relative to the VCS root.
57
+ Path to repository configuration file relative to the VCS root.
58
58
By default set to '.ort.yml'.
59
59
ORT_ALLOW_DYNAMIC_VERSIONS :
60
60
value : " "
@@ -95,10 +95,10 @@ variables:
95
95
description : |
96
96
If set to 'true', ORT's scanner will not run (no copyright holders and licenses scan).
97
97
By default set to 'false'.
98
- ORT_LOG_LEVEL :
98
+ ORT_LOG_LEVEL :
99
99
value : " "
100
100
description : |
101
- Set value to 'debug' to see additional debug output to help tracking down errors.
101
+ Set value to 'debug' to see additional debug output to help tracking down errors.
102
102
By default set to 'info'.
103
103
ORT_REVISION :
104
104
value : " "
@@ -111,16 +111,16 @@ variables:
111
111
ORT_USE_DEV_DB :
112
112
value : " false"
113
113
description : " Set to 'true' to download/upload scanned results from/to development database."
114
- REBUILD_DOCKER_IMAGE :
115
- value : " false"
114
+ REBUILD_DOCKER_IMAGE :
115
+ value : " false"
116
116
description : " Set value to 'true' in order to rebuild the Docker image."
117
117
ORT_URL : https://github.com/oss-review-toolkit/ort.git
118
118
FF_SCRIPT_SECTIONS : " true"
119
119
120
120
121
121
ort-scan :
122
122
stage : ort-scan
123
- image :
123
+ image :
124
124
name : " $ORT_DOCKER_IMAGE"
125
125
entrypoint : [""]
126
126
tags :
@@ -227,33 +227,33 @@ ort-scan:
227
227
228
228
# Create ~/.netrc file if NETRC_URL is set.
229
229
- |
230
- if [[ ! -z "$NETRC_URL" ]]; then
231
- ./scripts/setup-netrc.sh
230
+ if [[ ! -z "$NETRC_URL" ]]; then
231
+ ./scripts/setup-netrc.sh
232
232
fi
233
233
234
234
# Create ~/.ivy2/.credentials file if IVY_CREDS_URL is set.
235
235
- |
236
- if [[ ! -z "$IVY_CREDS_URL" ]]; then
237
- ./scripts/setup-ivy-credentials.sh
236
+ if [[ ! -z "$IVY_CREDS_URL" ]]; then
237
+ ./scripts/setup-ivy-credentials.sh
238
238
fi
239
239
240
240
# Workaround for maven cache.
241
241
- |
242
- if [[ -d "$MAVEN_REPO_LOCAL" ]]; then
242
+ if [[ -d "$MAVEN_REPO_LOCAL" ]]; then
243
243
mkdir -p ${HOME}/.m2/repository/
244
244
mv ${MAVEN_REPO_LOCAL}/* ${HOME}/.m2/repository/
245
245
fi
246
246
247
247
# Workaround for go cache.
248
248
- |
249
- if [[ -d "$GO_CACHE_LOCAL" ]]; then
249
+ if [[ -d "$GO_CACHE_LOCAL" ]]; then
250
250
mkdir -p ${GOPATH}/pkg/mod
251
251
mv ${GO_CACHE_LOCAL}/* ${GOPATH}/pkg/mod/
252
252
fi
253
253
254
254
- |
255
- if [[ ! -z "$ORT_REVISION" ]]; then
256
- ./scripts/setup-ort.sh
255
+ if [[ ! -z "$ORT_REVISION" ]]; then
256
+ ./scripts/setup-ort.sh
257
257
export ORT_CLI="$CI_PROJECT_DIR/bin/ort"
258
258
export ORTH="$CI_PROJECT_DIR/bin/orth"
259
259
fi
@@ -316,18 +316,18 @@ ort-scan:
316
316
317
317
# Workaround for maven cache.
318
318
- |
319
- if [[ -d "${HOME}/.m2/repository/" ]]; then
319
+ if [[ -d "${HOME}/.m2/repository/" ]]; then
320
320
mkdir -p $MAVEN_REPO_LOCAL
321
321
mv -f ${HOME}/.m2/repository/* $MAVEN_REPO_LOCAL
322
322
fi
323
323
324
324
# Workaround for go cache.
325
325
- |
326
- if [[ -d "${GOPATH}/pkg/mod/" ]]; then
326
+ if [[ -d "${GOPATH}/pkg/mod/" ]]; then
327
327
mkdir -p ${GO_CACHE_LOCAL}
328
328
mv ${GOPATH}/pkg/mod/* ${GO_CACHE_LOCAL}
329
329
fi
330
-
330
+
331
331
- export JOB_FINISHED_AT=$(date +"%Y-%m-%dT%H:%M:%S%z")
332
332
333
333
# Create metadata.json which can be used to reproduce the scan
@@ -365,7 +365,7 @@ ort-build-image:
365
365
- export ORT_SCANCODE_VERSION=${ORT_SCANCODE_VERSION:-"30.1.0"}
366
366
- apk add --no-cache git
367
367
- |
368
- if [[ -z "$ORT_REVISION" ]]; then
368
+ if [[ -z "$ORT_REVISION" ]]; then
369
369
echo "Building the vanilla ORT docker image 'ort'..."
370
370
git clone --depth 1 --shallow-submodules --recurse-submodules $ORT_URL
371
371
cd ort
@@ -414,7 +414,7 @@ pages:
414
414
image : node:lts
415
415
tags :
416
416
- docker
417
- script :
417
+ script :
418
418
- cd dashboard
419
419
- yarn install
420
420
- yarn build
@@ -424,7 +424,7 @@ pages:
424
424
rules :
425
425
- if : $CI_PIPELINE_SOURCE == "web" && $DEPLOY_PAGES == "true"
426
426
- if : $CI_PIPELINE_SOURCE == "merge_request_event" && "$CI_COMMIT_REF_NAME" == "$CI_DEFAULT_BRANCH"
427
- changes :
427
+ changes :
428
428
- dashboard/**/*
429
429
artifacts :
430
430
paths :
0 commit comments