Bugzilla – Attachment 186368 Details for
Bug 39877
CI - Incremental runs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39877: Do not clone if env var is not set
Bug-39877-Do-not-clone-if-env-var-is-not-set.patch (text/plain), 1.98 KB, created by
Jonathan Druart
on 2025-09-11 08:21:34 UTC
(
hide
)
Description:
Bug 39877: Do not clone if env var is not set
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-11 08:21:34 UTC
Size:
1.98 KB
patch
obsolete
>From 2c72d18ed04901dd9ad309580c802bc3b32c60d0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 11 Sep 2025 09:57:51 +0200 >Subject: [PATCH] Bug 39877: Do not clone if env var is not set > >If we don't want the incremental run we should return early in ->new to >prevent the git clone. >--- > Koha/Devel/CI/IncrementalRuns.pm | 28 +++++++++++++++------------- > 1 file changed, 15 insertions(+), 13 deletions(-) > >diff --git a/Koha/Devel/CI/IncrementalRuns.pm b/Koha/Devel/CI/IncrementalRuns.pm >index bb984a2bb86..4ffc39acd2c 100644 >--- a/Koha/Devel/CI/IncrementalRuns.pm >+++ b/Koha/Devel/CI/IncrementalRuns.pm >@@ -83,21 +83,23 @@ sub new { > context => $args->{context}, > }; > >- unless ( $self->{test_name} ) { >- my @caller_info = caller(); >- my $script_filename = $caller_info[1]; >- $self->{test_name} = basename($script_filename); >- $self->{test_name} =~ s|/|_|g; >- $self->{test_name} =~ s|\..*$||g; >- } >- >- if ( $self->{git_repo_dir} && $self->{repo_url} ) { >- unless ( -d $self->{git_repo_dir} ) { >- qx{git clone $self->{repo_url} $self->{git_repo_dir}}; >+ if ( $self->{incremental_run} ) { >+ unless ( $self->{test_name} ) { >+ my @caller_info = caller(); >+ my $script_filename = $caller_info[1]; >+ $self->{test_name} = basename($script_filename); >+ $self->{test_name} =~ s|/|_|g; >+ $self->{test_name} =~ s|\..*$||g; > } >- qx{git -C $self->{git_repo_dir} fetch origin}; > >- make_path("$self->{git_repo_dir}/$self->{test_name}"); >+ if ( $self->{git_repo_dir} && $self->{repo_url} ) { >+ unless ( -d $self->{git_repo_dir} ) { >+ qx{git clone $self->{repo_url} $self->{git_repo_dir}}; >+ } >+ qx{git -C $self->{git_repo_dir} fetch origin}; >+ >+ make_path("$self->{git_repo_dir}/$self->{test_name}"); >+ } > } > > bless $self, $class; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39877
:
182308
|
182309
|
182310
|
182311
|
182347
|
182348
|
182349
|
182350
|
182355
|
182356
|
182357
|
182358
|
183795
|
183796
|
183797
|
183798
|
184462
|
184463
|
184464
|
184465
|
184466
|
184779
|
184780
|
184781
|
184782
|
184783
|
184785
|
184875
|
184876
|
184877
|
184878
|
184879
|
184880
|
186320
|
186321
|
186322
|
186323
|
186324
|
186325
|
186327
|
186328
|
186329
|
186330
|
186331
|
186332
|
186362
|
186363
|
186364
|
186365
|
186366
|
186367
| 186368 |
186370
|
186622