AL-Go
AL-Go copied to clipboard
New development branch does not keep it's artifacts
I've made a new branch 'development'. I've got a project Excise, depending on project Core, in the same repository.
When making a change in the Excise app in a seperate branch, and creating a PR to the development branch, the CICD build fails. It can't find the core app, Excise is depending on.
ArtifactPattern: Core-development-Apps-*
Could not find any Apps artifacts for projects Core, version latest
How can I make development keep it's artifacts?
PS. can this error be improved, with the app name that's not found?
Processing dependency Dynavision_Dynavision Core_22.0.7.0 (dbe4cf4c-5910-4ad1-beee-394010c59802)
Downloading symbols: Dynavision_Dynavision Core_22.0.7.0.app
Url : http://172.22.23.157:7049/BC/dev/packages?appId=dbe4cf4c-5910-4ad1-beee-394010c59802&versionText=22.0.7.0&tenant=default
Downloading using WebClient
ERROR Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
Could you upload or email the complete build log (download in top right corner)
Is it true that in the development branch, you never actually had a successful build? If there is a successful CI/CD workflow - doesn't that one have artifacts published?
Thanks
The CICD for development ran succesfull, but didn't published any artifacts.
(pull request merges, give the same artifacts)
For main branch, there are artifacts:
Thanks for the help!
This is a bug
There are 2 problems:
- We avoid publishing artifacts for builds in branches to avoid excessive number of artifacts, but when you have a setup with useProjectDependencies, they are actually needed by the Pull Request build as you discovered,
- When you create a branch and before you have a successful build in that branch, you won't have a build to use, meaning that you cannot find any build even if it was published.
Current workaround for you would be to add "alwaysBuildAllProjects": true to your repository settings (.github/AL-Go-Settings.json) - in the development branch. You can also use conditional settings and add it to the main branch and then update the development branch. https://aka.ms/algosettings#conditional-settings
We will have a look at how to fix this
Thank you!
Could an extra setting like "KeepBuildArtifacts" with the branch names (default on "main") to keep the latest artifacts, be an idea? fe, if you also want to save the artifacts of the latest release?
"alwaysBuildAllProjects" will definitely do the trick for now. Thank you for your assistance. 😃
We will consider this and other options
As a reference, here's some more info on the branching strategy used:
- dev/feature : feature branches per developer
- development : all completed features that are ready to test > this branch will be used to update QA environment
- main : all completed features that are ready to be released > this branch will be used to release (AppSource)
The development branch is a crucial branch allowing us to merge all features to QA and merge to main once the feature has been succesfuly tested. Main is releasable at all time, and no cherry picking of features is required before releasing.
Would be great if we can somehow mark 'development' branch as to keep artifacts.
Will look into this.
BTW - one way to make your development branch keep artifacts is to setup continuous deployment to a QA environment. Then it will trigger artifacts to be kept.
Thx for the feedback.
FYI, I haven't setup a working proof of concept for the CD part here internally, but what we would like to achieve is to do a scheduled deploy on specific times, so not upon each CI build.
E.g.
- Build 1 - Repo 1 : update apps > do not deploy
- Build 2 - Repo 2 : update apps > do not deploy
- Build 3 - Repo 1 : update apps > do not deploy
- Repo 4 - Repo 1 : update apps > do not deploy
- Repo 5 - Repo 1 : update apps > do not deploy
12:00 : Deploy all recent changes (from repo 1 / 2) to QA
... Builds ...
18:00 : Deploy all recent changes (from repo 1 / 2) to QA
On Azure DevOps, we currently do not deploy whenever a CI build succeed, not to block users who are currently working / testing on QA or maybe even a consultant giving a demo. Deployments are gated and require approval.
That might require a feature in AL-Go as well in order to be setup. Will think about that one
Will look into this.
BTW - one way to make your development branch keep artifacts is to setup continuous deployment to a QA environment. Then it will trigger artifacts to be kept.
Can you illustrate what that would look like in Settings? If we want a development branch (called Develop) to always deploy to our test environment called OURQA, would that look like this:
"DeployToOURQA": { "Branches": [ "Develop" ] }