Skip to content

Commit

Permalink
Get version from instance name
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed Nov 5, 2024
1 parent 6c5647c commit 9f773cd
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 319 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
separator: ","
files: |
bootstrap-salt.*
Gemfile
kitchen*.yml
tests/**
.github/workflows/**
files_ignore: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/templates/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
separator: ","
files: |
bootstrap-salt.*
Gemfile
kitchen*.yml
tests/**
.github/workflows/**
files_ignore: |
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,21 @@ jobs:
run: |
pip install -U pytest
- name: Bootstrap Salt
- name: Get Version
run: |
. .\bootstrap-salt.ps1 -RunService $false
# We need to get the version here and make it an environment variable
# It is used to install via bootstrap and in the test
# The version is in the instance name
$instance = "${{ matrix.instance }}"
$version = $instance -split "-",2
if ( $version.Count -gt 1 ) {
$version = $version[1].Replace("-", ".")
}
Write-Output "SaltVersion=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Add Salt to Path
- name: Bootstrap Salt
run: |
$env:Path = "$env:Path;C:\Program Files\Salt Project\Salt"
. .\bootstrap-salt.ps1 -RunService $false -Version $env:SaltVersion
- name: Test Bootstrap
run: |
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@ venv

# Pycharm
.idea

# test-kitchen
.kitchen.local.yml
kitchen.local.yml
.kitchen/
.bundle/
11 changes: 0 additions & 11 deletions Gemfile

This file was deleted.

119 changes: 0 additions & 119 deletions Vagrantfile

This file was deleted.

158 changes: 0 additions & 158 deletions kitchen.yml

This file was deleted.

13 changes: 1 addition & 12 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,7 @@ def target_python_version():

@pytest.fixture(scope="session")
def target_salt_version():
bootstrap_types = ("git", "stable", "onedir", "onedir_rc")

# filter out any bootstrap types and then join
target_salt = ".".join(
[
item
for item in os.environ.get("KITCHEN_SUITE", "").split("-")
if item not in bootstrap_types
]
)

# target_salt = os.environ["KITCHEN_SUITE"].split("-", 1)[-1].replace("-", ".")
target_salt = os.environ.get("SaltVersion", "")

if target_salt.startswith("v"):
target_salt = target_salt[1:]
Expand Down
1 change: 0 additions & 1 deletion tests/integration/__init__.py

This file was deleted.

Loading

0 comments on commit 9f773cd

Please sign in to comment.