Found Unresolved Variables

Receiving an error in a customers pipeline and not sure how to addresses this particular error. It’s attempting to pass in a app insight key value but is actually passing in the name of the value. Below is the ApplicationInsights.Release.config attempting to pass in this value.

<?xml version="1.0" encoding="utf-8"?>

** #{HubPayInstrumentationKey}**

Hi @UGrant,

Thank you for contacting Octopus Support.

Apologies for the obvious question, have you checked the Project Variables Preview to verify if #{HubPayInstrumentationKey} is resolving with the expected value for this target/step?

I don’t recognize the Found unresolved variables message. Is this a custom script? Also, what version of Octopus Server are you currently running?

Let me know at your earliest convenience.

Regards,
Donny

Hello Donny,

So the variables exist in the library set global variables not in the specific project but this is how other projects that work are setup. This is an old version of Octopus v 2018.8.8. Essentially attempting to pass these keys in per environment.

I found a couple of related issues but nothing that jumped out - https://octopusdeploy.uservoice.com/forums/170787-general/suggestions/10446501-fail-the-deploy-if-any-missing-variable-substituti

image009.png

image010.png

image011.png

image012.png

image013.png

Hi @UGrant,

Thank you for getting back to me.

The Variables Preview for the Project includes Library Variable Sets connected to the project as well. It’s worth checking to make sure something unexpected isn’t happening.

Could you provide a Process JSON for the project in question?

Also, could you turn on variable logging, create a new release, then provide a raw task log?

I look forward to hearing back from you.

Regards,

Will do. Attached.

image001.png

image009.png

image010.png

image011.png

image012.png

image013.png

image007.png

deploymentprocess-Projects-443.json (36 KB)

Hi @UGrant,

Thank you for getting back to me.

Were you able to confirm that the variable is resolving as anticipated via the Variable Preview page? If you don’t want to attach the raw task log to this post directly, you may PM me or I can even provide a secure upload link if you need it as well.

Let me know at your earliest convenience.

Regards,
Donny

Yes it looks to be resolving as it should in the preview page. Can you send an upload link please?

image001.png

image009.png

image010.png

image011.png

image012.png

image013.png

Hi @UGrant,

Thank you for getting back to me.

Here is a secure upload link: Support - Octopus Deploy

Let me know if you have any trouble with it.

Regards,
Donny

Thanks Donny. Done.

image001.png

image009.png

image010.png

image011.png

image012.png

image013.png

Hi @UGrant,

Thank you for uploading that.

Looking at the task log at line 79 (and line 44 in the Process JSON), it looks like variable substitution is set only for the file named App.Release.config. I would try pointing this at ApplicationInsights.Release.config as well. The replacement on ApplicationInsights.config using ApplicationInsights.Release.config happens on line 604, so the replacement is happening in the right place, just without the additional file it needs.

Let me know if adding the filename to the list in the step for Substitution Variables in Files works for you.

Regards,
Donny

Hello Donny,

I’ve included Chris on this chain as this is his app. Is it possible to elaborate a bit more on where to make those suggested changes?

image001.png

image009.png

image010.png

image011.png

image012.png

image013.png

Hi @UGrant,

Thanks for keeping in touch! I’ll jump in here for Donny as he’s now outside of his work hours. :slight_smile:

Donny’s suggestion is to add the ApplicationInsights.Release.config file name to the list of Target Files in the Substitute Variables in Templates feature on your package step. The screenshot below is where this is located.

I hope that helps! Let us know how you go.

Best regards,

Kenny

Much appreciated Kenneth and Donny!

That solved the issue.

image001.png

image009.png

image010.png

image011.png

image012.png

image006.png

image007.png

image008.png

1 Like

Hi @UGrant,

Thank you for getting back to us. Glad to hear it worked for you.

If we can assist with anything else, please let us know. Have a great weekend!

Regards,
Donny

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