Hi ,
We are trying to build simple maven project pipeline where we are trying to expect below actions to be happen.
Pipeline triggered and the artifacts to be uploaded in the target folder of current bitbucket repository path.
In the below example post pipeline trigger we are able to see results file site/serenity/index.html is generated at location during build but that file we would like to upload as artifacts in the target folder.
Even moving the file or directory not worked
Hey Abhinay,
Artifacts are always relevant to the actual clone path ($BITBUCKET_CLONE_DIR) and therefore the cd/mv lines are not needed.
By default, you will always start within the clone directory. Therefore when making the target directory, if you simply run the following line - this will make a "target" directory within the clone directory:
mkdir target
When calling the directory later on in the artifacts line, you have the correct config (as this will point to $BITBUCKET_CLONE_DIR\target):
artifacts:
- target/**
Try this configuration and then click on the "Artifacts" tab in the build itself to verify if the downloaded artifact is what you are expecting to see.
NOTE: This method preserves the artifact for 14 days and does not actually upload the file into your Bitbucket source directory, it is simply to preserve artifacts in between builds.
Hope this helps.
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.