update/software/scripts
Luis Eduardo Bonatti 32250d9b59 Implement versioned deploy precheck script
This commit is to include a versioned deploy precheck script into
/opt/software/scripts/rel-<sw_version> to be able to run the correct
precheck code for a specific release.

Along with this commit, the precheck api is changed to use the new
location of the script, and the precheck script is changed to add
support to patch-only prechecks, and as a consequence, minor wording
changes were done to return more accurate messages to the user.

1. For the iso upload scenario:
The upload process will copy all scripts under
<iso_root>/upgrades/software-deploy to /opt/software/rel-<ver>/scripts

2. For the patch upload scenario:
The upload process will check if patch contains the deploy-precheck
script. If it does, then the script is copied to
/opt/software/rel-<ver>/scripts, if not then a symlink will be created
to the patch 'required patch' versioned precheck script.

Notes:
- iso (prepatched or not) will always come with deploy-precheck script
- <ver> assumes the format MM.mm.pp

Test Plan:
PASS: Upload multiples patches, both with and without precheck
      scripts, and verify the versioned directories are created
      and the precheck script is created as expected
PASS: Run deploy precheck for an iso release and verify the upgrade
      precheck output is returned as expected
PASS: Run deploy precheck for a patch release and verify the patch
      precheck output is returned as expected

Depends-on: https://review.opendev.org/c/starlingx/metal/+/911595

Story: 2010676
Task: 49263

Change-Id: I04ff89d43579fd71592f7ec534db57a1ead79483
Signed-off-by: Luis Eduardo Bonatti <LuizEduardo.Bonatti@windriver.com>
Co-signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
2024-03-14 09:41:28 -03:00
..
chroot_mounts.sh Improve logging for deploy start shell scripts 2024-02-28 11:07:03 -03:00
create_postgresql_database.sh Improve logging for deploy start shell scripts 2024-02-28 11:07:03 -03:00
deploy-cleanup Improve logging for deploy start shell scripts 2024-02-28 11:07:03 -03:00
deploy-precheck Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
prep-data-migration Improve logging for deploy python scripts 2024-02-28 11:00:50 -03:00
shell-utils Improve logging for deploy start shell scripts 2024-02-28 11:07:03 -03:00
software-deploy-start Improve logging for deploy start shell scripts 2024-02-28 11:07:03 -03:00
sync-controllers-feed Improve logging for deploy python scripts 2024-02-28 11:00:50 -03:00
upgrade_utils.py Improve logging for deploy python scripts 2024-02-28 11:00:50 -03:00
usm_load_import Improve logging for deploy python scripts 2024-02-28 11:00:50 -03:00