0
votes

i have 2 build processes. one to compile our delphi project, second to deploy the artifacts on an ftp server. to store the artifacts i use the "artifact deployer" plugin.

as described in some other posts here copy-artifacts-from-specific-promoted-build or there how-to-promote-a-specific-build-number-from-another-job-in-jenkins i installed the promoting plugin which triggers a build/call on other project.

so far everything seems to be ok. the deploy job is triggered. but right after the start the deploy job fails with a comment "konnte nicht auf vorgelagerten Artefaktbereich zugreifen. Archiviert das Quellprojekt Artefakte?" or "could not access upstream artifact area. is upstream project archiving artifacts"? but in the compile job log says:

ArtifactDeployer] - Starting deployment from the post-action ...
[ArtifactDeployer] - 398 file(s) have been copied from the 'C:\Daten\jenkins\jobs\Integra-2.2.4.SP_P1\workspace' to '\\titan\IntegraWWS2\Deploy\2.2.4.SP_P1\2015-08-17_13-42-38\bin32'.
[ArtifactDeployer] - Stopping deployment from the post-action...

Also i can access the archived artifacts from the website of that specific build.

For defining the specific build in the "copy artifacs from other project" section i tried various versions:

  • Using a Parameter from the Upstream Job
  • The "upstream Build that triggered that job" Option

none worked. And i'm sure that it is not an windows access restriction problem.

2

2 Answers

0
votes

In poor words the ArtifactDeployer plugin changes the save location of your artifacts. This is obviously already being done as a step of the compile job. If you want to split up compilation and deploying then you should

  • not use the ArtifactDeployer plugin in your compile job
  • let the compile job build standard artifacts instead
  • use the CopyArtifact plugin (https://wiki.jenkins-ci.org/display/JENKINS/Copy+Artifact+Plugin) in your deploy job in order to access the compiled artifacts.
  • deploy the artifacts (copied in the step before) to your favorite location (you may can mark the copied artifacts as new artifacts in the deploy job and use ArtifactDeployer plugin to publish them)
0
votes

"Artifact Deployer" is not the main "Artifact Archiving" action that is described in your linked answers (one of them is mine).

In order to use those described methods, you need to use the default "Archive the Artifacts" post-build action. This method will:

  • Store artifacts on the Jenkins server itself, within the job's directory structure.
  • Make artifacts available via http://$JENKINS_URL/job/$JOB_NAME/<build_number>/artifact
  • The above location can be utilized by "Copy Artifacts" plugin.
  • In short: Jenkins (and other plugins) know the standard location where the artifacts are.

The "Artifact Deployer" plugin:

  • Copies artifacts to a non-standard (remote) location
  • Jenkins (and other plugins, such as "Copy Artifacts") do not know where your artifacts are kept.

Your solution

If there is no particular reason why you use "Artifact Deployer" plugin to move the artifacts away from Jenkins, then you should consider using default "Archive the Artifacts" post-build action.

If there is a reason to store artifacts away from Jenkins (size consideration, integrity, artifactory, etc), then you have to configure your own "getter" method to bring your artifacts from wherever you stored them, to the workspace of the current build.