kine / MSDYN365BC_Yaml

Yaml templates for CI/CD for Micrsoft Dynamics 365 Business Central
MIT License
20 stars 18 forks source link

Build fails while compiling apps #2

Closed CriticalMax closed 5 years ago

CriticalMax commented 5 years ago

Hey Kamil, my builds are currently failing while trying to compile your "MainApp". The error I get is coming from the navcontainerhelper module: Invoke-RestMethod : The remote server returned an error: (401) Unauthorized. I added all neccessary files and the build definition into my repository. My build agent is set up correctly (Atleast I think so). Had to do some extra stuff, like installing nuget as a packageprovider once but that is besides the point. It seems like the build definition doesn't pass my credentials all the way through. Do you have any idea?

CriticalMax commented 5 years ago

Also when I try to download the Symbols manually on my Agent I can't access the url.

kine commented 5 years ago

I assume that it fails when downloading the symbols. By default, I am using windows authentication, thus the scripts need password for the user, under which the agent is running. This could be set through variable on the pipeline with name USER.PASSWORD (set it as password to not show the value). I am using the Variable group to store this and link to the pipeline. This password should be passed in the yaml file in variables section into UserPwd variable (using UserPwd: $(USER.PASSWORD) ). Check that it is correctly entered.

CriticalMax commented 5 years ago

Just tried that, resulted in sqlcmd errors while preparing the environment.

CriticalMax commented 5 years ago

Fixed it, my yaml file was messed up somehow. Thanks for your help!