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

Semaphore: remove manual Go installation, expedite 'cache restore' #803

Merged
merged 1 commit into from Sep 26, 2022

Commits on Sep 26, 2022

  1. Semaphore: remove manual Go installation, expedite 'cache restore'

    'sem-version' apparently installs Go, so rely on it instead of isntalling
    Go manually.
    
    Execute 'cache restore' after 'checkout' (since it scans for go.mod), but
    before 'go install' to avoid tar errors unpacking the cache archive:
    
    ```
    Unpacking command failed: tar: /home/semaphore/go/pkg/mod/github.com/jonboulle/clockwork@v0.2.2/.github/workflows/ci.yml: Cannot open: File exists
    tar: /home/semaphore/go/pkg/mod/github.com/jonboulle/clockwork@v0.2.2/.github/workflows/.editorconfig: Cannot open: File exists
    tar: /home/semaphore/go/pkg/mod/github.com/jonboulle/clockwork@v0.2.2/ticker.go: Cannot open: File exists
    ...
    ```
    
    'go install' does something that changes the ownership of go/pkg/mod,
    tripping up tar. Since 'go install' doesn't need to be run outside of a Go
    module like 'go get' did when using it to install tool binaries, it can
    safely be run after checkout.
    
    Signed-off-by: Timo Beckers <timo@isovalent.com>
    ti-mo committed Sep 26, 2022
    Copy the full SHA
    318ddc8 View commit details
    Browse the repository at this point in the history