Recent global-jjb bumps introduced changes to python-tools-install.sh
which now disables filename expansion (globbing).
Since TA RPM merge / ISO build jobs combine python-tools-install.sh and
other sh script files into a single build step (i.e. resulting a single
sh script), this breaks globbing for the TA RPM/ISO upload handling.
Also, since python-tools-install.sh does not run as a login shell (`bash
-l`), ~/.profile is not sourced and PATH might be missing certain paths
like ~/.local/bin, where `lftools` is located, resulting in build
failures due to missing/not found `lftools`.
To mitigate the above issues:
1. split the offending build step into 2 separate steps
to allow spawning the second step under a login shell (without modifying
python-tools-install.sh);
2. Run the second step under a login shell, so PATH contains `lftools`
installed by pip;
3. Add `set +f` to enable globbing (this is not critical after splitting
the build step above, since python-tools-install.sh disabling globbing
will no longer affect the second step; but it should make it more
obvious that the script *requires* globbing);
Change-Id: I4a5e6a4a88a296cb21d68338f8e5a5b219076308
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
# Ensure python-tools are installed in case job template does not
# call the lf-infra-pre-build macro.
- ../../global-jjb/shell/python-tools-install.sh
+ - shell: !include-raw:
- ../shell/ta-rpm-deploy.sh
- shell: !include-raw:
- ../../global-jjb/shell/logs-clear-credentials.sh
# Ensure python-tools are installed in case job template does not
# call the lf-infra-pre-build macro.
- ../../global-jjb/shell/python-tools-install.sh
+ - shell: !include-raw:
- ../shell/ta-iso-deploy.sh
- shell: !include-raw:
- ../../global-jjb/shell/logs-clear-credentials.sh
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
set -x # Trace commands for this script to make debugging easier.
+set +f # Ensure filename expansion (globbing) is enabled
+
NEXUS_REPO=images-snapshots
release_path=TA/release-1
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
set -x # Trace commands for this script to make debugging easier.
+set +f # Ensure filename expansion (globbing) is enabled
+
NEXUS_REPO=rpm.snapshots
release_path=TA/release-1