cicd: Prefer 'fast' work items

Process the other ones later.  And pull latest 'wlan-ap'
dir if it exists, so we can get up-to-date git log.
This commit is contained in:
Ben Greear
2020-05-18 12:42:21 -07:00
parent 64825570e9
commit f8722b9396

View File

@@ -75,6 +75,24 @@ my $cmd = "curl $cuser $url";
print ("Calling command: $cmd\n");
my $listing = do_system($cmd);
my @lines = split(/\n/, $listing);
# First, if any have 'fast' in them, they get precedence.
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
my $fast = 0;
if ($ln =~ /href=\"(CICD_TEST-.*-fast)\">(.*)<\/a>\s+(.*)\s+\S+\s+\S+/) {
$fast = 1;
}
elsif ($ln =~ /href=\"(CICD_TEST-.*-fast)\">(.*)<\/a>/) {
$fast = 1;
}
if ($fast) {
@lines[0] = $ln;
last;
}
}
for ($i = 0; $i<@lines; $i++) {
my $ln = $lines[$i];
chomp($ln);
@@ -150,6 +168,11 @@ for ($i = 0; $i<@lines; $i++) {
exit(1);
}
# Refresh wlan-ap repo if it exists.
if ( -d "../../../wlan-ap") {
do_system("cd ../../../wlan-ap && git pull && cd -");
}
my $cmd = "curl --location -o $jfile -u $jfrog_user:$jfrog_passwd $jurl/$jfile";
do_system($cmd);