AL-Go icon indicating copy to clipboard operation
AL-Go copied to clipboard

Release to Environment - 0 Environments

Open tscottjendev opened this issue 2 years ago • 17 comments

My Release to Environment it does not seem to be pushing apps to the environment specified. What am I missing?

settings.json contains:

  "environments": [
    "QA",
    "DEVTEST"
  ]

Log output shows no environments.

Trying to get environments from GitHub API main main EnvironmentsJson={"matrix":{"include":[]},"fail-fast":false} EnvironmentCount=0

GitHub Environments defined image

Secrets defined in Repo image

logs_33.zip

tscottjendev avatar Feb 28 '23 07:02 tscottjendev

Im not sure if it makes a diffrence but I always configure my enviroments this way image

And I never mention them in any settings file.

jonaswre avatar Feb 28 '23 20:02 jonaswre

I have setup my Environments and Secrets per your suggestions and l have removed the environments from the settings.json. Still the same results. What am I missing?

Logs: logs_46.zip

tscottjendev avatar Mar 03 '23 07:03 tscottjendev

I have a different error today related to the deployment from the CICD action. Does it shed any additional light? Ignore the DEV error it should updated at the moment. logs_66.zip

tscottjendev avatar Mar 13 '23 15:03 tscottjendev

image Looks like your refreshtoken expired or like

freddydk avatar Mar 13 '23 16:03 freddydk

I have create the token per the PowerShell in this article: https://freddysblog.com/2022/05/06/deployment-strategies-and-al-go-for-github/

$AuthContext = New-BcAuthContext -includeDeviceLogin
Get-ALGoAuthContext -bcAuthContext $AuthContext | Set-Clipboard

I get a token that looks like this: {"TenantID":"<tenantID>","Scopes":"https://api.businesscentral.dynamics.com/","RefreshToken":"0.AUgAgIe9q6...oZM"}

Which looks a little different than the token in your article. Your example does not start with {"TenantID":...

Does this look correct?

tscottjendev avatar Mar 14 '23 08:03 tscottjendev

Yes, that is correct - the order of properties in the compressed json is random - in my sample, the tenantId and scopes is later (i.e. not visible)

The refreshtoken is only valid for 90 days though - it has to be renewed.

freddydk avatar Mar 14 '23 08:03 freddydk

I have refreshed the token and now it does not error out but it doesn't deploy to any environments either.

Logs: logs_73.zip

tscottjendev avatar Mar 14 '23 13:03 tscottjendev

It cannot find any environments

freddydk avatar Mar 14 '23 15:03 freddydk

Per @jonaswre I have set up my environments image and they match my environments. image

What else do I need to do?

tscottjendev avatar Mar 14 '23 15:03 tscottjendev

Looks correct - the pipeline just doesn't find them, cannot see why from here. You can add me to the repo, then I can see if I can see why

freddydk avatar Mar 14 '23 16:03 freddydk

@freddydk I am just back from annual leave. Let me get organised and I will add you to the repo.

tscottjendev avatar Apr 11 '23 10:04 tscottjendev

Did you manage to make this work - or are you still having issues with this?

freddydk avatar Apr 30 '23 15:04 freddydk

I still have this problem and need assistance. Could we arrange some one on one time to work through this?

tscottjendev avatar May 01 '23 06:05 tscottjendev

Did you upgrade to the latest version of AL-Go for GitHub and try on that one? If you have, and that fails, we can schedule a Teams call tomorrow 11:00 (CET timezone) if you like, then we can have a look at what's wrong. Please send and invite to freddyk at microsoft dot com, thanks

freddydk avatar May 01 '23 06:05 freddydk

@freddydk any progress on getting this resolved?

tscottjendev avatar May 12 '23 06:05 tscottjendev

Still need to get this resolved.

tscottjendev avatar Jul 26 '23 06:07 tscottjendev

Going through old issues - was this one resolved?

freddydk avatar Feb 21 '24 09:02 freddydk