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

globs - 502 Error Creating Policy #80

Open
Jarlotee opened this issue Jan 9, 2019 · 2 comments
Open

globs - 502 Error Creating Policy #80

Jarlotee opened this issue Jan 9, 2019 · 2 comments

Comments

@Jarlotee
Copy link

Jarlotee commented Jan 9, 2019

When trying to upload a .tar.gz file no mime type is being sent to github and it returns a 502

Example

 - put: github-pre-release
    params:
      name: version/name
      tag: version/number
      body: version/body
      commitish: source-code/.git/ref
      globs:
        - artifacts/*.tar.gz

It appears that the container is missing required system files to determine mime type:

go-github source code
https://github.com/google/go-github/blob/master/github/repos_releases.go#L358

go example
https://play.golang.org/p/3-HK1GnnMDl

mime source
https://golang.org/pkg/mime/#TypeByExtension

@Jarlotee
Copy link
Author

Jarlotee commented Jan 9, 2019

It looks like alpine does not have the mime.types file, but you get them by adding mailcap to the docker file
https://pkgs.alpinelinux.org/contents?file=mime.types&path=%2Fetc&name=*&branch=edge&repo=main&arch=armhf

@Jarlotee
Copy link
Author

While we wait for merge if anyone needs a drop-in replacement https://cloud.docker.com/repository/docker/treas/github-release-resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant