Problem/Motivation

The child pipeline rebuilds the composer and yarn artifacts; we should be able to retrieve them from the parent pipeline.

Steps to reproduce

Proposed resolution

Use needs:pipeline:job: https://docs.gitlab.com/ee/ci/yaml/#needspipelinejob

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#10 3388693-nr-bot.txt90 bytesneeds-review-queue-bot

Issue fork drupal-3388693

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

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs work
longwave’s picture

Not sure what I am doing wrong here. I think I have followed the docs in https://docs.gitlab.com/ee/ci/pipelines/downstream_pipelines.html?tab=Pa... but the child pipeline immediately fails with "This job could not start because it could not retrieve the needed artifacts."

The parent pipeline seems OK and the other jobs there correctly download the artifacts.

longwave’s picture

Seems to be working! The error I made previously was that the default variables is overwritten by the job-specific variables.

This still needs work to tidy up the variables and also the use of the caches, some of which is redundant now.

catch’s picture

I just opened #3391608: Move lint jobs to the pipeline (moving everything to the child pipeline) which would conflict with this. The goal is very similar so we should go ahead here and then the other issue will have a better baseline to deal with.

longwave’s picture

Status: Needs work » Needs review

Cleaned up the use of cache - we only need this in the build steps, after this we are passing around artifacts instead and so the lint and test jobs don't need caches.

Also moved stage in the child pipeline to the defaults, given that we only have one stage now.

longwave’s picture

Also ensured that build (and lint) run on scheduled pipelines, because the test jobs now need the parent build job artifacts.

catch’s picture

This covers 90% of what I wanted to get from #3391608: Move lint jobs to the pipeline and the last 10% is quite marginal, so closed as duplicate.

MR looks great to me.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

longwave’s picture

Status: Needs work » Needs review

Rebased.

catch’s picture

Status: Needs review » Reviewed & tested by the community

This is excellent and low risk. Will commit in ~24 hours if no objections, or sooner if there's a +1.

fjgarlin’s picture

+1 from my side for what is worth.

I love the ability of referencing parent pipelines jobs in the “needs” section. I think it’sa great refactoring.

  • lauriii committed 4a70e448 on 11.x
    Issue #3388693 by longwave, catch, fjgarlin: Use composer and yarn...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Nice work @longwave! 👏

Committed 4a70e44 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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