Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17821

Initial Bitbucket Pipelines configuration for golang contains mistakes

    XMLWordPrintable

Details

    Description

      The initial Bitbucket Pipelines configuration which is available from bitbucket.org has some blocking mistakes which won't allow to proper get packages, build and run unit tests for golang.

      The first problem is with added "" before each variable (i.e.: ${GOPATH} or ${BITBUCKET_REPO_OWNER} - should be ${GOPATH} and ${BITBUCKET_REPO_OWNER}.
      After this fix the second issue will be raised if the developer created sub-folders (which is probably the case for every repo) i.e.:

      #!python
      
      root ---
      -------- example1
      ----------- main.go
      -------- example2
      ----------- main.go
      ----------- main_test.go
      

      To fix this issue it is needed to add ./... for all three go commands at the end of the script (go get -v, go build -v and go test -v should be go get -v ./..., go build -v ./... and go test -v ./...).

      This fix allows correct execution of the build on Pipelines for golang.

      Attachments

        Activity

          People

            Unassigned Unassigned
            5e6001ab8c8c KarolDanielDudek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: