Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for #45 , #12 and #52 #53

Merged
merged 2 commits into from
Sep 6, 2016
Merged

Fixes for #45 , #12 and #52 #53

merged 2 commits into from
Sep 6, 2016

Conversation

javydekoning
Copy link
Contributor

-Minor addition to AppVeyor scripts to prevent failures when running tests on forked repo.
-Added support for choco install paramstring as discussed in #52.
-Example included

Test:

PS C:\Users\jdekoning> Start-DscConfiguration .\myChocoConfig -wait -Verbose -force
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root
/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer DESKTOP-NOFRUJ8 with user sid S-1-5-21-271044204-3381612949-3303693247-1001.
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Set      ]
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Resource ]  [[cChocoInstaller]installChoco]
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Test     ]  [[cChocoInstaller]installChoco]
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco]  Start Test-TargetResource
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco]  Is choco installed?
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco]  NO - Choco isn't Installed
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Test     ]  [[cChocoInstaller]installChoco]  in 0.0950 seconds.
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Set      ]  [[cChocoInstaller]installChoco]
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco]  Start Set-TargetResource
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco] [ChocoInstaller] Start InstallChoco
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco] Loading module from path 'C:\Windows\TEMP\chocolatey\chocInstall\tools\chocolateysetup.psm1'.
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco] Importing function 'Initialize-Chocolatey'.
WARNING: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco] Failure attempting to let Explorer know about updated environment settings.
  Could not find a part of the path 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp\jo543ukh.tmp'.
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoInstaller]installChoco] [ChocoInstaller] Finish InstallChoco
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Set      ]  [[cChocoInstaller]installChoco]  in 10.3740 seconds.
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Resource ]  [[cChocoInstaller]installChoco]
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Resource ]  [[cChocoPackageInstaller]installSkypeWithChocoParams]
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Test     ]  [[cChocoPackageInstaller]installSkypeWithChocoParams]
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Start Test-TargetResource
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Start IsPackageInstalled skype
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Start IsPackageInstalled skype
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Test     ]  [[cChocoPackageInstaller]installSkypeWithChocoParams]  in 2.3610 seconds.
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ Start  Set      ]  [[cChocoPackageInstaller]installSkypeWithChocoParams]
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Start Set-TargetResource
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Start IsPackageInstalled skype
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Start IsPackageInstalled skype
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Install command: 'choco install skype -y --version="7.25.0.106" --allowdo
wngrade --allowemptychecksum --allowemptychecksumsecure'
VERBOSE: [DESKTOP-NOFRUJ8]:                            [[cChocoPackageInstaller]installSkypeWithChocoParams] Package output Chocolatey v0.10.0 Installing the following packages: skyp
e By installing you accept licenses for the packages.  skype v7.25.0.106 [Approved] Downloading skype    from 'http://download.skype.com/msi/SkypeSetup_7.25.0.106.msi'  Progress: 3% 
- Saving 1.23 MB of 37.93 MB (1290049/39772160) Progress: 7% - Saving 2.96 MB of 37.93 MB (3098789/39772160) Progress: 10% - Saving 3.99 MB of 37.93 MB (4181632/39772160) Progress: 1
3% - Saving 5.18 MB of 37.93 MB (5432004/39772160) Progress: 15% - Saving 5.74 MB of 37.93 MB (6020556/39772160) Progress: 20% - Saving 7.62 MB of 37.93 MB (7990486/39772160) Progres
s: 22% - Saving 8.57 MB of 37.93 MB (8985328/39772160) Progress: 25% - Saving 9.79 MB of 37.93 MB (10268008/39772160) Progress: 27% - Saving 10.62 MB of 37.93 MB (11134452/39772160) 
Progress: 30% - Saving 11.39 MB of 37.93 MB (11942088/39772160) Progress: 32% - Saving 12.29 MB of 37.93 MB (12882720/39772160) Progress: 35% - Saving 13.5 MB of 37.93 MB (14154208/3
9772160) Progress: 38% - Saving 14.65 MB of 37.93 MB (15357356/39772160) Progress: 42% - Saving 16.07 MB of 37.93 MB (16850548/39772160) Progress: 45% - Saving 17.27 MB of 37.93 MB (
18106184/39772160) Progress: 47% - Saving 17.97 MB of 37.93 MB (18842144/39772160) Progress: 48% - Saving 18.41 MB of 37.93 MB (19300148/39772160) Progress: 49% - Saving 18.84 MB of 
37.93 MB (19759504/39772160) Progress: 51% - Saving 19.6 MB of 37.93 MB (20555032/39772160) Progress: 53% - Saving 20.36 MB of 37.93 MB (21349172/39772160) Progress: 57% - Saving 21.
84 MB of 37.93 MB (22901324/39772160) Progress: 60% - Saving 23.03 MB of 37.93 MB (24152020/39772160) Progress: 62% - Saving 23.86 MB of 37.93 MB (25019040/39772160) Progress: 65% - 
Saving 24.76 MB of 37.93 MB (25967516/39772160) Progress: 67% - Saving 25.63 MB of 37.93 MB (26879644/39772160) Progress: 68% - Saving 26.1 MB of 37.93 MB (27365604/39772160) Progres
s: 70% - Saving 26.88 MB of 37.93 MB (28189368/39772160) Progress: 73% - Saving 27.75 MB of 37.93 MB (29102192/39772160) Progress: 75% - Saving 28.81 MB of 37.93 MB (30214528/3977216
0) Progress: 77% - Saving 29.38 MB of 37.93 MB (30811736/39772160) Progress: 79% - Saving 30.32 MB of 37.93 MB (31797628/39772160) Progress: 81% - Saving 30.8 MB of 37.93 MB (3229457
9/39772160) Progress: 83% - Saving 31.72 MB of 37.93 MB (33263080/39772160) Progress: 88% - Saving 33.75 MB of 37.93 MB (35384258/39772160) Progress: 89% - Saving 34.1 MB of 37.93 MB
 (35757250/39772160) Progress: 91% - Saving 34.7 MB of 37.93 MB (36386076/39772160) Progress: 94% - Saving 35.81 MB of 37.93 MB (37547440/39772160) Progress: 97% - Saving 36.83 MB of
 37.93 MB (38619608/39772160) Progress: 98% - Saving 37.4 MB of 37.93 MB (39220416/39772160) Progress: 100% - Saving 37.93 MB of 37.93 MB (39772160/39772160) Progress: 100% - Complet
ed download of C:\Windows\TEMP\chocolatey\skype\7.25.0.106\SkypeSetup_7.25.0.106.msi (37.93 MB). Download of SkypeSetup_7.25.0.106.msi (37.93 MB) completed. Installing skype... skype
 has been installed. Environment Vars (like PATH) have changed. Close/reopen your shell to  see the changes (or in powershell/cmd.exe just type `refreshenv`).  The install of skype w
as successful.   Software installed to 'C:\Program Files (x86)\Skype\'  Chocolatey installed 1/1 packages. 0 packages failed.  See the log for details (c:\choco\logs\chocolatey.log).
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Set      ]  [[cChocoPackageInstaller]installSkypeWithChocoParams]  in 27.1080 seconds.
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Resource ]  [[cChocoPackageInstaller]installSkypeWithChocoParams]
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Set      ]
VERBOSE: [DESKTOP-NOFRUJ8]: LCM:  [ End    Set      ]    in  40.1570 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 40.479 seconds

PS C:\Users\jdekoning> 

@4c74356b41
Copy link

thanks!

@lawrencegripper lawrencegripper merged commit 8691761 into chocolatey:master Sep 6, 2016
@lawrencegripper
Copy link
Contributor

Thanks for the PR, I'm going to edit the examples config to clarify the difference between the params property and chocoparams just in case people misunderstand.

@Stangg187
Copy link

Stangg187 commented Apr 25, 2017

I don't seem to be able to figure out from the examples how I would pass a parameter to the chocolatey install ps1 script (i.e. a sas key for a binary stored in a storage account in azure) using params or chocoparams in this dsc module. Is this achievable as a result of this fix?

@ferventcoder
Copy link
Member

params - or install arguments (passed through chocoParams)

@Stangg187
Copy link

Stangg187 commented Apr 25, 2017

What is the syntax for params? params = "/parametername value" ?

@ferventcoder
Copy link
Member

@Stangg187 you may need to review examples or source code - we have only recently taken over and do not have a good feel for this aspect just yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants