microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
279 stars 114 forks source link

[Question]: Publish To Environment Action: How to Include Dependencies? #1178

Open SchulzOli opened 4 weeks ago

SchulzOli commented 4 weeks ago

Question

Hi and hello,

We would like to publish an AppSource App (with the AL-GO Template "AL-Go-AppSource") to a SaaS Sandbox Environment with the Action "Publish To Environment"

Our Setup:

This app depends on four other apps. They are in the same Github orga, but in different repos. All Repos are internal (so not public). The CI CD Pipeline uses GITHUBPACKAGESCONTEXT to find the right dependencies. So, we do not use the setting keys "appDependencyProbingPaths" or "installApps" at all.

we use the setting key "deployTo" to publish:

  "deployToPrefix-ProductName-QA": {
    "EnvironmentName": "Prefix-ProductName-QA",
    "ContinuousDeployment": false,
    "Scope": "Dev",
    "SyncMode": "ForceSync",
    "Branches": [
      "main"
    ]
  },

i also tried these two keys (even though I knew that this would probably not change anything):

  "generateDependencyArtifact": true,
  "installOnlyReferencedApps": false,

The Problem / Question

The action "Publish to Environment" fails because the dependent apps cannot be found. Is there a way to publish the Dependencies with this Action as well or is the common approach to install them before this action?

i believe it should work because the script can find and download the dependencies.zip in the "Get Artifacts for deployment" step.:

image

My guess would be: I have to use the "generateDependencyArtifact" for that and its not working yet with the GITHUBPACKAGESCONTEXT?! But seriously - i dont know.

full (anonymized) log here: log.txt

freddydk commented 3 weeks ago

Will try to create a repro of this to see whether this is a bug

AlexanderRichter commented 4 days ago

Hey there, i am experiencing pretty much the same thing.

I included all apps i want to install in a Dependency Folder in the Repository.

The al-go settings contain these apps.

{
  "type": "PTE",
  "templateUrl": "https://github.com/microsoft/AL-Go-PTE@main",
  "generateDependencyArtifact": true,
  "installOnlyReferencedApps": false,
  "installApps": [
    "./Dependencies/Continia Software_Continia Core_8.0.0.222571_release_Runtime 21.1.48363.48638.app",
    "./Dependencies/Continia Software_Continia OPplus_22.0.1.32781_release_Runtime 21.1.48363.48638.app"
  ]
}

The App i am working on has a dependency to one of the tapps listest in the installapp array.

image

The Build and the Delivery Steps works as expected. The Artifact contains the the dependend apps.

When it comes do the Deplyoment Step the Dependencies Artifact is donwloaded but not installed

logs_28446302053.zip