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

Docker Windows Agent #4274

Open
3 tasks done
cduchenoy opened this issue Oct 29, 2024 · 12 comments
Open
3 tasks done

Docker Windows Agent #4274

cduchenoy opened this issue Oct 29, 2024 · 12 comments
Labels
bug Something isn't working build CI pipeline related

Comments

@cduchenoy
Copy link
Contributor

Component

agent

Describe the bug

From version > 2.6.1 bind mount workspace failed

Steps to reproduce

  1. install woodpecker docker agent (windows) > 2.6.0
  2. run an ci

Expected behavior

No response

System Info

{
source: "https://github.com/woodpecker-ci/woodpecker",
version: "2.6.0"
}

Additional context

First of all: Thank you very much for this useful tool!

For a client we ported the containers (agent, plugin-git) and added one base-step (with chocolatey installed) to Microsoft Windows.

For more information, see https://github.com/GECO-IT/woodpecker-windows

We encounter 2 problems:

1 From agent version > 2.6.0, we have a problem mounting volumes in plugins.

Before this release, we could work around the docker error by adding

---
...
workspace:
  base: C:\tmp
..

We believe this error comes from PR #3933.

2 With the trustedClonePlugins variable https://github.com/woodpecker-ci/woodpecker/blob/main/shared/constant/constant.go

We need to retag our local plugin-git image: “woodpeckerci/plugin-git” to keep netrc secure!

Do you think you could include Windows images officially?

For information: we have also include an installer for local backend on Windows.

Best regards
Cyril DUCHENOY
Geco-iT

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@cduchenoy cduchenoy added the bug Something isn't working label Oct 29, 2024
@6543
Copy link
Member

6543 commented Oct 29, 2024

this most likely has to do with #3933 witch was done because of #3924

@cduchenoy
Copy link
Contributor Author

Yes you right, perhaps we can add "C:" as a prefix to the bind mount if the agent is of the windows/xxx type?

@6543
Copy link
Member

6543 commented Oct 29, 2024

I would say if workflow workspace has C:\ prefix we do add it there too ...

... feel free to create a pull

@6543
Copy link
Member

6543 commented Oct 29, 2024

Hmm also if labels platform has windows ... but in any case this is an heuristic and should be an own function

checkRunOnWindowsHeuristics(...) bool
witch will then add the prefix on true

-> there is no 100% pervect solution :/

@6543
Copy link
Member

6543 commented Oct 29, 2024

Do you think you could include Windows images officially?

Do you have an source of your windows git clone plugin ... it's an open issue for our plugin ...

@cduchenoy
Copy link
Contributor Author

Yes in the same repo https://github.com/GECO-IT/woodpecker-windows/tree/main/plugins/plugin-git

@cduchenoy
Copy link
Contributor Author

We just dockerize the official plugin under windows

@cduchenoy
Copy link
Contributor Author

for agent https://github.com/GECO-IT/woodpecker-windows/blob/main/agent/backend-docker/Dockerfile.Windows

@qwerty287
Copy link
Contributor

@cduchenoy can you open PRs in the corresponding repos? Thanks for your work!

@6543
Copy link
Member

6543 commented Nov 2, 2024

the biggest problem we currently have is: no agent running on windows with docker+windows backend ...

... so we might have a look if we can autoscale windows vms on demand via https://github.com/woodpecker-ci/autoscaler

@6543
Copy link
Member

6543 commented Nov 2, 2024

-> woodpecker-ci/autoscaler#133 to only deploy agent with windows if needed based on lable
-> ms azure support on the autoscaler

another option would be if somebody sponsor an agent that run all the time ... but i would call that an hotfix

@cduchenoy
Copy link
Contributor Author

Hi,

I updated our repository https://github.com/GECO-IT/woodpecker-windows

As expected, I submitted our teams-notify plugin :)

I would also like to prepare the expected PRs but I don't really know what to send...

I just uploaded the docker file for the agent and plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build CI pipeline related
Projects
None yet
Development

No branches or pull requests

3 participants