How can I upload files to an Artifactory by Jenkins Artifactory Plugin in the middle of the build? After uploading, the job will trigger another job which will download the artifact from the Artifactory. Arching artifacts in the Jenkins jobs is not an option for me because we should keep artifacts in Artifactory.
I could use curl to upload to the Artifactory, but I need to have old builds discarding (by Jenkins Artifactory Plugin). I could use "Generic-Artifactory Integration" in the jobs configuration, but it uploads only at the end of the job build.