mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into '2018.3'
Conflicts: - .kitchen.yml
This commit is contained in:
commit
2f1cf3e511
7 changed files with 48 additions and 11 deletions
37
.kitchen.yml
37
.kitchen.yml
|
@ -38,7 +38,7 @@ provisioner:
|
|||
- 139
|
||||
max_retries: 2
|
||||
remote_states:
|
||||
name: git://github.com/saltstack/salt-jenkins.git
|
||||
name: git://github.com/gtmanfred/salt-jenkins.git
|
||||
branch: 2018.3
|
||||
repo: git
|
||||
testingdir: /testing
|
||||
|
@ -136,6 +136,35 @@ platforms:
|
|||
provisioner:
|
||||
salt_bootstrap_options: -X -p rsync git v<%= version %> >/dev/null
|
||||
<% if vagrant != false %>
|
||||
- name: windows-2012r2
|
||||
driver:
|
||||
box: mwrock/Windows2012R2
|
||||
name: vagrant
|
||||
gui: true
|
||||
transport:
|
||||
name: winrm
|
||||
username: Administrator
|
||||
password: Pass@word1
|
||||
provisioner:
|
||||
init_environment: |
|
||||
Clear-Host
|
||||
$AddedLocation ="c:\salt;c:\salt\bin\Scripts"
|
||||
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
|
||||
$OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
|
||||
$NewPath= $OldPath + ";" + $AddedLocation
|
||||
Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
|
||||
reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
|
||||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
|
||||
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
|
||||
salt_bootstrap_options: ''
|
||||
verifier:
|
||||
windows: true
|
||||
types:
|
||||
- unit
|
||||
coverage_xml: false
|
||||
save:
|
||||
$env:TEMP/salt-runtests.log: artifacts/logs/salt-runtests.log
|
||||
/salt/var/log/salt/minion: artifacts/logs/minion
|
||||
- name: windows-2016
|
||||
driver:
|
||||
box: mwrock/Windows2016
|
||||
|
@ -158,12 +187,18 @@ platforms:
|
|||
$OldPath = (Get-ItemProperty -Path $Reg -Name PATH).Path
|
||||
$NewPath= $OldPath + ";" + $AddedLocation
|
||||
Set-ItemProperty -Path $Reg -Value $NewPath -Name PATH
|
||||
reg add "hklm\system\currentcontrolset\control\session manager\memory management" /v pagingfiles /t reg_multi_sz /d "d:\pagefile.sys 4096 8192" /f
|
||||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="5000"}'
|
||||
salt_bootstrap_url: https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.ps1
|
||||
salt_bootstrap_options: ''
|
||||
verifier:
|
||||
windows: true
|
||||
types:
|
||||
- unit
|
||||
coverage_xml: false
|
||||
xml: /tmp/xml-unittests-output/
|
||||
save:
|
||||
/tmp/xml-unittests-output/: artifacts/
|
||||
$env:TEMP/salt-runtests.log: artifacts/logs/salt-runtests.log
|
||||
/salt/var/log/salt/minion: artifacts/logs/minion
|
||||
<% end %>
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -2,7 +2,7 @@
|
|||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'test-kitchen', '~>1.20'
|
||||
gem 'test-kitchen', :git => 'https://github.com/gtmanfred/test-kitchen.git'
|
||||
gem 'kitchen-salt', :git => 'https://github.com/saltstack/kitchen-salt.git'
|
||||
gem 'kitchen-sync'
|
||||
gem 'git'
|
||||
|
@ -20,7 +20,7 @@ group :windows do
|
|||
gem 'vagrant-wrapper'
|
||||
gem 'kitchen-vagrant'
|
||||
gem 'winrm', '~>2.0'
|
||||
gem 'winrm-fs', '>=1.1.1'
|
||||
gem 'winrm-fs', :git => 'https://github.com/gtmanfred/winrm-fs.git'
|
||||
end
|
||||
|
||||
group :ec2 do
|
||||
|
|
|
@ -12,7 +12,6 @@ idna==2.5
|
|||
ioloop==0.1a0
|
||||
ipaddress==1.0.18
|
||||
Jinja2==2.9.6
|
||||
libnacl==1.6.1
|
||||
lxml==3.7.3
|
||||
Mako==1.0.6
|
||||
MarkupSafe==1.0
|
||||
|
|
|
@ -119,10 +119,15 @@ def query(key, value=None, service=None, profile=None): # pylint: disable=W0613
|
|||
**key_vars
|
||||
)
|
||||
|
||||
extras = {}
|
||||
for item in profile[key]:
|
||||
if item not in ('backend', 'url'):
|
||||
extras[item] = profile[key][item]
|
||||
|
||||
result = http.query(
|
||||
url,
|
||||
decode=True,
|
||||
**key_vars
|
||||
**extras
|
||||
)
|
||||
|
||||
return result['dict']
|
||||
|
|
|
@ -5141,15 +5141,13 @@ def patch(name,
|
|||
dry_run_first=True,
|
||||
**kwargs):
|
||||
'''
|
||||
Apply a patch to a file or directory.
|
||||
Ensure that a patch has been applied to the specified file
|
||||
|
||||
.. note::
|
||||
|
||||
A suitable ``patch`` executable must be available on the minion when
|
||||
using this state function.
|
||||
A suitable ``patch`` executable must be available on the minion
|
||||
|
||||
name
|
||||
The file or directory to which the patch will be applied.
|
||||
The file to which the patch should be applied
|
||||
|
||||
source
|
||||
The source patch to download to the minion, this source file must be
|
||||
|
|
|
@ -129,7 +129,7 @@ class ScriptPathMixin(object):
|
|||
sfh.write(
|
||||
'#!{0}\n\n'.format(sys.executable) +
|
||||
'import sys\n' +
|
||||
'CODE_DIR="{0}"\n'.format(CODE_DIR) +
|
||||
'CODE_DIR = r"{0}"\n'.format(CODE_DIR) +
|
||||
'if CODE_DIR not in sys.path:\n' +
|
||||
' sys.path.insert(0, CODE_DIR)\n\n' +
|
||||
'\n'.join(script_template).format(script_name.replace('salt-', ''))
|
||||
|
|
Loading…
Add table
Reference in a new issue