Problem/Motivation

Drupal core makes reference to this project's variables and workflows files, as seen here: https://git.drupalcode.org/project/drupal/-/blob/11.x/.gitlab-ci.yml?ref...

For example, core pipelines do fail when run on tags as seen here https://git.drupalcode.org/project/drupal/-/pipelines/78804
The reason is because they have this code in the "composer" job:

# Let composer know what self.version means.
  COMPOSER_ROOT_VERSION: "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}${CI_COMMIT_BRANCH}-dev"

But none of those two variables are available on tags, so the string ends up being "-dev".

We would need to fix this issue outside of core, in the "gitlab_templates" (ie: #3419993: Do not run pipelines on tags for Drupal core), which drives GitLab CI integration for all contrib.
This might not be ideal for core development.

Steps to reproduce

-

Proposed resolution

As agreed with @catch and @longwave in this slack thread (https://drupal.slack.com/archives/C03P8AM3B0Q/p1707206740501299), move the files to core.

Remaining tasks

MR

Issue fork drupal-3420042

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Status: Active » Needs review

Pending pipelines coming green (https://git.drupalcode.org/issue/drupal-3420042/-/pipelines/90419), this is ready to review.

catch’s picture

This is a lot less than I would have expected to need to bring in, so makes sense to consolidate.

longwave’s picture

Status: Needs review » Needs work

A few questions about the rules.

fjgarlin’s picture

Status: Needs work » Needs review

All questions/feedback were addressed.

Only one of them wasn't done, and I gave my reasons why I think it's ok to leave it as it is.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

OK, let's leave the variable as-is for now, it can't hurt. The other changes look good and simplify things a bit further, I think this is ready to try for real!

alexpott’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 1366a3ae13 to 11.x and 129230f1c3 to 10.3.x and da6376b9b9 to 10.2.x. Thanks!

Backported to 10.2.x as this is not runtime code.

  • alexpott committed da6376b9 on 10.2.x
    Issue #3420042 by fjgarlin, longwave, catch: Bring external template...

  • alexpott committed 129230f1 on 10.3.x
    Issue #3420042 by fjgarlin, longwave, catch: Bring external template...

  • alexpott committed 1366a3ae on 11.x
    Issue #3420042 by fjgarlin, longwave, catch: Bring external template...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.