Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33043

Go command not found

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The plugin does not seem to work. I am using the google installer but I get this error with any go build:

      Unpacking Go from https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz to /var/lib/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go-1.5.3 on Jenkins
      [workspace] $ bash /var/lib/jenkins/jobs/hugo/workspace/hudson.20160219181201.184.sh
      $ go get github.com/stretchr/testify
      /var/lib/jenkins/jobs/hugo/workspace/hudson.20160219181201.184.sh: line 15: go: command not found
      ERROR: (Java::Hudson::AbortException)

      Are there any prerequisites, anything that must be done on the system to get it working?
      Thanks for your attention.

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          That is indeed strange.

          Can you confirm that this build is taking place on a 64-bit Linux machine, and that go has indeed been extracted at the path mentioned?

          Are you changing any shell settings during the build?

          Could you try running env at the start of your "Execute shell" step, and post the output here, to see whether the Go tools are part of the PATH environment variable?

          Show
          orrc Christopher Orr added a comment - That is indeed strange. Can you confirm that this build is taking place on a 64-bit Linux machine, and that go has indeed been extracted at the path mentioned? Are you changing any shell settings during the build? Could you try running env at the start of your "Execute shell" step, and post the output here, to see whether the Go tools are part of the PATH environment variable?
          Hide
          devopstiger DevOps Tiger added a comment - - edited

          Hi, thanks for the quick answer and for the debugging hints!
          For some magical reasons now go is found and executed. I swear i tested whole afternoon and the go binary could not be found. Now it just works.
          Strange.

          Thanks for your attention!

          Show
          devopstiger DevOps Tiger added a comment - - edited Hi, thanks for the quick answer and for the debugging hints! For some magical reasons now go is found and executed. I swear i tested whole afternoon and the go binary could not be found. Now it just works. Strange. Thanks for your attention!
          Hide
          devopstiger DevOps Tiger added a comment -

          BTW I think it was some interference with the travis.yml file reader plugin, but I can not reproduce it know and I go ahead. if that happens again i will take a very close look and keep everything reproducible. And thanks for the nice plugin!

          Show
          devopstiger DevOps Tiger added a comment - BTW I think it was some interference with the travis.yml file reader plugin, but I can not reproduce it know and I go ahead. if that happens again i will take a very close look and keep everything reproducible. And thanks for the nice plugin!
          Hide
          orrc Christopher Orr added a comment -

          Ah, thanks for the update!

          Show
          orrc Christopher Orr added a comment - Ah, thanks for the update!
          Hide
          christianbader christian bader added a comment -

          For me this error still occurs when the jenkins job containing the go plugin is built via dsl.

          After opening and saving the job configuration via the web interface, without making any changes, the error is gone.

          This is reproducible any time.

          Show
          christianbader christian bader added a comment - For me this error still occurs when the jenkins job containing the go plugin is built via dsl. After opening and saving the job configuration via the web interface, without making any changes, the error is gone. This is reproducible any time.
          Hide
          orrc Christopher Orr added a comment -

          christian bader: Can you explain more what you mean by a job being built via DSL?  What does the config XML for the job look like?

          Can you answer the questions from my first comment above?

          Show
          orrc Christopher Orr added a comment - christian bader : Can you explain more what you mean by a job being built via DSL?  What does the config XML for the job look like? Can you answer the questions from my first comment above?
          Hide
          christianbader christian bader added a comment -

          Christopher Orr

          I use the job-dsl-plugin to maintain the job configurations.

          • It's running on a 64bit machine
          • The go tools are NOT part of the PATH variable until I save the configuration via the web interface (without changing anything)

          After saving manually via the web interface, the go tools are part of the PATH variable.

          Also the following line of the config.xml changes from:

          <org.jenkinsci.plugins.golang.GolangBuildWrapper>

          To:

           
          <org.jenkinsci.plugins.golang.GolangBuildWrapper plugin="golang@1.2">
           
           

          Show
          christianbader christian bader added a comment - Christopher Orr I use the job-dsl-plugin to maintain the job configurations. It's running on a 64bit machine The go tools are NOT part of the PATH variable until I save the configuration via the web interface (without changing anything) After saving manually via the web interface, the go tools are part of the PATH variable. Also the following line of the config.xml changes from: <org.jenkinsci.plugins.golang.GolangBuildWrapper> To:   <org.jenkinsci.plugins.golang.GolangBuildWrapper plugin="golang@1.2">    

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              devopstiger DevOps Tiger
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: