Ubuntu Work Image Pre-Installed Software - Golang

Russel's Avatar

Russel

30 Jan, 2019 03:52 AM

I see that the Golang is pre-installed software for Ubuntu worker images as documented here: https://www.appveyor.com/docs/linux-images-software/#golang.

When I run `go version` inside my build script, it returns an error because go is not pre-installed.

  1. Support Staff 1 Posted by Wasa Pleshakov on 31 Jan, 2019 03:38 PM

    Wasa Pleshakov's Avatar

    You have to add stack directive to appveyor.yml

    stack: go 1.10
    
    There is example in our docs: https://www.appveyor.com/docs/lang/go/#linux
    Or you have to use Go Version Manager to choose Golang version you need before go version command:
    init:
       - sh: gvm use go1.10
    

    You're right it is confusing that no golang set by default. We will fix this in next images update.

  2. 2 Posted by Russel on 01 Feb, 2019 11:41 AM

    Russel's Avatar

    Thank you. I saw the stack directive, but I wasn't using a yml file and wasn't sure how to use the directive using the web interface.

  3. Support Staff 3 Posted by Ilya Finkelshte... on 01 Feb, 2019 07:26 PM

    Ilya Finkelshteyn's Avatar

    Right now stack is YAML-only feature. And also it works only with Linux builds. We plan to make it work on Windows as well soon. Regarding UI, we plan to expose it in UI too, but we cannot provide a ETA. So to use it you need to switch to YAML (which is not a bad thing -- you can see most of settings at once and track changes in source control).

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac