Skip to content

Commit

Permalink
Disabling Kitchen tests, and updated quick-start
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurphy18 committed Nov 1, 2024
1 parent e8236ee commit 0899e72
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 48 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- name: Test Bootstrap
run: |
env
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
sleep 2
- name: Destroy Test Instance
if: always()
run: |
bundle exec kitchen destroy ${{ 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

## DGM - name: Test Bootstrap
## DGM run: |
## DGM env
## DGM bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
## DGM 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()
Expand Down
25 changes: 21 additions & 4 deletions salt-quick-start.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 0899e72

Please sign in to comment.