After mvn build the Jar file is saved to /opt/atlassian/pipelines/agent/build/target/ directory as per pipeline logs.
How do I use this location in the Dockerfile when building the image? Or set the location in pipelines?
Currently I get error:
ADD failed: stat /var/lib/docker/165536.165536/tmp/docker-builder912665471/target/app-0.0.1-SNAPSHOT.jar: no such file or directory.
ADD ./target/app-0.0.1-SNAPSHOT.jar app.jar
Short answer: in bitbucket-pipelines.yml
Had the same issue. Had two steps in my pipeline a 'build and test' step and a 'deply to docker' step where i tried to copy the artifacts to the docker image. To pass the artifacts to from the 'build and test' step to the 'deply to docker' step I had to add this to the first step
For more information see:
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events