Open anhuong opened 4 years ago
@eyalbe4 Have you seen this issue before?
@anhuong thanks for reporting this issue.
The JFrog CLI collects the build information during the build and stores it in a temporary folder in the agent.
If you are using parallel stages where each step is running on a different agent, this behavior wouldn't work by default.
You can try, as a workaround, to configure your JFrog CLI temporary folder to be under your shared workspace. You can achieve this by setting JFROG_CLI_TEMP_DIR
environment variable to be a path on your job's workspace, or a path to another shared folder.
A better approach would be to upload the files and publish the build info using the Jenkins Artifactory plugin. The Jenkins Artifactory plugin is already save the build info in a shared folder.
Please notice that there is one drawback using multi-agent build approach - The agent information in the build info (like environment variables) may be related to the agent that did publish it. Thus, we recommend you to upload the build artifacts and publish the build info in the same agent.
By the way, we are working on supporting aggregation of associated builds in the JFrog CLI. This feature will be available in the near future.
Please let me know if this information helps.
@yahavi I appreciate you taking a look at this and responding! You make some excellent points, we previously were using the Jenkins Artifactory plugin and it worked superbly. However, we have a CLI version of our common library methods and moved to using jfrog-cli so users could utilize the same commands via CLI and Jenkins.
Furthermore, you make a great point about how the agents may be changing due to the parallel stages and this may make it hard for jfog to keep track of it's temp dir. However, we are running the jfrog commands in succession each time.
jfrog rt config artifactory-server
jfrog rt upload
jfrog rt build-publish
This would make me think that there should not be an issue with a temp dir since we are running the config, upload, and publish each time.
We have added the JFROG_CLI_TEMP_DIR` to our automation. Thanks for the suggestion! Will try to remember to update this issue with how it goes.
Hello!
I'm running a job in Jenkins that has parallel stages where we are uploading different artifacts to Artifactory and then publishing the build information. The upload is successful but publishing the build info subsequently fails with error:
[Error] open /tmp/jfrog/builds/c3BlZWNoIDo6IGRlcGxveV82OTc1/partials/details: no such file or directory
. Since the upload succeeded, the build details should exist to publish the build record. We are running the jfrog-cli directly in Jenkins.jfrog version 1.37.0 We are running:
And the output is:
Any help would be great. Would upgrading to the latest version 1.38.2 help?