Davlet Panech 0a297aae9d build.conf: new parameter ARCHIVE_BIG_DIRS
New configuration ARCHIVE_BIG_DIRS to hardlink, copy or symlink the
bigger directories, "mirrors", "aptly" and "docker", when archiving
them to /localdisk/loadbuild.

This option can take on these values:

* checksum-hardlink (default): hardlink files with identical files
  from previous builds' archive directories. Look for StxChecksums
  files in older builds' directories to determine whether the files
  are identical.
* checksum-copy: really copy the files
* top-symlink: create a top-level symlink, such as
  $BUILD_OUTPUT_HOME/mirrors that points to $BUILD_HOME/mirrors

This option also accepts a space-separated list of "dir:method"
pairs, eg:

  checksum-hardlink mirrors:top-symlink

means "use the hardlink method by default, but for mirros/ use the
top-symlink method". The last specification in the list takes
precedence in case of multiple matches.

The default behavior, when this option is empty or missing in
build.conf, is "checksum-hardlink".

New script: helpers/archive-dir.sh, executed as root within a docker
container during the build.

TESTS
=====================================

* Call "archive-misc.sh" manually in various ways and check the output

* Jenkins build + ARCHIVE_BIG_DIRS="checksum-hardlink"
  - Run a full build and make sure most files are copied, but the
    files common between mirrors and aptly (4rd-party DEBs) are
    hardlinked
  - Run a second build and make sure all files are hardlinked
  - Add a dummy change to "build-info", rebuild it, then make sure
    that package is copied, but all other files are hardlinked

* Jenkins build + ARCHIVE_BIG_DIRS commented out
  - Make sure Jenkins creates the hardlinks

Story: 2010226
Task: 47860

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I604f840007b79461b5a48dcc4c21fc6316de9a52
2023-04-24 14:24:45 -04:00
..
2022-08-15 14:16:07 -04:00
2022-08-15 14:16:07 -04:00
2022-08-15 14:16:07 -04:00
2022-08-30 21:29:32 -04:00