Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
automatic_updates
Commits
34e72b15
Commit
34e72b15
authored
1 year ago
by
Ted Bowman
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3411392
: Build tests fail on core merge requests
parent
db6979fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1012
Resolve #3411392 "Core mr build tests"
Pipeline
#69654
passed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package_manager/tests/src/Build/TemplateProjectTestBase.php
+4
-0
4 additions, 0 deletions
package_manager/tests/src/Build/TemplateProjectTestBase.php
scripts/src/ConverterCommand.php
+9
-1
9 additions, 1 deletion
scripts/src/ConverterCommand.php
with
13 additions
and
1 deletion
package_manager/tests/src/Build/TemplateProjectTestBase.php
+
4
−
0
View file @
34e72b15
...
...
@@ -270,6 +270,10 @@ END;
// Allow pre-release versions of dependencies.
$this
->
runComposer
(
'composer config minimum-stability dev'
,
$template_dir
);
// CORE_MR_ONLY:// Allow any version of Drupal core as in test using a git clone on Gitlab
// CORE_MR_ONLY:// core will be checked out at a specific commit hash.
// CORE_MR_ONLY:$this->runComposer("composer require --no-update drupal/core:'*'", "composer/Metapackage/CoreRecommended");
// Remove the packages.drupal.org entry (and any other custom repository)
// from the template's repositories section. We have no reliable way of
// knowing the repositories' names in advance, so we get that information
...
...
This diff is collapsed.
Click to expand it.
scripts/src/ConverterCommand.php
+
9
−
1
View file @
34e72b15
...
...
@@ -155,7 +155,15 @@ class ConverterCommand extends Command {
static
::
info
(
"Applying core patches"
);
print_r
(
$patches
);
foreach
(
$patches
as
$file
)
{
static
::
executeCommand
(
"patch -d
{
$this
->
core_dir
}
-p1 <
$file
"
);
$patch_result
=
NULL
;
$output
=
[];
// Patch but ignore previously applied patches.
exec
(
"patch -d
{
$this
->
core_dir
}
-p1 -N -r - <
$file
"
,
$output
,
$patch_result
);
if
(
$patch_result
!==
0
)
{
if
(
!
str_contains
(
implode
(
"
\n
"
,
$output
),
'Ignoring previously applied (or reversed) patch.'
))
{
throw
new
\Exception
(
"Patch failed:
$file
"
);
}
}
}
// Switch to the core directory and require all of the packages there are in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment