jenkinsci / jenkinsci/workflow-basic-steps-plugin

[JENKINS-46582] stash / unstash pipeline step is not preserving files timestamp

Offen
#439 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
component:workflow-basic-steps-plugin imported-jira-issue priority:minor resolution:unresolved
Vorherrschende Sprache
Java
Sterne
73
Forks
129
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'd like to checkout some source code once, and incrementally build it in parallel with different compilation options, using the following pipeline:

node {

checkout scm
stash name: 'sources'
}

parallel (
'release': {
node() {
unstash 'sources'
make BUILD=release
}
},

'debug': {
node() {
unstash 'sources'
make BUILD=debug
}
}
)

It is working almost fine. The issue is that at each build, the full source code is rebuild, even if running on the same node than previous compilation.

The root cause is the untash step which is not preserving the initial file timestamp. Therefore my build system supposed every files has been modified since the last build.

---
Originally reported by jguigui, imported from: stash / unstash pipeline step is not preserving files timestamp


  • status: Open
  • priority: Minor
  • component(s): workflow-basic-steps-plugin
  • label(s): stash, timestamp, triaged-2018-11
  • resolution: Unresolved
  • votes: 2
  • watchers: 3
  • imported: 20251215-220547

Raw content of original issue

I'd like to checkout some source code once, and incrementally build it in parallel with different compilation options, using the following pipeline:



node {

checkout scm
stash name: 'sources'
}

parallel (
'release': {
node() {
unstash 'sources'
make BUILD=release
}
},

'debug': {
node() {
unstash 'sources'
make BUILD=debug
}
}
)


It is working almost fine. The issue is that at each build, the full source code is rebuild, even if running on the same node than previous compilation.
The root cause is the untash step which is not preserving the initial file timestamp. Therefore my build system supposed every files has been modified since the last build.


environment

```
Jenkins 2.76

Linux
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Implementierung von workflow-basic-steps-plugin hinter den Pipeline-Schritten stash und unstash, wobei die bereitgestellte parallele Pipeline als Reproduktionsfall dient. Bestätige, wie Dateien unter Linux wiederhergestellt werden, und ermittle die vorhandene Testabdeckung; abgeschlossen ist die Aufgabe, wenn unstash die ursprünglichen Quellzeitstempel beibehält, sodass inkrementelle Builds unveränderte Dateien nicht neu erstellen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
build-system, ci-cd
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.