I have a pipeline that publishes a .net core project and makes it an artefact which then the next step zips it and sends the zip to the server.
It works with .net5 but now .net7 is slightly different, it has to use -property:PublishDir=/published/ instead of -o (output) which I'm guessing is the cause of the issue.
If I check the folder with dir, it is correct, it has the files in:
Yet the artefacts tab says "No artifacts uploaded".
So on my next step it shows no files:
Hi Daniel,
When you run a Pipelines build, a Docker container will start for every step of your pipeline. The repo will get cloned in the path /opt/atlassian/pipelines/agent/build (this is exposed in the variable $BITBUCKET_CLONE_DIR) which is the present working directory when the first command from your step's script gets executed. When the step finishes, the container gets destroyed.
Only files in the BITBUCKET_CLONE_DIR can be defined as artifacts. The paths in the artifacts definition need to be relative to the clone directory.
With the artifact definition you have, the pipeline is going to look for a directory named published inside the BITBUCKET_CLONE_DIR. However, it looks like your artifacts may be generated inside /published instead. This is a directory named published at the root of the container, and not inside the BITBUCKET_CLONE_DIR.
Can you try removing the forward slash from -property:PublishDir=/published/, so change it to
-property:PublishDir=published/
and see if the artifacts get generated afterwards?
If the property needs an absolute path, you can use
-property:PublishDir=$BITBUCKET_CLONE_DIR/published/
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.