mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-10 06:41:41 +00:00
Removed debugging apart from macos latest pick, disabled CI/CI testing
This commit is contained in:
parent
687144336a
commit
1b8b907636
11 changed files with 24 additions and 961 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -27,8 +27,6 @@ jobs:
|
||||||
separator: ","
|
separator: ","
|
||||||
files: |
|
files: |
|
||||||
bootstrap-salt.*
|
bootstrap-salt.*
|
||||||
## DGM Gemfile
|
|
||||||
## DGM kitchen*.yml
|
|
||||||
tests/**
|
tests/**
|
||||||
.github/workflows/**
|
.github/workflows/**
|
||||||
files_ignore: |
|
files_ignore: |
|
||||||
|
|
2
.github/workflows/templates/ci.yml
vendored
2
.github/workflows/templates/ci.yml
vendored
|
@ -27,8 +27,6 @@ jobs:
|
||||||
separator: ","
|
separator: ","
|
||||||
files: |
|
files: |
|
||||||
bootstrap-salt.*
|
bootstrap-salt.*
|
||||||
## DGM Gemfile
|
|
||||||
## DGM kitchen*.yml
|
|
||||||
tests/**
|
tests/**
|
||||||
.github/workflows/**
|
.github/workflows/**
|
||||||
files_ignore: |
|
files_ignore: |
|
||||||
|
|
50
.github/workflows/test-linux.yml
vendored
50
.github/workflows/test-linux.yml
vendored
|
@ -26,7 +26,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Test:
|
||||||
name: ${{ matrix.instance }}
|
name: ${{ matrix.instance }}
|
||||||
## DGM runs-on: ubuntu-20.04
|
## runs-on: ubuntu-20.04
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/saltstack/salt-ci-containers/packaging:ubuntu-22.04
|
image: ghcr.io/saltstack/salt-ci-containers/packaging:ubuntu-22.04
|
||||||
|
@ -41,52 +41,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
## DGM - name: Setup Ruby
|
|
||||||
## DGM uses: ruby/setup-ruby@v1
|
|
||||||
## DGM with:
|
|
||||||
## DGM ruby-version: 2.6.10
|
|
||||||
## DGM ## ruby-version: 3.3.4
|
|
||||||
## DGM bundler-cache: true
|
|
||||||
|
|
||||||
## DGM - name: Set up Python 3.10
|
|
||||||
## DGM uses: actions/setup-python@v5
|
|
||||||
## DGM with:
|
|
||||||
## DGM python-version: "3.10"
|
|
||||||
|
|
||||||
## DGM - name: Install Python Dependencies
|
|
||||||
## DGM run: |
|
|
||||||
## DGM python3 -m pip install -U pip
|
|
||||||
## DGM python3 -m pip install -r tests/requirements.txt
|
|
||||||
|
|
||||||
## 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
|
|
||||||
|
|
||||||
## DGM - name: Test Bootstrap
|
|
||||||
## DGM run: |
|
|
||||||
## 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: Install Pytest
|
- name: Install Pytest
|
||||||
run: |
|
run: |
|
||||||
pip install -U pytest
|
pip install -U pytest
|
||||||
|
|
||||||
- name: Bootstrap Salt
|
## TBD Disabled until CI/CD is functional
|
||||||
run: |
|
## - name: Bootstrap Salt
|
||||||
## sudo sh -x ./bootstrap-salt.sh
|
## run: |
|
||||||
sh -x ./bootstrap-salt.sh
|
## sh -x ./bootstrap-salt.sh
|
||||||
|
|
||||||
- name: Test Bootstrap
|
## - name: Test Bootstrap
|
||||||
run: |
|
## run: |
|
||||||
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
## pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||||
|
|
||||||
- name: Set Exit Status
|
- name: Set Exit Status
|
||||||
if: always()
|
if: always()
|
||||||
|
|
54
.github/workflows/test-macos.yml
vendored
54
.github/workflows/test-macos.yml
vendored
|
@ -28,14 +28,11 @@ on:
|
||||||
default: 20
|
default: 20
|
||||||
description: The timeout(in minutes) for the workflow
|
description: The timeout(in minutes) for the workflow
|
||||||
|
|
||||||
## DGM env:
|
|
||||||
## DGM KITCHEN_LOCAL_YAML: 'kitchen.macos.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Test:
|
||||||
name: ${{ matrix.instance }}
|
name: ${{ matrix.instance }}
|
||||||
## DGM runs-on: ${{ inputs.runs-on }}
|
## runs-on: ${{ inputs.runs-on }}
|
||||||
runs-on: macos-12
|
runs-on: macos-13
|
||||||
timeout-minutes: ${{ inputs.timeout }}
|
timeout-minutes: ${{ inputs.timeout }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -45,51 +42,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
## DGM - name: Setup Ruby
|
|
||||||
## DGM uses: ruby/setup-ruby@v1
|
|
||||||
## DGM with:
|
|
||||||
## DGM ruby-version: 2.6.10
|
|
||||||
## DGM ## ruby-version: 3.3.4
|
|
||||||
## DGM bundler-cache: true
|
|
||||||
|
|
||||||
## DGM - name: Set up Python 3.10
|
|
||||||
## DGM uses: actions/setup-python@v5
|
|
||||||
## DGM with:
|
|
||||||
## DGM python-version: "3.10"
|
|
||||||
|
|
||||||
## DGM - name: Install Python Dependencies
|
|
||||||
## DGM run: |
|
|
||||||
## DGM pip install -U pip
|
|
||||||
## DGM pip install -r tests/requirements.txt
|
|
||||||
|
|
||||||
## 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
|
|
||||||
|
|
||||||
## DGM - name: Test Bootstrap
|
|
||||||
## DGM run: |
|
|
||||||
## 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: Install Pytest
|
- name: Install Pytest
|
||||||
run: |
|
run: |
|
||||||
pip install -U pytest
|
pip install -U pytest
|
||||||
|
|
||||||
- name: Bootstrap Salt
|
## TBD Disabled until CI/CD is functional
|
||||||
run: |
|
## - name: Bootstrap Salt
|
||||||
sudo sh -x ./bootstrap-salt.sh
|
## run: |
|
||||||
|
## sudo sh -x ./bootstrap-salt.sh
|
||||||
|
|
||||||
- name: Test Bootstrap
|
## - name: Test Bootstrap
|
||||||
run: |
|
## run: |
|
||||||
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
## pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
|
||||||
|
|
||||||
- name: Set Exit Status
|
- name: Set Exit Status
|
||||||
if: always()
|
if: always()
|
||||||
|
|
59
.github/workflows/test-windows.yml
vendored
59
.github/workflows/test-windows.yml
vendored
|
@ -28,16 +28,9 @@ on:
|
||||||
default: 20
|
default: 20
|
||||||
description: The timeout(in minutes) for the workflow
|
description: The timeout(in minutes) for the workflow
|
||||||
|
|
||||||
## DGM env:
|
|
||||||
## DGM machine_user: kitchen
|
|
||||||
## DGM machine_pass: Password1
|
|
||||||
## DGM machine_port: 5985
|
|
||||||
## DGM KITCHEN_LOCAL_YAML: 'kitchen.windows.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Test:
|
||||||
name: ${{ matrix.instance }}
|
name: ${{ matrix.instance }}
|
||||||
## DGM runs-on: ${{ inputs.runs-on }}
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
timeout-minutes: ${{ inputs.timeout }}
|
timeout-minutes: ${{ inputs.timeout }}
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -48,68 +41,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
## DGM - name: Setup Ruby
|
|
||||||
## DGM uses: ruby/setup-ruby@v1
|
|
||||||
## DGM with:
|
|
||||||
## DGM ruby-version: 2.6.10
|
|
||||||
## DGM ## ruby-version: 3.3.4
|
|
||||||
## DGM bundler-cache: true
|
|
||||||
|
|
||||||
## DGM - name: Install Chef
|
|
||||||
## DGM uses: actionshub/chef-install@1.1.0
|
|
||||||
## DGM with:
|
|
||||||
## DGM project: chef
|
|
||||||
## DGM version: 16.10.8
|
|
||||||
|
|
||||||
## DGM - name: Add Chef bindir to PATH
|
|
||||||
## DGM uses: myci-actions/export-env-var-powershell@1
|
|
||||||
## DGM with:
|
|
||||||
## DGM name: PATH
|
|
||||||
## DGM value: "C:\\opscode\\chef\\bin;C:\\opscode\\chef\\embedded\\bin;$env:PATH"
|
|
||||||
|
|
||||||
## DGM - name: Setup test user
|
|
||||||
## DGM run: |
|
|
||||||
## DGM $password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
|
|
||||||
## DGM New-LocalUser $env:machine_user -Password $password
|
|
||||||
## DGM Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
|
|
||||||
## DGM Get-LocalUser
|
|
||||||
## DGM Get-LocalGroupMember -Group "Administrators"
|
|
||||||
|
|
||||||
## DGM - name: Set up WinRM
|
|
||||||
## DGM run: |
|
|
||||||
## DGM Set-WSManQuickConfig -Force
|
|
||||||
## DGM winrm set winrm/config/service '@{AllowUnencrypted="True"}'
|
|
||||||
## DGM env
|
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.10
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
|
||||||
## DGM - name: Install Python Dependencies
|
|
||||||
- name: Install Pytest
|
- name: Install Pytest
|
||||||
run: |
|
run: |
|
||||||
## DGM pip install -U pip
|
|
||||||
## DGM pip install -r tests/requirements.txt
|
|
||||||
pip install -U pytest
|
pip install -U pytest
|
||||||
|
|
||||||
## 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: Bootstrap Salt
|
- name: Bootstrap Salt
|
||||||
run: |
|
run: |
|
||||||
. ./bootstrap-salt.ps1 -RunService $false
|
. ./bootstrap-salt.ps1 -RunService $false
|
||||||
|
|
|
@ -37,13 +37,6 @@ repos:
|
||||||
args:
|
args:
|
||||||
- requirements/release.in
|
- requirements/release.in
|
||||||
|
|
||||||
## DGM - repo: https://github.com/asottile/pyupgrade
|
|
||||||
## DGM rev: v3.15.0
|
|
||||||
## DGM hooks:
|
|
||||||
## DGM - id: pyupgrade
|
|
||||||
## DGM name: Rewrite Code to be Py3.10+
|
|
||||||
## DGM args: [--py310-plus]
|
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.15.0
|
rev: v3.15.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
__ScriptName="salt-quick-start.sh"
|
__ScriptName="salt-quick-start.sh"
|
||||||
## DGM SALT_REPO_URL="https://repo.saltproject.io/salt/py3/onedir"
|
|
||||||
SALT_REPO_URL="https://packages.broadcom.com/artifactory/salt-project-generic/onedir"
|
SALT_REPO_URL="https://packages.broadcom.com/artifactory/salt-project-generic/onedir"
|
||||||
_COLORS=${QS_COLORS:-$(tput colors 2>/dev/null || echo 0)}
|
_COLORS=${QS_COLORS:-$(tput colors 2>/dev/null || echo 0)}
|
||||||
|
|
||||||
|
@ -90,9 +89,6 @@ if [[ "$_LOCAL" == "1" && "$_FULL" == "1" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
__parse_repo_json_jq() {
|
__parse_repo_json_jq() {
|
||||||
## 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
|
# $1 is OS_NAME
|
||||||
# $2 is ARCH
|
# $2 is ARCH
|
||||||
|
@ -162,7 +158,6 @@ fi
|
||||||
__parse_repo_json_jq ${OS_NAME} ${CPU_ARCH_L}
|
__parse_repo_json_jq ${OS_NAME} ${CPU_ARCH_L}
|
||||||
|
|
||||||
FILE="salt-${_JSON_VERSION}-onedir-${OS_NAME_L}-${CPU_ARCH_L}.tar.xz"
|
FILE="salt-${_JSON_VERSION}-onedir-${OS_NAME_L}-${CPU_ARCH_L}.tar.xz"
|
||||||
## DGM URL="${SALT_REPO_URL}/latest/${FILE}"
|
|
||||||
URL="${SALT_REPO_URL}/${_JSON_VERSION}/${FILE}"
|
URL="${SALT_REPO_URL}/${_JSON_VERSION}/${FILE}"
|
||||||
|
|
||||||
if [[ ! -f ${FILE} ]]; then
|
if [[ ! -f ${FILE} ]]; then
|
||||||
|
|
|
@ -19,7 +19,6 @@ def target_salt_version():
|
||||||
target_salt = ".".join(
|
target_salt = ".".join(
|
||||||
[
|
[
|
||||||
item
|
item
|
||||||
## DGM for item in os.environ["KITCHEN_SUITE"].split("-")
|
|
||||||
for item in os.environ.get("KITCHEN_SUITE", "").split("-")
|
for item in os.environ.get("KITCHEN_SUITE", "").split("-")
|
||||||
if item not in bootstrap_types
|
if item not in bootstrap_types
|
||||||
]
|
]
|
||||||
|
|
|
@ -26,7 +26,6 @@ def run_salt_call(cmd):
|
||||||
"""
|
"""
|
||||||
cmd.append("--out=json")
|
cmd.append("--out=json")
|
||||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||||
print(f"DGM run_salt_call, cmd '{cmd}', result '{result}'", flush=True)
|
|
||||||
if result.stdout:
|
if result.stdout:
|
||||||
json_data = json.loads(result.stdout)
|
json_data = json.loads(result.stdout)
|
||||||
return json_data["local"]
|
return json_data["local"]
|
||||||
|
|
|
@ -1,7 +1 @@
|
||||||
## DGM pytest-testinfra
|
|
||||||
## DGM paramiko
|
|
||||||
## DGM requests-ntlm==1.1.0; sys.platform == 'win32'
|
|
||||||
## DGM pywinrm; sys.platform == 'win32'
|
|
||||||
## DGM six>=1.10.0
|
|
||||||
|
|
||||||
pytest
|
pytest
|
||||||
|
|
Loading…
Add table
Reference in a new issue