Hi There,
I am trying to deploy my first Go application to Heroku, and I am using bitbucket pipelines. When I run deploy, I got an error.
Here is error message cannot find module for path _/opt/atlassian/pipelines/agent/build/__PACKAGE_PATH_/connection
Here is my bitbucket-pipelines.yml file
image: golang:1.12.3clone: depth: fullpipelines:
default: - step: name: test deployment: production script: #start to deploy it #- echo "start to deploy" # - pipe: atlassian/heroku-deploy:0.1.1 # variables: # HEROKU_API_KEY: $HEROKU_API_KEY # HEROKU_APP_NAME: $HEROKU_APP_NAME - PACKAGE_PATH="\${GOPATH}/src/bitbucket.org/\${BITBUCKET_REPO_OWNER}/\${BITBUCKET_REPO_SLUG}" - mkdir -pv "\${PACKAGE_PATH}" - tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "\${PACKAGE_PATH}" - cd "\${PACKAGE_PATH}" - go get -v - go build -v - git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD
Hi @[deleted]
It looks like this is go error. I suspect that it is occurring because a specific file cannot be found.
My first suggestion would be to try to debug this build locally using the instructions here https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html. I would be specifically looking for the 'connection' file/folder and the interactions of the variables.
If this works correctly it might be a problem with the PACKAGE_PATH variable. Try echoing that to confirm that it is what you expect.
If none of that works can I ask you to paste your bitbucket-pipelines.yml file again in a code block with the formatting the file normally has and point out the specific step that is throwing the error.
Cheers,
Tom
From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.
Start Learning
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.