You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Save Backstage compatibility report as artifact
- Create markdown file (backstage-compatibility-report.md) with compatibility report
- Upload as artifact for consumption by calling workflows
- Maintain existing step summary behavior
- Handle both compatible and incompatible workspace scenarios
- Artifact retains for 30 days
echo "Some workspaces have a backstage version (in sources or in their overlay folder) which is *__incompatible__* with the target Backstage version (\`${targetBackstageVersion}\`)." >> $GITHUB_STEP_SUMMARY
209
-
echo "${message}:" >> $GITHUB_STEP_SUMMARY
210
-
echo "| Folder | Backstage version | Mandatory | Info |" >> $GITHUB_STEP_SUMMARY
echo "You have 3 main options:" >> $GITHUB_STEP_SUMMARY
223
-
echo '- *__Use the already-opened PR :__* For automatically-discovered workspaces, there might already be an automatically-opened PR that updates the commit to the target backstage version (`Automatic PR` link in column 4 above): just publish the plugins and test them from the PR by following the PR instructions.' >> $GITHUB_STEP_SUMMARY
224
-
echo '- *__Manually update the workspace commit :__*' >> $GITHUB_STEP_SUMMARY
225
-
echo ' - Find a newer commit, with a backstage version compatible with the target backstage version :__*' >> $GITHUB_STEP_SUMMARY
226
-
echo ' - *__Backstage version history available__*: A `BS Version History` link might be available in column 4: in the workspace source repository, it points to the list of commits touching the `backstage.json` file. This would help you finding out whether this workspace has a commit that has been published for the target backstage version.' >> $GITHUB_STEP_SUMMARY
227
-
echo ' - *__No info available__*: If no information is is provided in column 4, the `backstage.json` probably does not exist in workspace sources. You would have to look deeper into the newer commits of workspace sources, possibly in the low-level dependencies in the `package.json` files, to find out a commit with an underlying backstage version compatible with the target backstage version.' >> $GITHUB_STEP_SUMMARY
228
-
echo ' - Then, in the overlay repository, update the `repo-ref` field of the `source.json` file to the new source commit, and remember to also change the `repo-backstage-version` field to the corresponding compatible backstage version.' >> $GITHUB_STEP_SUMMARY
229
-
echo '- *__No compatible commit :__* If the workspace sources contain __*no compatible newer commit*__ ( == a commit that provides a `backstage.json` version compatible with the target backstage), but the current workspace commit is known to work with the target backstage version, then you can override the declared backstage version compatibility for this workspace commit in the overlay repository: add a `backstage.json` file at the root of the overlay workspace folder with the desired target backstage version, and remember to also change the `repo-backstage-version` field of the `source.json` file to the same target backstage version. This would require full testing of the workspace plugins on the target backstage though.' >> $GITHUB_STEP_SUMMARY
206
+
# Create compatibility report markdown file
207
+
REPORT_FILE="backstage-compatibility-report.md"
208
+
209
+
# Write markdown content to both file and step summary
210
+
{
211
+
echo "## Backstage-incompatible workspaces"
212
+
echo ""
213
+
echo "Some workspaces have a backstage version (in sources or in their overlay folder) which is *__incompatible__* with the target Backstage version (\`${targetBackstageVersion}\`)."
214
+
echo "${message}:"
215
+
echo "| Folder | Backstage version | Mandatory | Info |"
echo '- *__Use the already-opened PR :__* For automatically-discovered workspaces, there might already be an automatically-opened PR that updates the commit to the target backstage version (`Automatic PR` link in column 4 above): just publish the plugins and test them from the PR by following the PR instructions.'
229
+
echo '- *__Manually update the workspace commit :__*'
230
+
echo ' - Find a newer commit, with a backstage version compatible with the target backstage version :__*'
231
+
echo ' - *__Backstage version history available__*: A `BS Version History` link might be available in column 4: in the workspace source repository, it points to the list of commits touching the `backstage.json` file. This would help you finding out whether this workspace has a commit that has been published for the target backstage version.'
232
+
echo ' - *__No info available__*: If no information is is provided in column 4, the `backstage.json` probably does not exist in workspace sources. You would have to look deeper into the newer commits of workspace sources, possibly in the low-level dependencies in the `package.json` files, to find out a commit with an underlying backstage version compatible with the target backstage version.'
233
+
echo ' - Then, in the overlay repository, update the `repo-ref` field of the `source.json` file to the new source commit, and remember to also change the `repo-backstage-version` field to the corresponding compatible backstage version.'
234
+
echo '- *__No compatible commit :__* If the workspace sources contain __*no compatible newer commit*__ ( == a commit that provides a `backstage.json` version compatible with the target backstage), but the current workspace commit is known to work with the target backstage version, then you can override the declared backstage version compatibility for this workspace commit in the overlay repository: add a `backstage.json` file at the root of the overlay workspace folder with the desired target backstage version, and remember to also change the `repo-backstage-version` field of the `source.json` file to the same target backstage version. This would require full testing of the workspace plugins on the target backstage though.'
235
+
} | tee -a "$REPORT_FILE" >> $GITHUB_STEP_SUMMARY
230
236
231
237
if [[ "${INPUT_FAIL_FOR_REQUIRED_ONLY}" != "true" ]]
232
238
then
@@ -236,19 +242,22 @@ jobs:
236
242
then
237
243
exit 1
238
244
fi
245
+
else
246
+
# Create empty report file when there are no incompatible workspaces
247
+
REPORT_FILE="backstage-compatibility-report.md"
248
+
{
249
+
echo "## Backstage Compatibility Check"
250
+
echo ""
251
+
echo "✅ All workspaces are compatible with the target Backstage version (\`${targetBackstageVersion}\`)."
252
+
echo ""
253
+
echo "_No action required._"
254
+
} > "$REPORT_FILE"
239
255
fi
240
256
241
-
- name: Generate compatibility report markdown
242
-
if: always() # Generate even if compatibility check failed
243
-
run: |
244
-
# Copy the step summary to a markdown file for artifact
0 commit comments