Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit d0c1fbb

Browse files
committed
ci: fix errors when building docker container on non-master branch
Signed-off-by: Niklas Eiling <[email protected]>
1 parent 389f1a5 commit d0c1fbb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.gitlab-ci.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
variables:
77
GIT_SUBMODULE_STRATEGY: recursive
88
PREFIX: /usr/
9-
DOCKER_TAG_DEV: ${CI_BUILD_REF_SLUG}
9+
DOCKER_TAG: ${CI_COMMIT_REF_NAME}
1010
DOCKER_IMAGE_DEV: villas/fpga-dev
1111

1212
stages:
@@ -20,7 +20,7 @@ stages:
2020
docker-dev:
2121
stage: prepare
2222
script:
23-
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
23+
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} .
2424
tags:
2525
- docker
2626

@@ -35,7 +35,7 @@ build:source:
3535
name: ${CI_PROJECT_NAME}-${CI_BUILD_REF}
3636
paths:
3737
- build/
38-
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
38+
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
3939
tags:
4040
- docker
4141

@@ -46,7 +46,7 @@ test:unit:
4646
tags:
4747
- docker
4848
allow_failure: true
49-
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
49+
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
5050
script: |
5151
rm -r build && mkdir build && cd build
5252
cmake ..
@@ -74,10 +74,10 @@ test:cppcheck:
7474
gpu/
7575
src/
7676
lib/
77-
tests/unit/
77+
tests/unit/
7878
--suppress=unmatchedSuppression
7979
-igpu/thirdparty | tee cppcheck.log
80-
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
80+
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
8181
dependencies:
8282
- build:source
8383
tags:
@@ -89,6 +89,8 @@ test:cppcheck:
8989
expose_as: cppcheck
9090

9191
test:reuse:
92+
tags:
93+
- docker
9294
stage: test
9395
image:
9496
name: fsfe/reuse:latest

0 commit comments

Comments
 (0)