Hello,
I am using Bitbucket Pipelines and passing a folder between steps works so far, using:
steps:
- step: &compile
name: Compile (no tests)
caches:
- maven
artifacts:
- target/**
script:
- mvn --batch-mode compile -DskipTests -DbuildNumber=$BITBUCKET_BUILD_NUMBER
However, it seems that once I declared the artifact it is immutable to succeeding steps and they cannot write to it?
I am using Maven with Docker option and it seems that when doing this:
Step 1 mvn compile # generates .class file in ./target
Step 4: mvn package # should add .jar file to ./target - not working
That Step 4 cannot add stuff to the {{./target}} folder - files from Step 1 are present (generated .class files).
Here is my pipeline, including directory listings visible in the build logs.
Another user reported a possible similar thingy with Node builds and using the cache. Is this because I am using the Maven cache, that causes my ./target folder to be not writable in following steps? Think that Maven cache only buffers the local Maven Repo.
Thanks for any support here,
Timo
Turns out I had to add the artifact element in each succeeding step, just like the documentation tells... :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.