Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In GitLab CI, render Cake tasks as collapsible sections #239

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

ap0llo
Copy link
Contributor

@ap0llo ap0llo commented Aug 30, 2024

Extends the module for GitLab CI with a custom CakeEngine that adds collapsible sections to the GitLab CI log (analogous to the groups in GitHubActionsEngine)

See Also: https://docs.gitlab.com/ee/ci/yaml/script.html#custom-collapsible-sections

I tried this out in a sample GitLab project and with the engine enabled, the output looks like this

image

  • Task-1 and Task-2 are Cake tasks and rendered as collapsible section
  • The build setup and teardown are rendered as sections as well
  • By default, all sections are expanded. In the screenshot, I collapsed everything manually except for the output of Task-2

@ap0llo ap0llo force-pushed the gitlab-ci-log-sections branch from 6e95c16 to 1ebd22d Compare August 30, 2024 20:01
Extend module for GitLab CI with a custom CakeEngine that adds collapsible sections to the GitLab CI log (analogous to the groups in GitHubActionsEngine)

For reference on the collapsible sections in GitLab CI, refer to https://docs.gitlab.com/ee/ci/yaml/script.html#custom-collapsible-sections
Highlight the section header in the GitLab CI log to make it easier to differentiate between the section header and the log output inside the section
Instead of just using the task name as section header, use "Executing task TASKNAME".
This makes the section headers more consistent with the section headers used by GitLab CI which uses e.g. "Executing "step_script" stage of the job script"
@nils-a nils-a force-pushed the gitlab-ci-log-sections branch from e06e5d7 to 367377e Compare September 30, 2024 17:57
@nils-a nils-a added the Feature label Sep 30, 2024
@nils-a nils-a added this to the vNext milestone Sep 30, 2024
@nils-a nils-a enabled auto-merge September 30, 2024 17:58
Copy link
Contributor

@nils-a nils-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for getting this done!

@nils-a nils-a modified the milestones: vNext, 7.1.0 Sep 30, 2024
@nils-a nils-a merged commit 58752b8 into cake-contrib:develop Sep 30, 2024
5 checks passed
@cake-contrib-bot
Copy link

🎉 This issue has been resolved in version 7.1.0 🎉
The release is available on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants