I have a multi-module Spring boot project. I’m trying to configure GitLab’s CI/CD pipe with a test job for one of the modules. Here’s the job:
payroll-test:
allow_failure: true
stage: test
services:
- name: docker:dind
variables:
DOCKER_HOST: "tcp://docker:2375"
DOCKER_TLS_CERTDIR: ""
DOCKER_DRIVER: overlay2
dependencies:
- build
script:
- ./gradlew :payroll:test --stacktrace
Running ./gradlew :payroll:test
locally works fine and the test passes, yet it fails on the pipe.
I tried adding a stacktrace but that didn’t help with anything.
That’s the exception GitLab is throwing:
* Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':payroll:test'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142) at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java
I tried adding ./gradlew clean before running the test, but that didn’t help either.