cyberark / conjur-puppet

Official Puppet module for CyberArk Conjur
https://forge.puppet.com/cyberark/conjur
Apache License 2.0
6 stars 3 forks source link

fix: use stash/unstash for expose-daemon.ps1 instead of fetching via http #248

Closed doodlesbykumbi closed 3 years ago

doodlesbykumbi commented 3 years ago

NOTES:

  1. The build was failing on attempting to fetch a file via http with the following error. (see https://jenkins.conjur.net/blue/organizations/jenkins/cyberark--conjur-puppet/detail/fix/1/pipeline/48)
    [2021-01-25T15:56:52.845Z] powershell.exe : Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
    [2021-01-25T15:56:52.845Z] At C:\jenkins\workspace\cyberark--conjur-puppet_fix@tmp\durable-04aa52cf\powershellWrapper.ps1:3 char:1
    [2021-01-25T15:56:52.845Z] + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
    [2021-01-25T15:56:52.845Z] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2021-01-25T15:56:52.845Z]     + CategoryInfo          : NotSpecified: (Invoke-WebReque...secure channel.:String) [], RemoteException
    [2021-01-25T15:56:52.845Z]     + FullyQualifiedErrorId : NativeCommandError
    [2021-01-25T15:56:52.845Z]
    [2021-01-25T15:56:52.845Z] At C:\jenkins\workspace\cyberark--conjur-puppet_fix@tmp\durable-04aa52cf\powershellScript.ps1:2 char:19
    [2021-01-25T15:56:52.845Z] + ...             Invoke-WebRequest -Uri "https://raw.githubusercontent.com ...
    [2021-01-25T15:56:52.845Z] +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [2021-01-25T15:56:52.845Z]     + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
    [2021-01-25T15:56:52.845Z]
    [2021-01-25T15:56:52.845Z]    eption
    [2021-01-25T15:56:52.845Z]
    [2021-01-25T15:56:52.845Z]     + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
  2. Any powershell invocation seem to fail silently, see https://github.com/cyberark/conjur-puppet/blob/master/Jenkinsfile#L48. You can also consult the failing build from (1) to see what I mean. I'm sure there's a way to make them fail on error.

    What does this PR do?

    • What's changed? Why were these changes made?
    • How should the reviewer approach this PR, especially if manual tests are required?
    • Are there relevant screenshots you can add to the PR description?

What ticket does this PR close?

Resolves #249

Checklists

Change log

Test coverage

Documentation