Jump over the container stage if we haven't changed any of the files
that involved in building the container images.
This saves 1-2 minutes in each run and helps conserve resources.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
DOCKER_DRIVER: overlay2
stages:
DOCKER_DRIVER: overlay2
stages:
- build
- test
# Build Docker image with deqp, the rootfs and the build deps for Mesa
- build
- test
# Build Docker image with deqp, the rootfs and the build deps for Mesa
-.build-container:
- stage: build-container
- when: always
+.container:
+ stage: containers
+ image: docker:stable
+ only:
+ changes:
+ - src/gallium/drivers/panfrost/ci/gitlab-ci.yml
+ - src/gallium/drivers/panfrost/ci/Dockerfile
+ - src/gallium/drivers/panfrost/ci/create-rootfs.sh
+ - src/gallium/drivers/panfrost/ci/${KERNEL_ARCH}.config
+ variables:
+ DOCKER_HOST: tcp://docker:2375
+ DOCKER_DRIVER: overlay2
- - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- - time docker pull $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest || true
+ - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- -t $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}
- --cache-from $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
+ -t $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}
--build-arg DEBIAN_ARCH=${DEBIAN_ARCH}
--build-arg GCC_ARCH=${GCC_ARCH}
--build-arg KERNEL_ARCH=${KERNEL_ARCH}
--build-arg DEBIAN_ARCH=${DEBIAN_ARCH}
--build-arg GCC_ARCH=${GCC_ARCH}
--build-arg KERNEL_ARCH=${KERNEL_ARCH}
--build-arg DEVICE_TREES=${DEVICE_TREES}
--build-arg KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
src/gallium/drivers/panfrost/ci
--build-arg DEVICE_TREES=${DEVICE_TREES}
--build-arg KERNEL_IMAGE_NAME=${KERNEL_IMAGE_NAME}
src/gallium/drivers/panfrost/ci
- - time docker push $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
- - docker history $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
+ - time docker push $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}
+ - docker history $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}
-build-container-armhf:
- extends: .build-container
+container:armhf:
+ extends: .container
variables:
DEBIAN_ARCH: "armhf"
GCC_ARCH: "arm-linux-gnueabihf"
variables:
DEBIAN_ARCH: "armhf"
GCC_ARCH: "arm-linux-gnueabihf"
DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
KERNEL_IMAGE_NAME: "zImage"
DEVICE_TREES: "arch/arm/boot/dts/rk3288-veyron-jaq.dtb"
KERNEL_IMAGE_NAME: "zImage"
-build-container-arm64:
- extends: .build-container
+container:arm64:
+ extends: .container
variables:
DEBIAN_ARCH: "arm64"
GCC_ARCH: "aarch64-linux-gnu"
variables:
DEBIAN_ARCH: "arm64"
GCC_ARCH: "aarch64-linux-gnu"
- image: $CI_REGISTRY_IMAGE/${DEBIAN_ARCH}:latest
+ image: $CI_REGISTRY/$CI_PROJECT_PATH/${DEBIAN_ARCH}:latest
extends: .build
variables:
DEBIAN_ARCH: "armhf"
extends: .build
variables:
DEBIAN_ARCH: "armhf"
DEVICE_TYPE: "rk3288-veyron-jaq"
KERNEL_IMAGE_NAME: "zImage"
DEVICE_TYPE: "rk3288-veyron-jaq"
KERNEL_IMAGE_NAME: "zImage"
extends: .build
variables:
DEBIAN_ARCH: "arm64"
extends: .build
variables:
DEBIAN_ARCH: "arm64"
stage: test
tags:
- idle-jobs
stage: test
tags:
- idle-jobs
- image: $CI_REGISTRY_IMAGE:latest
+ image: $CI_REGISTRY/$CI_PROJECT_PATH/arm64:latest # Any of the images will be fine
script:
- mkdir -p ~/.config/
- |
script:
- mkdir -p ~/.config/
- |
extends: .test
dependencies:
extends: .test
dependencies:
extends: .test
dependencies:
extends: .test
dependencies: