-
Bug
-
Resolution: Unresolved
-
Minor
-
Master:
- Jenkins 2.7.1, running inside Docker (based on official Docker image)
- Ubuntu 14.04, x86_64, 3.13.0-92-generic
- Pipeline basic step plugin 2.0
- Self-Organizing Swarm Plug-in Modules 2.1
ARM Slave:
- Tegra X1 SoC, running Linux4Tegra (aarch64 kernel, 32-bit userland, based on Ubuntu 14.04), Linux version 3.10.67 (patched by Linux4Tegra, plus more fiddling to make it Docker-capable)
- running a Docker container based on mazzolino/armhf-ubuntu@sha256:e54d0ee81a190bd5284e56716915d470e631ef117a4eed7fac214906b7172ad5), Docker version 1.9.0
- java version "1.7.0_101"
OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1)
OpenJDK Zero VM (build 24.95-b01, interpreted mode)
- swarm client 2.1
x86_64 slave:
- Docker container running in Docker 1.10.2, based on Ubuntu 14.04
- Linux 3.13.0-91-generic
- java version "1.7.0_101"
OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
- swarm client 2.1Master: - Jenkins 2.7.1, running inside Docker (based on official Docker image) - Ubuntu 14.04, x86_64, 3.13.0-92-generic - Pipeline basic step plugin 2.0 - Self-Organizing Swarm Plug-in Modules 2.1 ARM Slave: - Tegra X1 SoC, running Linux4Tegra (aarch64 kernel, 32-bit userland, based on Ubuntu 14.04), Linux version 3.10.67 (patched by Linux4Tegra, plus more fiddling to make it Docker-capable) - running a Docker container based on mazzolino/armhf-ubuntu@sha256:e54d0ee81a190bd5284e56716915d470e631ef117a4eed7fac214906b7172ad5), Docker version 1.9.0 - java version "1.7.0_101" OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1) OpenJDK Zero VM (build 24.95-b01, interpreted mode) - swarm client 2.1 x86_64 slave: - Docker container running in Docker 1.10.2, based on Ubuntu 14.04 - Linux 3.13.0-91-generic - java version "1.7.0_101" OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) - swarm client 2.1
We have a Jenkins server with both x86 and ARM slaves. When running a `stash` pipeline step on the ARM slave, the resulting stash does not preserve the execute bit on files. Of course, it might be some other difference between the slaves than the actual architecture, but I'll need assistance in narrowing down the cause.
As a demonstration, this pipeline job
node('tegra-cuda') { deleteDir() sh 'dd if=/dev/zero of=dummy bs=1M count=1; chmod +x dummy; ls -l dummy' stash 'source' } node('tegra-cuda') { deleteDir() unstash 'source' sh 'ls -l dummy' }
produces this output:
[Pipeline] node Running on e5f011df5aa1-e069b02f in /var/lib/jenkins/workspace/ARM stash test [Pipeline] { [Pipeline] deleteDir [Pipeline] sh [ARM stash test] Running shell script + dd if=/dev/zero of=dummy bs=1M count=1 1+0 records in 1+0 records out 1048576 bytes (1.0 MB) copied, 0.00465561 s, 225 MB/s + chmod +x dummy + ls -l dummy -rwxr-xr-x 1 kat kat 1048576 Jul 25 10:40 dummy [Pipeline] stash Stashed 1 file(s) [Pipeline] } [Pipeline] // node [Pipeline] node Running on e5f011df5aa1-e069b02f in /var/lib/jenkins/workspace/ARM stash test [Pipeline] { [Pipeline] deleteDir [Pipeline] unstash [Pipeline] sh [ARM stash test] Running shell script + ls -l dummy -rw-r--r-- 1 kat kat 1048576 Jul 25 10:40 dummy [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS
where `tegra-cuda` is a label for the Tegra X1 slave. The problem seems to be on the creation side rather than the unstashing side (verified by moving one or the other to an the x86_64 node). Using tar in an `sh` step, stashing the tarball, unstashing it, and unpacking it preserves the execute bit.
This is a newly installed (about a week ago) Jenkins, with no data imported from old versions.
I've filed this against core rather than a plugin, because a brief bit of code digging shows that stash is eventually implemented by `FilePath.archive`.
- duplicates
-
JENKINS-46362 Stash/unstash within a Alpine container doesn't keep file attributes
- Closed