drone-gitea-release icon indicating copy to clipboard operation
drone-gitea-release copied to clipboard

drone plugin not working on windows 2019 server

Open johanvdw opened this issue 3 years ago • 8 comments

Note, I also posted this in the discourse group at : https://discourse.drone.io/t/gitea-release-plugin-on-windows-2019/9238

I'm not able to run the gitea release plugin for drone on windows 2019.

docker run --rm  plugins/gitea-release:1.0-windows-amd64
docker: Error response from daemon: hcsshim::CreateComputeSystem 44984ffc41fb3fe04fe8de525469a9cc02e4267aa8de82bec904fce
2b5b23d63: The container operating system does not match the host operating system.

I tried to build the plugin myself by adjusting the .drone.windows.yml file, but it already fails in the first step:

- name: vet
  pull: always
  image: golang:1.13-windowsservercore-1809
  commands:
  - go vet ./...
  environment:
    GO111MODULE: on
  volumes:
  - name: gopath
    path: C:\\gopath

but then I get


1 | 1.13-windowsservercore-1809: Pulling from library/golang
-- | --
1 | 1.13-windowsservercore-1809: Pulling from library/golang
1 | 1.13-windowsservercore-1809: Pulling from library/golang
2 | Digest: sha256:c592fdb70b31de6c83f3c9757ddd89d829b730d491226aa47bc5dbc7cc55369e
3 | Status: Downloaded newer image for golang:1.13-windowsservercore-1809
4 | + go vet ./...
5 | go: downloading code.gitea.io/sdk/gitea v0.13.2
6 | go: downloading github.com/joho/godotenv v1.3.0
7 | go: downloading github.com/sirupsen/logrus v1.7.0
8 | go: extracting code.gitea.io/sdk/gitea v0.13.2
9 | go: extracting github.com/sirupsen/logrus v1.7.0
10 | go: downloading github.com/urfave/cli v1.22.5
11 | go: extracting github.com/urfave/cli v1.22.5
12 | go: extracting github.com/joho/godotenv v1.3.0
13 | build github.com/drone-plugins/drone-gitea-release: cannot load code.gitea.io/sdk/gitea: rename C:\gopath\pkg\mod\code.gitea.io\sdk\[email protected] C:\gopath\pkg\mod\code.gitea.io\sdk\[email protected]: The system cannot find the path specified.

johanvdw avatar May 28 '21 19:05 johanvdw

That sounds more like an issue where golang fails to properly fetch the build dependencies.

tboerger avatar Jun 06 '21 18:06 tboerger

@tboerger the gitea release plugin hasn't been migrated to the plugin library so I don't think whatever is there on dockerhub is right.

donny-dont avatar Jun 06 '21 18:06 donny-dont

But the mentioned issue doesn't look like it's related to the plugin itself. It's simply go modules that fails to properly prepare the deps.

tboerger avatar Jun 06 '21 18:06 tboerger

The drone-plugins repos that have been migrated use the exec runner for Windows builds. We don't support a docker runner build of any Windows variants of the plugins so if there is a request for this plugin to work on Windows the plugin should be updated and built properly.

donny-dont avatar Jun 06 '21 18:06 donny-dont

But the mentioned issue is not related to the pipeline at all, go vet fails to execute. To migrate it to the plugin lib is a different topic.

tboerger avatar Jun 07 '21 07:06 tboerger

Hey @johanvdw could you please try and build out #29 for your uses?

I migrated this plugin to the plugin lib so we should be able to add Windows versions of the plugin but I don't have a Gitea server to actually test on. So if you could verify everything works that'd be great.

donny-dont avatar Jun 16 '21 20:06 donny-dont

@donny-dont you can always do tests with try.gitea.io ;)

tboerger avatar Jun 17 '21 19:06 tboerger

Hey @johanvdw could you please try and build out #29 for your uses?

I migrated this plugin to the plugin lib so we should be able to add Windows versions of the plugin but I don't have a Gitea server to actually test on. So if you could verify everything works that'd be great.

I'm a bit puzzled how I should test this. I see the Dockerfiles for windows, but where/how can I build the binary file: ADD release/windows/amd64/drone-gitea-release.exe

johanvdw avatar Jul 01 '21 09:07 johanvdw