Octopus Build Error in GitHub

Error: The Octopus instance URL is required, please specify explicitly through the ‘server’ input or set the OCTOPUS_URL environment variable.

this is the error we are currently getting when we build anything in github. I have updated everything for v3 and that fixed the first error but even though we created a github secret to store the octopus url it still isn’t building.

Hi @sabrina.grosse,

Thanks for reaching out to Octopus Support, and I’m sorry you’re experiencing issues with your GitHub Action.

Which of the Octopus actions are you seeing this error in? Would you be willing to share the YAML from your workflow with us? We may spot something by comparing it against our known working workflows. If you are ok sharing that, I can send you a secure upload link you can use.

I look forward to hearing back, and please let me know if you have any questions.

Thanks!
Dan

This is what the script is and it errors here but we don’t point to the OCTOPUS_SPACE: ‘Spaces-1’ environment that is set above and could that be it?

Hi Sabrina,

Thanks for following up and providing that information. I’ll jump in for Dan for the time being, as he’s currently offline in our US-based team. :slight_smile:

You may be right that pointing to the space ID might be the cause - could you try pointing to the space name instead?

Looking at your screenshot you uploaded, the server is configured as ${{ env.OCTO_URL }} whereas your original message mentions OCTOPUS_URL environment variable. Could that be the cause, or just a typo?

I look forward to hearing back!

Best regards,

Kenny

Thank you that was it for the most part! Now I’m getting a different error while trying to use the octo command and it isn’t recognizing it.

Here’s another error message

Hey Sabrina,

Just jumping in for Kenny as he is on weekend.

The create-release one can be resolved by adding the Install Octopus CLI step(this will need to be before the create-release step):

For the other error, I believe it is looking for the name, so in your case, Spaces-1 is typically Default.

Can you try setting that parameter in your yaml to ‘Default’ and see if it works?

Best,
Jeremy

I have it installed here, or that not correct?

That’s the one, that should work, assuming your create-release step is hitting the same GitHub Runner. Sorry for the potentially dumb question, but they’re not by chance set to use different machines are they?

If you’d like you can send me your entire YAML in a DM for me to take a look.

Best,
Jeremy

sure I can

Thanks for sending that along.

I’ve never tried to use octo commands outside of the official Octopus steps. Can I ask if there’s any reason why you are calling the octo create-release in a script step rather than using our step?

I’m thinking it might come down to how the Install Octopus CLI step drops octo in place and later steps call it. It might not be as simple as calling octo without anything extra.

Looking forward to hearing back.

Best,
Jeremy

This has been working fine in the past but could it be because of the update in version?

Hey Sabrina,

Just to confirm, do you mean the update in the version of one of the steps in the GHA pipeline? Going up a major version on the GHA steps typically have significant changes so that’s a possibility. Which step did you upgrade and from what version?

Best,
Jeremy

We went from @v1.1.8 to @v3 and upgraded most of the octopus steps to all @v3 because we were getting errors from set-output depreciated

Hey Sabrina,

That could definitely explain it. A ton of things that happen behind the scenes changed from v1 to v3 on the GHA steps.

Were you able to get it working with v3 with the suggestions or are we still in a bad state?

Best,
Jeremy

I decided to start over since my changes were getting a little confusing so I’m reowrking it right now and I reverted back to the origin version. Would you suggest i jump from v1 to v3 or something else?

Once I try updating the version again I’ll see if I get any new errors because right now it’s gone back to this warning:

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, OctopusDeploy/install-octopus-cli-action@v1.1.8, OctopusDeploy/push-build-information-action@v1.0.1.

It all depends on if you need functionality that’s in v3 or not. If v1 was working for you then there is likely no huge impetus to change right away.

We can continue to troubleshoot v3 if you want to go down that route.

Let us know what you end up deciding and how it goes if you get time.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.