diff options
author | Tony Sarajärvi <tony.sarajarvi@theqtcompany.com> | 2015-10-13 09:14:18 +0300 |
---|---|---|
committer | Matti Paaso <matti.paaso@theqtcompany.com> | 2015-10-13 06:43:10 +0000 |
commit | f44dccbc223adda12647db16d8db3c9a2245ecf3 (patch) | |
tree | 9046b87a7776ee20dd617429228078e958ec644e /scripts/jenkins | |
parent | dca1914237fd5d1fb6398d4de5e85591db94917c (diff) |
Enable using suffixes on node labels
Change-Id: Ie369aa7fa52c0ae41f41a10d59763e48050222ac
Reviewed-by: Johanna Äijälä <johanna.aijala@digia.com>
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
Diffstat (limited to 'scripts/jenkins')
-rwxr-xr-x | scripts/jenkins/qt-jenkins-deploy.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/jenkins/qt-jenkins-deploy.pl b/scripts/jenkins/qt-jenkins-deploy.pl index 8cdb41ee..4dadb95f 100755 --- a/scripts/jenkins/qt-jenkins-deploy.pl +++ b/scripts/jenkins/qt-jenkins-deploy.pl @@ -719,10 +719,24 @@ sub desired_job_xml squish_test_suites => \@squish_test_suites, auth_token => eval { $self->cfg( "job.$name", 'auth_token' ) } || q{}, job_description => eval { $self->cfg( "job.$name", 'job_description' ) } || q{}, + suffix_labels => eval { $self->cfg( "job.$name", 'suffix_labels' ) } || q{0}, }, \$data ) || die "job $name: while parsing template: ".$tt->error(); + my $suffix_labels = eval { $self->cfg( "job.$name", 'suffix_labels' ) } || q{0}; + if ($suffix_labels) { + # Add the configurations to the combination filter and after that replace all + # instances of the configuration with the suffix of $ini_branch + my $ini_branch = eval { $self->cfg( "job.$name", 'template_ini_prefix' ) } // $branch; + foreach my $cfg (@configurations) { + $data =~ s/<\/combinationFilter>/(cfg == \"$cfg-$ini_branch\") || <\/combinationFilter>/; + $data =~ s/\<string\>\Q$cfg\E\<\/string\>/<string>$cfg-$ini_branch<\/string>/g; + } + # Remove the excess " || " from the end of the combinationFilter string + $data =~ s/ \|\| <\/combinationFilter/<\/combinationFilter/; + } + chomp $data; return $data; } |