Bugzilla – Attachment 186370 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: Use KOHA_IMAGE to separate OSes
Bug-39877-Use-KOHAIMAGE-to-separate-OSes.patch (text/plain), 3.30 KB, created by
Jonathan Druart
on 2025-09-11 09:41:48 UTC
(
hide
)
Description:
Bug 39877: Use KOHA_IMAGE to separate OSes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-09-11 09:41:48 UTC
Size:
3.30 KB
patch
obsolete
>From f8f7564cadda6c3576456e403eb0670e9cb30f2a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 11 Sep 2025 11:41:29 +0200 >Subject: [PATCH] Bug 39877: Use KOHA_IMAGE to separate OSes > >--- > Koha/Devel/CI/IncrementalRuns.pm | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > >diff --git a/Koha/Devel/CI/IncrementalRuns.pm b/Koha/Devel/CI/IncrementalRuns.pm >index 4ffc39acd2c..c2c114cb090 100644 >--- a/Koha/Devel/CI/IncrementalRuns.pm >+++ b/Koha/Devel/CI/IncrementalRuns.pm >@@ -84,6 +84,9 @@ sub new { > }; > > if ( $self->{incremental_run} ) { >+ >+ die "Cannot use increment runs if `KOHA_IMAGE` environment variable is not set" unless $ENV{KOHA_IMAGE}; >+ > unless ( $self->{test_name} ) { > my @caller_info = caller(); > my $script_filename = $caller_info[1]; >@@ -92,13 +95,15 @@ sub new { > $self->{test_name} =~ s|\..*$||g; > } > >+ $self->{test_dir} = $args->{git_repo_dir} . '/' . $ENV{KOHA_IMAGE} . '/' . $args->{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}"); >+ make_path("$self->{git_repo_dir}/$self->{test_dir}"); > } > } > >@@ -122,7 +127,7 @@ sub get_files_to_test { > my $no_history; > if ( $self->{incremental_run} ) { > my @koha_commit_history = qx{git log --pretty=format:"%h"}; >- my @tested_commit_history = qx{ls $self->{git_repo_dir}/$self->{test_name}}; >+ my @tested_commit_history = qx{ls $self->{git_repo_dir}/$self->{test_die}}; > chomp for @koha_commit_history, @tested_commit_history; > if (@tested_commit_history) { > my $last_build_commit = firstval { >@@ -131,7 +136,7 @@ sub get_files_to_test { > } > @koha_commit_history; > if ($last_build_commit) { >- @files = @{ from_json( read_file("$self->{git_repo_dir}/$self->{test_name}/$last_build_commit") ) }; >+ @files = @{ from_json( read_file("$self->{git_repo_dir}/$self->{test_dir}/$last_build_commit") ) }; > push @files, $dev_files->ls_files( $filetype, "$last_build_commit HEAD" ); > } else { > >@@ -164,7 +169,7 @@ sub report_results { > my $commit_id = qx{git rev-parse --short HEAD}; > chomp $commit_id; > >- my $failure_file = "$self->{git_repo_dir}/$self->{test_name}/$commit_id"; >+ my $failure_file = "$self->{git_repo_dir}/$self->{test_dir}/$commit_id"; > my $failures = [ > sort map { > my ( $file, $exit_code ) = ( $_, $results->{$_} ); >@@ -175,7 +180,7 @@ sub report_results { > write_file( $failure_file, to_json($failures) ); > > qx{git -C $self->{git_repo_dir} add $failure_file}; >- qx{git -C $self->{git_repo_dir} commit -m "$commit_id - $self->{test_name}"}; >+ qx{git -C $self->{git_repo_dir} commit -m "$commit_id - $self->{test_dir}"}; > ( my $push_domain = $self->{repo_url} ) =~ s{^https://}{}; > my $push_url = "https://gitlab-ci-token:$self->{token}\@$push_domain"; > qx{git -C $self->{git_repo_dir} push $push_url main}; >-- >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