Merge branch '2017.7' into '2018.3'

Conflicts:
  - .kitchen.yml
This commit is contained in:
rallytime 2018-04-10 10:11:35 -04:00
commit 2f1cf3e511
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19
7 changed files with 48 additions and 11 deletions

View file

@ -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 %>

View file

@ -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

View file

@ -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

View file

@ -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']

View file

@ -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

View file

@ -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-', ''))