woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.33k stars 374 forks source link

Publish working Windows Agent Container #1881

Open notsle opened 1 year ago

notsle commented 1 year ago

Component

agent

Describe the bug

When trying to run the agent on a Windows Server, docker fails with the following error

 - woodpecker-agent 2 layers [⣿⣿] 115.2kB/115.2kB Pulling                                                          1.0s
   - b24db7c103d9 Extracting      [==================================================>] ...                        0.4s
   ✔ 592d0b7ade7a Download complete                                                                                0.3s
failed to register layer: re-exec error: exit status 1: output: hcsshim::ProcessBaseLayer \\?\C:\ProgramData\docker\windowsfilter\061a39a4298a318187ad4428eda7a06e3ed5a2c505ca4f03d270715b7de0bdd4: The system cannot find the path specified. ```

### System Info

```shell
Windows Server 2022, also tested on Windows Server 2019
Docker: Server: Docker Engine - Community
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.24)
  Go version:       go1.20.4
  Git commit:       659604f9
  Built:            Thu May 25 21:52:13 2023
  OS/Arch:          windows/amd64
  Experimental:     false

Additional context

No response

Validations

6543 commented 1 year ago

https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/run-your-first-container

6543 commented 1 year ago

disabled it for now: https://github.com/woodpecker-ci/woodpecker/commit/b3c2bb2e151b45ef6ee8808df8f05c1acd8548fd

looks like we need an dedicated windows container anyway :/

PS: the pipeline now publish windows binaries witch should cover most windows use cases :)

6543 commented 1 year ago

https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?source=recommendations&tabs=windows-server-2022%2Cwindows-10#matching-container-host-version-with-container-image-versions

looks like we would have to create a own image for each windows version.

ref: https://lippertmarkus.com/2021/11/30/win-multiarch-img-lin/

notsle commented 1 year ago

@6543 I've been creating windows containers for work for a year now. While i have little experience with GO. I will give it a shot

ColinFinck commented 1 year ago

@6543 I'm also looking forward to try out Woodpecker CI with Windows support.

Have been using Drone CI for the past 4 years now, but they already turned Windows into a second-class citizen 2 years ago, and my support request from 1 year ago went entirely unanswered. Now they even killed the open support forums...

Let me know what is currently blocking this feature and what I can potentially do to unblock it. I'm open to jump into a call if that makes things easier (considering that we speak the same language and live in the same timezone). FWIW, I'm thinking about using Woodpecker CI for the existing Windows containers at work as well as for the ReactOS Project, where I'm currently maintaining a CI from the pre-container era (https://build.reactos.org)

6543 commented 1 year ago

There is nothing blocking, just a pull missing, witch adds support to build working containers and a change to our pipeline to do so :)