You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
Test phase is really slow using the plugin, mainly because I'm unable to cache Maven dependencies.
I'm currently working on this pipeline:
kind: pipeline
type: docker
name: default
steps:
- name: test
image: quay.io/testcontainers/dind-drone-plugin
environment:
CI_WORKSPACE: "/drone/src"
settings:
# This image will run the cmd with your build steps
build_image: maven:3-openjdk-17-slim
# This specifies the command that should be executed to perform build, test and
# integration tests. Not to be confused with Drone's `command`:
cmd: sleep 5 && mvn clean test
prefetch_images:
- "maven:3-openjdk-17-slim"
# volumes:
# - name: maven-repo
# path: /root/.m2
volumes:
- name: dockersock
path: /var/run
- name: build
image: maven:3-openjdk-17-slim
commands:
- mvn clean package -DskipTests
volumes:
- name: maven-repo
path: /root/.m2
# Specify docker:dind as a service
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: { }
- name: maven-repo
host:
path: /home/administrator/drone/cache/maven-repo
maven-repo volume is used as cache for Maven dependencies. It works fine in the build step, but AFAIK it is not possible to use the same approach in test (see the commented lines below prefetch_images).
Moreover, test step downloads the maven:3-openjdk-17-slim image every time it is executed.
The result is test step is taking 11 minutes, while the actual build step only requires 22 seconds.
Is it possible to cache dependencies and use them in a test step with dind or is there another best-practice to improve this performance?
The text was updated successfully, but these errors were encountered:
Sorry for the extensive delay - this repo is not under active maintenance.
As per #32 I'm proposing that this repository be formally archived; if you need to continue using it you're welcome to fork, but it's become unviable for me or the Testcontainers team to maintain.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Test phase is really slow using the plugin, mainly because I'm unable to cache Maven dependencies.
I'm currently working on this pipeline:
maven-repo
volume is used as cache for Maven dependencies. It works fine in thebuild
step, but AFAIK it is not possible to use the same approach intest
(see the commented lines belowprefetch_images
).Moreover,
test
step downloads the maven:3-openjdk-17-slim image every time it is executed.The result is
test
step is taking 11 minutes, while the actualbuild
step only requires 22 seconds.Is it possible to cache dependencies and use them in a test step with dind or is there another best-practice to improve this performance?
The text was updated successfully, but these errors were encountered: