Status: Closed (View Workflow)
Copy Artifact Plugin 1.37 on Jenkins 1.646, on Ubuntu 12.04
I ran into the issue described in this thread:
I can't see any errors in the console output of the build.
quotes from the thread
I created a brand new freestyle job that ALL it does is copy the
artifacts. The first time it is run, only 15 are copied. If I click build
now again, then the missing ones are copied. If I delete the workspace,
the same pattern happens again.
In case anyone has thoughts, here is the parent job:
Centos 6 installed packages:
yum -y install gcc-c++ binutils scons chrpath tar python-devel
tar -xzf gpsd-3.10.tar.gz
echo "env.Alias('myinstall', binaryinstall + headerinstall)" >> SConstruct
scons prefix=$WORKSPACE/stage myinstall
Archive artifacts: stage/*/
This is my test job:
Copy Artifact plugin
Project name: libgps
Which build: Latest successful build
Target directory: libgps
Missing files in libgps/stage/lib (Always the same):
As another workaround (besides running the job twice) you can add a second
"Copy Artifacts" build step with the exact same settings and it will work.
What happens internally (created a special package to output verbose logs):
Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgps.so -> /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so ln -s libgps.so.21.0.0 /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so failed: 2 No such file or directory Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgps.so.21 -> /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so.21 ln -s libgps.so.21.0.0 /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so.21 failed: 2 No such file or directory Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgps.so.21.0 -> /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so.21.0 ln -s libgps.so.21.0.0 /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so.21.0 failed: 2 No such file or directory Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgps.so.21.0.0 -> /var/lib/jenkins/workspace/downstream/stage/lib/libgps.so.21.0.0 Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgpsd.so -> /var/lib/jenkins/workspace/downstream/stage/lib/libgpsd.so Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgpsd.so.22 -> /var/lib/jenkins/workspace/downstream/stage/lib/libgpsd.so.22 Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgpsd.so.22.0 -> /var/lib/jenkins/workspace/downstream/stage/lib/libgpsd.so.22.0 Copying /var/lib/jenkins/jobs/upstream/builds/1/archive/stage/lib/libgpsd.so.22.0.0 -> /var/lib/jenkins/workspace/downstream/stage/lib/libgpsd.so.22.0.0
It failed to create some symlinks as the directory (/var/lib/jenkins/workspace/downstream/stage/lib) was not available.
Once a non-symlink file in the directory is copied, the directory is created and starts to succeed to create symlinks.
I am also seeing this issue on my two jenkins sites. One jenkins setup is Jenkins 1.651.3 + Copy Artifact Plugin 1.38, and the other jenkins setup is Jenkins 2.7.1 + Copy Aritifact Plugin 1.38. The OS of both setups is Ubuntu 14.04 LTS.
Below are repro steps:
1. One project P1 archives one file plus one symlink as its build artifacts like:
directory1/file1, directory2/symlink2 where symlink2 is a link to ../directory1/file1.
2. Another project P2 copies P1's artifacts to its workspace at the beginning of its build.
Expected: both file1 and symlink2 are copied to P2's workspace.
Actual: only file1 is copied to P2's workspace.
Please let me know if you need more information.
Fixed with copyartifact-1.38.1.
It will be available in the update center in a day.
Reproduced in my environment: ubuntu12.04.5 (x64) + java7u101 + jenkins 2.7.1 + copyartifact 1.38.