- Issue created by @drumm
- π¬π§United Kingdom scott_euser
We could put the Gitlab Pipeline badge on the project page for all projects. Or if we want it to be opt-in, either allow git.drupalcode.org as an image source that users can add to their project text (currently blocked as an image source), or a checkbox in the project settings. Once Drupal CI is completely gone, with the latter approach, it would be simpler to remove the checkbox and add the badge everywhere.
Example of badge on pipelines passing:
https://git.drupalcode.org/project/unified_date/badges/1.x/pipeline.svg?...Example of a badge where there are no pipelines:
https://git.drupalcode.org/project/simple_user_management/badges/8.x-1.x... - πͺπΈSpain fjgarlin
I suggest that they both (DrupalCI and GitlabCI) co-exist for now, giving more relevance to GitlabCI.
Proposal:
Project page
Automatic testing page
Issue page:
For projects without GitlabCI, adding the badge will look like , which might encourage people to move to GitlabCI.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I like that proposal! π€©
- π¬π§United Kingdom scott_euser
Sounds/looks great to me as well thanks!
- πΊπΈUnited States drumm NY, US
For issue pages - we should take cues from GitLabβs UI, since thatβs where weβre going. Under βRelated merge requestsβ at https://gitlab.com/gitlab-org/gitlab/-/issues/17909, thereβs only a check/slash/x. And I think we only need it in the fork/MR summary at the top. We probably should file a separate issue for issue pages.
For project pages - I do want to go ahead and remove the Drupal CI results right away. Drupal CI is very much in maintenance mode, the sooner people move, the better.
- πͺπΈSpain fjgarlin
Note that those icons don't have a "magic" URL which means that we will need to do some API calls to get the status before we render things, or via javascript.
The URL
https://git.drupalcode.org/project/MODULE_NAME/badges/BRANCH/pipeline.svg
will be the same and gitlab will take care of which image to serve (success, fail, running...).I checked to see if there is a similar way to get the icons but couldn't find any. We'd need to make a call to get the last pipeline (https://docs.gitlab.com/ee/api/pipelines.html#get-the-latest-pipeline), or an MR pipeline (https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr) to get the status, and then extract the favicon from there.
I guess we can leverage the JS that is running already in the pages.
- πΊπΈUnited States drumm NY, US
For the icons/badges - we should consider accessibility. The img tag will have no meaning without the visual content of the image.
On issue pages - this is temporary as issues are migrating. So we just have to be good enough for accessibility and visual styling. And the full results will be a click away, so the information can be gotten to.
On project pages - if we do want to keep CI results on project pages, that will have to be accessible and good to keep indefinitely.
- @fjgarlin opened merge request.
- Status changed to Needs review
about 1 year ago 11:03am 24 August 2023 - πͺπΈSpain fjgarlin
Thanks for the feedback Neil.
Here is a first pass at the project page and qa page: https://git.drupalcode.org/project/drupalorg/-/merge_requests/184
I brought the icons to be loaded locally from here: https://gitlab.com/gitlab-org/gitlab/-/tree/master/app/assets/images/ci_...It also needs some minor bluecheese styling changes that are here [##3383078]
I introduced a flag variable called
drupalorg_drupalci_display_results
that we can set via drush to stop displaying DrupalCI results on project pages and also on the QA pages.It seems that the blue box in the QA page is controlled via a variable, so I suggest just changing to "Automated testing is..." instead of mentioning the name of any tool.
Testing
* Project page with GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/project/config_notify
* Project page without GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/project/webform
* QA page for project with GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/node/3114688/qa
* QA page for project without GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/node/7404/qa - πΊπΈUnited States drumm NY, US
For the Automated testing page, I think that should fall away with Drupal CI and eventually be deleted. We donβt need to try implementing any summary of GitLab results. We can add text like:
<a href="[gitlab project path]/-/pipelines">View GitLab CI pipelines for this project</a> GitLab CI is now preferred over DrupalCI for testing. Please remove DrupalCI testing once you have GitLab CI set up. <a href="/docs/develop/git/using-gitlab-to-contribute-to-drupal/gitlab-ci">View documentation for setting up GitLab CI</a>
- πͺπΈSpain fjgarlin
As per feedback via zoom. We'll remove the new endpoint and query the gitlab api directly from the javascript.
We will also show more information (TBC) on the project pages about GitLab CI. - Status changed to Needs work
about 1 year ago 8:11am 25 August 2023 - Status changed to Needs review
about 1 year ago 8:51am 25 August 2023 - πͺπΈSpain fjgarlin
This is ready to review again. The MR is much simpler now, thanks for the suggestions.
Copying from #12 testing and changes information.
MR: https://git.drupalcode.org/project/drupalorg/-/merge_requests/184
It also needs some minor bluecheese styling changes that are here β¨ Support new gitlab icons Fixed
I introduced a flag variable called
drupalorg_drupalci_display_results
that we can set via drush to stop displaying DrupalCI results on project pages and also on the QA pages.It seems that the blue box on the QA page is controlled via a variable, so I suggest just changing it to "Automated testing is..." instead of mentioning the name of any tool.
Testing
* Project page with GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/project/config_notify
* Project page without GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/project/webform
* QA page for project with GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/node/3114688/qa
* QA page for project without GitlabCI: https://fjgarlin-drupal.dev.devdrupal.org/node/7404/qa - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Nice progress!
Some thought on this:
- That's very easy to miss. Don't we want that to be a bit more visually prominent? Maybe just wrapping in
<strong>
is enough? - Can't we detect if GitLab CI has been set up and then make that warning even more visually prominent? Maybe add
β οΈ
emojis? - Why not omit the DrupalCI section altogether when it's not present anymore?
- That's very easy to miss. Don't we want that to be a bit more visually prominent? Maybe just wrapping in
- πͺπΈSpain fjgarlin
Thanks for the feedback! Ideally, that QA page will completely go away when we turn off DrupalCI (pift module and related).
Having said that...- Totally agree with giving it more prominence, so I added a class "nudge" (bluecheese has a few helper classes to add that we can test with, you can try: "nudge", "note", "note-tip", "note-warning"...). I gave it the "nudge" class for now.
- That'll mean an extra api call on that page, which based on the feedback of #13, we might not want to do.
- I also added the flag
drupalorg_drupalci_display_results
to actually hide anything DrupalCI related without turning the module off. So we can control visibility of those sections via a drush command.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Yes, BEAUTIFUL! π€©
Not that it's necessary, but β¦ consider my feedback addressed π Makes sense we'd rather spend less time on making the current d.o nice and just wait for PIFT to get turned off!
RTBC as far as I'm concerned π
-
drumm β
committed 64184a7a on 7.x-3.x authored by
fjgarlin β
Issue #3379791: Remove DrupalCI results from project pages, or replace...
-
drumm β
committed 64184a7a on 7.x-3.x authored by
fjgarlin β
- @fjgarlin opened merge request.
-
drumm β
committed 99e3fd86 on 7.x-3.x authored by
fjgarlin β
Issue #3379791: Add setting for GitLab CI results on project pages
-
drumm β
committed 99e3fd86 on 7.x-3.x authored by
fjgarlin β
- Status changed to Fixed
about 1 year ago 3:38pm 1 September 2023 - πΊπΈUnited States drumm NY, US
This has been deployed! For example, https://www.drupal.org/project/api β
Automatically closed - issue fixed for 2 weeks with no activity.