Skip to content

Jenkinsfile: create bundles for Windows stages#39858

Merged
tiborvass merged 2 commits intomoby:masterfrom
thaJeztah:Jenkinsfile_windows_bundles
Sep 5, 2019
Merged

Jenkinsfile: create bundles for Windows stages#39858
tiborvass merged 2 commits intomoby:masterfrom
thaJeztah:Jenkinsfile_windows_bundles

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

CI already stores the logs of the test daemon, so we might as well
store them as artifacts

[2019-09-03T12:49:39.835Z] INFO: Tidying up at end of run
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.out) to C:\windows\TEMP\CIDUT.out
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.err) to C:\windows\TEMP\CIDUT.err

@thaJeztah
Copy link
Copy Markdown
Member Author

fingers crossed; hope the $env::TEMP works in the path (backslashes vs slashes 😂)

@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Sep 3, 2019

Ah! Well, got an answer to that fast;

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 737: unexpected char: '\' @ line 737, column 67.
   ress-Archive -Path "$env::TEMP\CIDUT.out

I see slashes are used in some other places in the PowerShell scripts, so let's try that

@thaJeztah
Copy link
Copy Markdown
Member Author

Alas; some more work needed; apparently -Path "$env::TEMP/CIDUT.out" isn't expanded properly, and just replaced with :: (suspect it expands $env instead of $env::TEMP)

Oh! I'm silly; I used :: instead of : 🤦‍♂

[2019-09-03T15:22:51.224Z] INFO: Saving daemon under test log (d:\CI-2\CI-2ca03d8e9\dut.out) to C:\windows\TEMP\CIDUT.out
[2019-09-03T15:22:51.224Z] INFO: Saving daemon under test log (d:\CI-2\CI-2ca03d8e9\dut.err) to C:\windows\TEMP\CIDUT.err

...

[2019-09-03T15:23:28.683Z] Creating windowsRS1-integration-bundles.zip
[2019-09-03T15:23:29.148Z] powershell.exe : Compress-Archive : The path '::TEMP/CIDUT.out' either does not exist or is not 
[2019-09-03T15:23:29.148Z] At D:\gopath\src\github.com\docker\docker@tmp\durable-1754d539\powershellWrapper.ps1:3 char:1
[2019-09-03T15:23:29.148Z] + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
[2019-09-03T15:23:29.148Z] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2019-09-03T15:23:29.148Z]     + CategoryInfo          : NotSpecified: (Compress-Archiv...xist or is not     :String) [], RemoteException
[2019-09-03T15:23:29.148Z]     + FullyQualifiedErrorId : NativeCommandError
[2019-09-03T15:23:29.148Z]  
[2019-09-03T15:23:29.148Z] a valid file system path.
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z] At D:\gopath\src\github.com\docker\docker@tmp\durable-1754d539\powershellScript
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z] .ps1:6 char:33
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z] + ...             Compress-Archive -Path "$env::TEMP/CIDUT.out", "$env::TEM ...
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z] +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z]     + CategoryInfo          : InvalidArgument: (::TEMP/CIDUT.out:String) [Comp 
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z]    ress-Archive], InvalidOperationException
[2019-09-03T15:23:29.148Z] 
[2019-09-03T15:23:29.148Z]     + FullyQualifiedErrorId : ArchiveCmdletPathNotFound,Compress-Archive
[2019-09-03T15:23:29.148Z]

...

[2019-09-03T15:23:29.365Z] Archiving artifacts
[2019-09-03T15:23:32.034Z] ‘*-bundles.zip’ doesn’t match anything
[2019-09-03T15:23:32.034Z] No artifacts found that match the file pattern "*-bundles.zip". Configuration error?

@thaJeztah thaJeztah force-pushed the Jenkinsfile_windows_bundles branch from 2ca03d8 to 2e8d7c5 Compare September 3, 2019 15:37
@thaJeztah
Copy link
Copy Markdown
Member Author

Success!
Screenshot 2019-09-03 at 18 38 31

Downloaded that bundle:

windowsRS5-integration-bundles.zip

Observations:

  • CIDUT.err is empty (because we log everything on stdout on windows)
  • Looks like the test-daemon is not running with debug enabled, so the output is not very useful (it does show some errors though)

CI already stores the logs of the test daemon, so we might as well
store them as artifacts

```
[2019-09-03T12:49:39.835Z] INFO: Tidying up at end of run
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.out) to C:\windows\TEMP\CIDUT.out
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.err) to C:\windows\TEMP\CIDUT.err
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the Jenkinsfile_windows_bundles branch from 2e8d7c5 to 1fbadd7 Compare September 3, 2019 16:48
@thaJeztah
Copy link
Copy Markdown
Member Author

Pushed a commit to enable debug-mode for the test-daemon

Copy link
Copy Markdown
Contributor

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thaJeztah
Copy link
Copy Markdown
Member Author

Example daemon logs for RS5

windowsRS5-integration-bundles.zip

Next step is to capture the test-logs as well, but need to dig a bit into Jenkins examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants