mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Playing with conditionals
This commit is contained in:
parent
90fc657e71
commit
1fa8125a51
2 changed files with 27 additions and 7 deletions
15
.github/workflows/test-linux.yml
vendored
15
.github/workflows/test-linux.yml
vendored
|
@ -45,17 +45,24 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python Dependencies
|
||||
- name: Install Python Dependencies with pip breakage
|
||||
if: ${{ ( inputs.distro-slug = "debian-11" ) || ( inputs.distro-slug = "debian-12" ) || ( inputs.distro-slug = "debian-13" ) || ( inputs.distro-slug = "ubuntu-2404" ) }}
|
||||
run: |
|
||||
echo "DGM pip test for distro-slug ${{ inputs.distro-slug }}"
|
||||
if [[ "${{ inputs.distro-slug }}" == "debian-11" || "${{ inputs.distro-slug }}" == "debian-12" || "${{ inputs.distro-slug }}" == "debian-13" || "${{ inputs.distro-slug }}" == "ubuntu-2404" ]]; then
|
||||
echo "DGM doing break-system-packages for distro-slug ${{ inputs.distro-slug }}"
|
||||
python3 -m pip install --break-system-packages -r tests/requirements.txt
|
||||
echo "DGM doing break-system-packages for distro-slug ${{ inputs.distro-slug }}"
|
||||
python3 -m pip install --break-system-packages -r tests/requirements.txt
|
||||
else
|
||||
echo "DGM plain pip for distro-slug ${{ inputs.distro-slug }}"
|
||||
python3 -m pip install -r tests/requirements.txt
|
||||
fi
|
||||
|
||||
- name: Install Python Dependencies without pip breakage
|
||||
if: ${{ ( inputs.distro-slug != "debian-11" ) && ( inputs.distro-slug != "debian-12" ) && ( inputs.distro-slug != "debian-13" ) && ( inputs.distro-slug != "ubuntu-2404" ) }}
|
||||
run: |
|
||||
echo "DGM pip test for distro-slug ${{ inputs.distro-slug }}"
|
||||
echo "DGM plain pip for distro-slug ${{ inputs.distro-slug }}"
|
||||
python3 -m pip install -r tests/requirements.txt
|
||||
|
||||
- name: Bootstrap Salt
|
||||
run: |
|
||||
echo "matrix instance ,${{ matrix.instance }},"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#======================================================================================================================
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
__ScriptVersion="2024.11.07"
|
||||
__ScriptVersion="2024.11.11"
|
||||
__ScriptName="bootstrap-salt.sh"
|
||||
|
||||
__ScriptFullName="$0"
|
||||
|
@ -221,6 +221,10 @@ __check_config_dir() {
|
|||
# DESCRIPTION: Checks the placed after the install arguments
|
||||
#----------------------------------------------------------------------------------------------------------------------
|
||||
__check_unparsed_options() {
|
||||
# DGM debug
|
||||
set -v
|
||||
set -x
|
||||
|
||||
shellopts="$1"
|
||||
# grep alternative for SunOS
|
||||
if [ -f /usr/xpg4/bin/grep ]; then
|
||||
|
@ -619,13 +623,22 @@ if [ "$#" -gt 0 ];then
|
|||
fi
|
||||
|
||||
# Check installation type
|
||||
if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc)')" = "" ]; then
|
||||
if [ "$(echo "$ITYPE" | grep -E '(latest|default|stable|testing|git|onedir|onedir_rc)')" = "" ]; then
|
||||
echoerror "Installation type \"$ITYPE\" is not known..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## DGM added this to CI/CD easier, needs removal once get compund conditionals resolved in GitHub Actions
|
||||
if [ "$ITYPE" = "latest" ] || [ "$ITYPE" = "default" ]; then
|
||||
STABLE_REV="latest"
|
||||
ONEDIR_REV="latest"
|
||||
_ONEDIR_REV="latest"
|
||||
ITYPE="onedir"
|
||||
shift
|
||||
echodebug "using ITYPE onedir for input 'latest' or 'default', cmd args left ,$#,"
|
||||
|
||||
# If doing a git install, check what branch/tag/sha will be checked out
|
||||
if [ "$ITYPE" = "git" ]; then
|
||||
elif [ "$ITYPE" = "git" ]; then
|
||||
if [ "$#" -eq 0 ];then
|
||||
GIT_REV="master"
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue