Commit Graph

3 Commits

Author SHA1 Message Date
Daniel Diepold
5d76c7909c fix(cache): do not cache build results in global cache
The build and target directories should not get cached
between different Git commit builds (pipelines).

Assume the first pipeline of a branch builds and caches some
compiled Java class from the target/classes directory in the
global/branch (key: $CI_COMMIT_REF_SLUG) cache.
If the source code of that class is then removed by the next commit,
the pipeline for that commit will extract the previously cached class
file.
Since the Maven build templates never call "clean" the class file
will be part of test execution, packaging, etc. even though its source
code was removed.

The target/ directory is already passed from the Maven Build-Java
job to the Test-Java job within the same pipeline anyway.
2022-11-11 08:48:24 +01:00
Marcel Feix
4014472fab chore(Cache): Share cache within a pipeline not within jobs 2022-11-03 10:21:49 +00:00
Timo Beller
0364637b0d refactor(cache): Löse globalen-Cache aus common-ci-variablen heraus
Für nutzer ist es unerwartet und ggf. unerwünscht, dass beim Einbinden von Variablen ein Cache mitkommt.
2022-07-20 17:58:05 +02:00