Skip to content

Commit bc93f18

Browse files
authored
Merge pull request #6 from dmurphy18/upd_lnx_tests3
Update Linux tests to work on GitHub
2 parents b20c217 + eac16d0 commit bc93f18

File tree

9 files changed

+358
-337
lines changed

9 files changed

+358
-337
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
(Please provide relevant configs (Be sure to remove sensitive info).)
55

66
### Steps to Reproduce Issue
7-
(Include debug logs if possible, `bootstrap-salt.sh -D`.)
7+
(Include debug logs if possible, `svtminion.sh --debug`.)
88

99
### Versions and Systems
1010
(`salt --versions-report`, `svtminion.sh --version`, system type and version,

.github/workflows/ci.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
concurrency:
77
# If changes are pushed to a PR, stop all running workflows before starting new ones
8-
group: ${{ github.head_ref || (github.repository == 'saltstack/salt-bootstrap' && github.run_id || github.ref_name) }}
8+
group: ${{ github.head_ref || (github.repository == 'saltstack/salt-vmtools' && github.run_id || github.ref_name) }}
99
cancel-in-progress: true
1010

1111
jobs:
@@ -98,7 +98,7 @@ jobs:
9898
- uses: actions/checkout@v4
9999
- name: ShellCheck
100100
run: |
101-
shellcheck -s sh -f tty bootstrap-salt.sh
101+
shellcheck -s bash -f tty linux/svtminion.sh
102102
103103
- name: Set Exit Status
104104
if: always()
@@ -114,6 +114,7 @@ jobs:
114114
path: exitstatus/
115115

116116

117+
117118
windows-2022:
118119
name: Windows 2022
119120
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
@@ -127,7 +128,8 @@ jobs:
127128
container-slug: windows-2022
128129
timeout: 20
129130
runs-on: windows-2022
130-
instances: '["stable-3006", "stable-3006-8", "stable-3007", "stable-3007-1", "latest"]'
131+
instances: '["3006", "3006-8", "3007", "3007-1"]'
132+
131133

132134

133135
photon-5:
@@ -142,7 +144,7 @@ jobs:
142144
display-name: Photon OS 5
143145
container-slug: systemd-photon-5
144146
timeout: 20
145-
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]'
147+
instances: '["3006", "3006-8", "3007", "3007-1"]'
146148

147149

148150
rockylinux-9:
@@ -157,22 +159,8 @@ jobs:
157159
display-name: Rocky Linux 9
158160
container-slug: systemd-rockylinux-9
159161
timeout: 20
160-
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
161-
162+
instances: '["3006", "3006-8", "3007", "3007-1"]'
162163

163-
ubuntu-2204:
164-
name: Ubuntu 22.04
165-
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
166-
uses: ./.github/workflows/test-linux.yml
167-
needs:
168-
- lint
169-
- generate-actions-workflow
170-
with:
171-
distro-slug: ubuntu-2204
172-
display-name: Ubuntu 22.04
173-
container-slug: systemd-ubuntu-22.04
174-
timeout: 20
175-
instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]'
176164

177165
set-pipeline-exit-status:
178166
# This step is just so we can make github require this step, to pass checks
@@ -185,7 +173,6 @@ jobs:
185173
- windows-2022
186174
- photon-5
187175
- rockylinux-9
188-
- ubuntu-2204
189176
if: always()
190177
steps:
191178

.github/workflows/scripts/cut-release.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,36 +189,36 @@ def main():
189189
)
190190

191191
# Update Script Version for the bash script
192-
bootstrap_script_path = REPO_ROOT / "bootstrap-salt.sh"
192+
svtminion_script_path = REPO_ROOT / "linux/svtminion.sh"
193193
print(
194-
f"* Updating {bootstrap_script_path.relative_to(REPO_ROOT)} ...",
194+
f"* Updating {svtminion_script_path.relative_to(REPO_ROOT)} ...",
195195
file=sys.stderr,
196196
flush=True,
197197
)
198-
bootstrap_script_path.write_text(
198+
svtminion_script_path.write_text(
199199
re.sub(
200200
r'__ScriptVersion="(.*)"',
201201
f'__ScriptVersion="{options.release_tag.lstrip("v")}"',
202-
bootstrap_script_path.read_text(),
202+
svtminion_script_path.read_text(),
203203
)
204204
)
205205

206206
# Update the Script Version for the powershell script
207-
bootstrap_script_path = REPO_ROOT / "bootstrap-salt.ps1"
207+
svtminion_script_path = REPO_ROOT / "windows/svtminion.ps1"
208208
print(
209-
f"* Updating {bootstrap_script_path.relative_to(REPO_ROOT)} ...",
209+
f"* Updating {svtminion_script_path.relative_to(REPO_ROOT)} ...",
210210
file=sys.stderr,
211211
flush=True,
212212
)
213-
bootstrap_script_path.write_text(
213+
svtminion_script_path.write_text(
214214
re.sub(
215215
r'\$__ScriptVersion = "(.*)"',
216216
f'$__ScriptVersion = "{options.release_tag.lstrip("v")}"',
217-
bootstrap_script_path.read_text(),
217+
svtminion_script_path.read_text(),
218218
)
219219
)
220220

221-
parser.exit(status=0, message="CHANGELOG.md and bootstrap-salt.sh updated\n")
221+
parser.exit(status=0, message="CHANGELOG.md and svtminion.sh updated\n")
222222

223223

224224
if __name__ == "__main__":

.github/workflows/templates/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
concurrency:
77
# If changes are pushed to a PR, stop all running workflows before starting new ones
8-
group: ${{ github.head_ref || (github.repository == 'saltstack/salt-bootstrap' && github.run_id || github.ref_name) }}
8+
group: ${{ github.head_ref || (github.repository == 'saltstack/salt-vmtools' && github.run_id || github.ref_name) }}
99
cancel-in-progress: true
1010

1111
jobs:
@@ -98,7 +98,7 @@ jobs:
9898
- uses: actions/checkout@v4
9999
- name: ShellCheck
100100
run: |
101-
shellcheck -s sh -f tty bootstrap-salt.sh
101+
shellcheck -s bash -f tty linux/svtminion.sh
102102
103103
- name: Set Exit Status
104104
if: always()

.github/workflows/templates/generate.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
os.chdir(os.path.abspath(os.path.dirname(__file__)))
88

9+
## "ubuntu-2204",
910
LINUX_DISTROS = [
1011
"photon-5",
1112
"rockylinux-9",
12-
"ubuntu-2204",
1313
]
1414

1515
WINDOWS = [
@@ -43,17 +43,17 @@
4343

4444
LATEST_PKG_BLACKLIST = []
4545

46+
## "ubuntu-2204": "Ubuntu 22.04",
4647
DISTRO_DISPLAY_NAMES = {
4748
"photon-5": "Photon OS 5",
4849
"rockylinux-9": "Rocky Linux 9",
49-
"ubuntu-2204": "Ubuntu 22.04",
5050
"windows-2022": "Windows 2022",
5151
}
5252

53+
## "ubuntu-2204": "systemd-ubuntu-22.04",
5354
CONTAINER_SLUG_NAMES = {
5455
"photon-5": "systemd-photon-5",
5556
"rockylinux-9": "systemd-rockylinux-9",
56-
"ubuntu-2204": "systemd-ubuntu-22.04",
5757
"windows-2022": "windows-2022",
5858
}
5959

@@ -94,6 +94,9 @@ def generate_test_jobs():
9494
else TIMEOUT_DEFAULT
9595
)
9696

97+
for salt_version in SALT_VERSIONS:
98+
instances.append(salt_version)
99+
97100
if instances:
98101
needs.append(distro)
99102
test_jobs += TEMPLATE.format(

.github/workflows/test-linux.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
## echo "vt parms ,$vt_parms, vt_parms_ver ,$vt_parm_ver,"
7474
## echo "SaltVersion=$vt_parm_ver" >> $GITHUB_ENV
7575

76-
- name: Bootstrap Salt
76+
- name: VMTools Salt
7777
run: |
7878
# sed 1st - becomes space, 2nd - becomes dot
7979
## DGM needs cleanup
@@ -82,10 +82,9 @@ jobs:
8282
bt_arg1=$(echo "$bt_parms" | awk -F ' ' '{print $1}')
8383
bt_arg2=$(echo "$bt_parms" | awk -F ' ' '{print $2}')
8484
echo "bt parms ,$bt_parms, bt_arg1 ,$bt_arg1, bt_arg2 ,$bt_arg2,"
85-
## DGM sudo sh -x ./bootstrap-salt.sh "$bt_arg1" "$bt_arg2"
8685
bash -x ./linux/svtminion.sh "$bt_arg1" "$bt_arg2"
8786
88-
- name: Test Bootstrap
87+
- name: Test VMTools
8988
run: |
9089
bash -x ./tests/linux/test-linux.sh
9190

.github/workflows/test-windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: Get Version
5959
run: |
6060
# We need to get the version here and make it an environment variable
61-
# It is used to install via bootstrap and in the test
61+
# It is used to install via svtminion and in the test
6262
# The version is in the instance name
6363
$instance = "${{ matrix.instance }}"
6464
$version = $instance -split "-",2
@@ -67,11 +67,11 @@ jobs:
6767
}
6868
Write-Output "SaltVersion=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6969
70-
- name: Bootstrap Salt
70+
- name: VMTools Salt
7171
run: |
72-
. .\bootstrap-salt.ps1 -RunService $false -Version $env:SaltVersion
72+
. .\windows\svtminion.ps1 -RunService $false -Version $env:SaltVersion
7373
74-
- name: Test Bootstrap
74+
- name: Test svtminion
7575
run: |
7676
pytest --cache-clear -v -s -ra --log-cli-level=debug tests/integration/
7777

0 commit comments

Comments
 (0)