Disabling Kitchen tests, and updated quick-start

This commit is contained in:
David Murphy 2024-11-01 15:11:22 -06:00
parent e8236eedad
commit 0899e72c34
No known key found for this signature in database
GPG key ID: 9D7724F37A7424D8
4 changed files with 63 additions and 46 deletions

View file

@ -54,22 +54,22 @@ jobs:
python3 -m pip install -U pip
python3 -m pip install -r tests/requirements.txt
- name: Create Test Instance
run: |
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
sleep 2
## DGM - name: Create Test Instance
## DGM run: |
## DGM bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
## DGM (sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
## DGM sleep 2
- name: Test Bootstrap
run: |
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Test Bootstrap
## DGM run: |
## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Destroy Test Instance
if: always()
run: |
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Destroy Test Instance
## DGM if: always()
## DGM run: |
## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Set Exit Status
if: always()

View file

@ -61,22 +61,22 @@ jobs:
pip install -U pip
pip install -r tests/requirements.txt
- name: Create Test Instance
run: |
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
sleep 2
## DGM - name: Create Test Instance
## DGM run: |
## DGM bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
## DGM (sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
## DGM sleep 2
- name: Test Bootstrap
run: |
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Test Bootstrap
## DGM run: |
## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Destroy Test Instance
if: always()
run: |
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Destroy Test Instance
## DGM if: always()
## DGM run: |
## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Set Exit Status
if: always()

View file

@ -90,22 +90,22 @@ jobs:
pip install -U pip
pip install -r tests/requirements.txt
- name: Create Test Instance
run: |
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Create Test Instance
## DGM run: |
## DGM bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Test Bootstrap
run: |
env
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Test Bootstrap
## DGM run: |
## DGM env
## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Destroy Test Instance
if: always()
run: |
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
## DGM - name: Destroy Test Instance
## DGM if: always()
## DGM run: |
## DGM bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM sleep 2
- name: Set Exit Status
if: always()

View file

@ -1,7 +1,8 @@
#!/bin/sh
__ScriptName="salt-quick-start.sh"
SALT_REPO_URL="https://repo.saltproject.io/salt/py3/onedir"
## DGM SALT_REPO_URL="https://repo.saltproject.io/salt/py3/onedir"
SALT_REPO_URL="https://packages.broadcom.com/artifactory/salt-project-generic/onedir"
_COLORS=${QS_COLORS:-$(tput colors 2>/dev/null || echo 0)}
_LOCAL=0
@ -89,8 +90,23 @@ if [[ "$_LOCAL" == "1" && "$_FULL" == "1" ]]; then
fi
__parse_repo_json_jq() {
_JSON_FILE="${SALT_REPO_URL}/repo.json"
_JSON_VERSION=$(curl -s ${_JSON_FILE} | jq -sr ".[].latest[] | select(.os == \"$1\") | select(.arch == \"$2\").version")
## DGM TBD how to handle no repo.json
## DGM _JSON_FILE="${SALT_REPO_URL}/repo.json"
## DGM _JSON_VERSION=$(curl -s ${_JSON_FILE} | jq -sr ".[].latest[] | select(.os == \"$1\") | select(.arch == \"$2\").version")
# $1 is OS_NAME
# $2 is ARCH
# get dir listing from url, sort and pick highest
onedir_versions_tmpf=$(mktemp)
curr_pwd=$(pwd)
cd ${onedir_versions_tmpf} || return 1
wget -r -np -nH --exclude-directories=onedir,relenv,windows -x -l 1 "$SALT_REPO_URL/"
# shellcheck disable=SC2010
LATEST_VERSION=$(ls artifactory/saltproject-generic/onedir/ | grep -v 'index.html' | sort -V -u | tail -n 1)
cd ${curr_pwd} || return "${LATEST_VERSION}"
rm -fR ${onedir_versions_tmpf}
_JSON_VERSION="${LATEST_VERSION}"
}
__fetch_url() {
@ -146,7 +162,8 @@ fi
__parse_repo_json_jq ${OS_NAME} ${CPU_ARCH_L}
FILE="salt-${_JSON_VERSION}-onedir-${OS_NAME_L}-${CPU_ARCH_L}.tar.xz"
URL="${SALT_REPO_URL}/latest/${FILE}"
## DGM URL="${SALT_REPO_URL}/latest/${FILE}"
URL="${SALT_REPO_URL}/${_JSON_VERSION}/${FILE}"
if [[ ! -f ${FILE} ]]; then
echoinfo "Downloading Salt"