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

Install packages by cargo or go_install if the asset for the platform isn't released in GitHub Releases #2132

Closed
suzuki-shunsuke opened this issue Jul 26, 2023 · 2 comments · Fixed by #2317
Labels
enhancement New feature or request
Milestone

Comments

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Jul 26, 2023

Feature Overview

Install packages by cargo or go_install if the asset for the platform isn't released in GitHub Releases.

Why is the feature needed?

To support platforms where a tool doesn't provide assets.

For example, some github_release packages don't support linux/arm64 and windows.

How to reproduce the issue

No response

Workaround

We can achieve this using overrides.

e.g. https://github.com/aquaproj/aqua-registry/blob/8d552f251ded112b42e681279d71b0af59fce85f/pkgs/slsa-framework/slsa-verifier/registry.yaml#L11-L19

        type: go_install
        path: github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier
        asset: slsa-verifier
        overrides:
          - goos: linux
            goarch: amd64
            type: github_release
            asset: slsa-verifier-{{.OS}}-{{.Arch}}
            format: raw

But I'd like to provide the simple way to achieve this.

Example Code

registry.yaml

        type: github_release
        asset: slsa-verifier-{{.OS}}-{{.Arch}}
        format: raw
        supported_envs:
          - linux/amd64
        go_path: github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier # New!

If the platform isn't contained in supported_envs and go_path is set, the package is installed by go_install.

Reference

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Jul 26, 2023
@suzuki-shunsuke suzuki-shunsuke pinned this issue Aug 29, 2023
@suzuki-shunsuke
Copy link
Member Author

build:
  type: go_install
  path: github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier
  excluded_envs:
    - windows

@suzuki-shunsuke
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: Done
1 participant