Skip Deliver and Deploy when no app artifacts exist#2129
Skip Deliver and Deploy when no app artifacts exist#2129
Conversation
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
…artifacts are found
…vior for delivery and deployment jobs when no app artifacts are available
…com/microsoft/AL-Go into copilot/fix-deliver-to-blob-storage
|
@copilot it seems the solution works. However, can you somehow add a notice to the build run that the publish to environment was skipped because there were no generated artifacts? |
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
…rtifacts Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Added notice steps in commit 5542516. When deployment or delivery is skipped due to no app artifacts, a notice will now appear in the workflow run:
|
There was a problem hiding this comment.
Pull request overview
Updates AL-Go documentation and release notes to describe that Deploy/Deliver are skipped when no .app artifacts exist, to avoid failures on empty/initial runs.
Changes:
- Add “Automatic Skip Behavior” notes to the Continuous Deployment and Continuous Delivery workshop docs.
- Document skip behavior implications for custom delivery scripts in
Scenarios/DeliveryTargets.md. - Add a release note entry for Issue 2126 about skipping Deliver/Deploy when no app artifacts are present.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Workshop/ContinuousDeployment.md | Adds a note about deployment being skipped when no .app artifacts exist. |
| Workshop/ContinuousDelivery.md | Adds a note about delivery being skipped when no .app artifacts exist. |
| Scenarios/DeliveryTargets.md | Clarifies that custom delivery scripts won’t run if delivery is skipped due to missing app artifacts. |
| RELEASENOTES.md | Adds a release note entry referencing Issue 2126 and the new skip behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Scenarios/DeliveryTargets.md
Outdated
|
|
||
| > **Note:** The folder parameters (`*Folder`) may be `$null` if no artifacts of that type were found. The plural versions (`*Folders`) contain arrays of all matching folders across different build modes. | ||
|
|
||
| > **Important:** The delivery step is automatically skipped at the workflow level when no app artifacts are available. This means your custom delivery script will not be executed if no app artifacts were built. This behavior prevents errors on initial commits, failed builds, or branches without code changes that produce artifacts. |
There was a problem hiding this comment.
@copilot can you please adjust this doc?
The "failed builds" part is not accurate as the delivery logic doesn't run if the build was not successfull.
The "branches without code changes that produce artifacts" part is also out of context, please remove.
There was a problem hiding this comment.
Updated in commit cb11b6e. Removed the inaccurate "failed builds" and "branches without code changes that produce artifacts" parts. The note now simply states that the behavior prevents errors on initial commits when no apps have been built yet.
…behavior Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
❔What, Why & How
This pull request improves the CI/CD workflow for both AppSource App and Per Tenant Extension templates by ensuring that the Deploy and Deliver actions are only executed when app artifacts are present. This prevents errors that could occur on initial commits or when no artifacts are generated.
Workflow improvements for artifact handling:
Added a conditional check (
if: hashFiles('.artifacts/**/*.app') != '') to the Deploy step inTemplates/AppSource App/.github/workflows/CICD.yamlandTemplates/Per Tenant Extension/.github/workflows/CICD.yamlto skip deployment when no.appartifacts are found.Added the same conditional check to the Deliver step in both workflow files to skip delivery when no artifacts are present.
Added notice steps that display informative messages when Deploy or Deliver steps are skipped due to no app artifacts:
E.g.
Documentation updates:
RELEASENOTES.mdto document that Deliver and Deploy actions now skip execution when no app artifacts are found, preventing errors on initial commits.Scenarios/DeliveryTargets.mdto clarify that custom delivery scripts will not execute when delivery is skipped due to missing app artifacts, specifically noting this prevents errors on initial commits when no apps have been built yet.✅ Checklist
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.