drone-plugins / drone-gitea-release

Drone plugin for creating and tagging Gitea releases
http://plugins.drone.io/drone-plugins/drone-gitea-release
Apache License 2.0
63 stars 20 forks source link

drone plugin not working on windows 2019 server #27

Open johanvdw opened 3 years ago

johanvdw commented 3 years ago

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\gitea@v0.13.2.tmp-199591795 C:\gopath\pkg\mod\code.gitea.io\sdk\gitea@v0.13.2: The system cannot find the path specified.
tboerger commented 3 years ago

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

donny-dont commented 3 years ago

@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.

tboerger commented 3 years ago

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.

donny-dont commented 3 years ago

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.

tboerger commented 3 years ago

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.

donny-dont commented 3 years ago

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.

tboerger commented 3 years ago

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

johanvdw commented 3 years ago

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