Skip to content

Commit

Permalink
fix(build): move images to large runners, use image root path
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jul 15, 2023
1 parent 170e1c7 commit 75a239f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 9 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ stages:
image: docker.io/docker:20.10
services:
- docker.io/docker:20.10-dind
tags:
- platform:k8s
- runner:large
allow_failure: false
before_script:
- mkdir ${HOME}/.docker
Expand Down Expand Up @@ -129,15 +132,13 @@ build-gui-bundle:
stage: package
needs:
- build-api-coverage-3.8
- build-api-coverage-3.9
- build-api-coverage-3.10
- build-gui-bundle
script:
- mv -v gui/out/config.json gui/out/index.html api/gui/
- mv -v gui/out/bundle/main.js api/gui/bundle/
- cd api
- ${CI_PROJECT_DIR}/common/scripts/image-build.sh --push
variables:
IMAGE_ROOT: "${CI_PROJECT_DIR}/api"
IMAGE_ROOT: "${CI_PROJECT_DIR}"
IMAGE_SUFFIX: api

.package-gui-oci:
Expand All @@ -160,12 +161,11 @@ package-api-oci:
parallel:
matrix:
- IMAGE_ARCH: cpu-buster
IMAGE_FILE: Containerfile.cpu.buster
IMAGE_FILE: api/Containerfile.cpu.buster
- IMAGE_ARCH: cuda-ubuntu
IMAGE_FILE: Containerfile.cuda.ubuntu
# TODO: ROCm image build keeps running out of disk
# IMAGE_ARCH: rocm-ubuntu
# IMAGE_FILE: Containerfile.rocm.ubuntu
IMAGE_FILE: api/Containerfile.cuda.ubuntu
- IMAGE_ARCH: rocm-ubuntu
IMAGE_FILE: api/Containerfile.rocm.ubuntu

package-gui-oci:
extends:
Expand Down
4 changes: 3 additions & 1 deletion common/scripts/image-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ docker build \
--cache-from "${IMAGE_MAIN}" \
--cache-from "${IMAGE_FULL}" \
-f "${IMAGE_FILE}" \
-t "${IMAGE_FULL}" . || { echo "Failed to build image!"; exit 1; }
-t "${IMAGE_FULL}" \
"${IMAGE_ROOT}" || \
{ echo "Failed to build image!"; exit 1; }

if [[ "${IMAGE_PUSH}" == "--push" ]];
then
Expand Down

0 comments on commit 75a239f

Please sign in to comment.