I have a simple JUnit test case that load the Liquibase changelog originating in the src/test/resources folder. As you can imagine, the file will be in the target/test-classes folder after the compilation. The test case worked perfectly on my laptop. However, it failed as Liquibase could not find the file. The only thing I can think of is that the target/test-classes somehow is not on the classpath in the pipeline environment. Is that even possible? My pipeline configuration is very simple:
image: maven:latest
pipelines:
default:
- step:
name: Run Maven Tests
script:
# Step 2: Maven commands
- echo "start of maven tests."
- mvn clean test
- echo "end of maven tests."
Hi Sean,
The pipeline build directory should be the clone directory of the repository. If it's unable to find the target/test-classes folder then I'd suggest running an ls -l command in your script to print your folder structure and verify if it's there or not.
Sometimes you may also have to add prefixes to paths such as ./target/test-classes
Please try this and let me know how it goes.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.