Skip to content

Commit e67ae3e

Browse files
committed
gitlab-ci: Make Dockerfile path configurable
As ORT will soon have multiple Dockerfiles, see [1]. [1]: oss-review-toolkit/ort#4746 Signed-off-by: Thomas Steenbergen <[email protected]>
1 parent 3db23cf commit e67ae3e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ ort-build-image:
347347
before_script:
348348
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
349349
script:
350+
- export ORT_DOCKERFILE_FILE=${ORT_DOCKERFILE_FILE:-"./Dockerfile"}
350351
- export ORT_SCANCODE_VERSION=${ORT_SCANCODE_VERSION:-"30.1.0"}
351352
- apk add --no-cache git
352353
- |
@@ -375,7 +376,7 @@ ort-build-image:
375376
--build-arg ORT_URL="$ORT_URL"
376377
--build-arg BUILDKIT_INLINE_CACHE=1
377378
--build-arg SCANCODE_VERSION="$ORT_SCANCODE_VERSION"
378-
-f ./Dockerfile .
379+
-f $ORT_DOCKERFILE_FILE .
379380
- docker push $CI_REGISTRY_IMAGE/ort:$ORT_REVISION
380381
- docker push $CI_REGISTRY_IMAGE/ort:$MAIN_TAG
381382
- cd ..
@@ -386,7 +387,7 @@ ort-build-image:
386387
--tag $CI_REGISTRY_IMAGE/ort-custom:$MAIN_TAG
387388
--build-arg ORT_DOCKER_IMAGE="${CI_REGISTRY_IMAGE}/ort:latest"
388389
--build-arg BUILDKIT_INLINE_CACHE=1
389-
-f ./Dockerfile .
390+
-f $ORT_DOCKERFILE_FILE .
390391
- docker push $CI_REGISTRY_IMAGE/ort-custom:$ORT_REVISION
391392
- docker push $CI_REGISTRY_IMAGE/ort-custom:$MAIN_TAG
392393
rules:
@@ -413,4 +414,4 @@ pages:
413414
- dashboard/**/*
414415
artifacts:
415416
paths:
416-
- public
417+
- public

0 commit comments

Comments
 (0)