]> git.proxmox.com Git - ceph.git/blob - ceph/qa/machine_types/schedule_subset.sh
update sources to v12.2.0
[ceph.git] / ceph / qa / machine_types / schedule_subset.sh
1 #!/bin/bash
2
3 #command line => CEPH_BRANCH=<branch>; MACHINE_NAME=<machine_type>; SUITE_NAME=<suite>; ../schedule_subset.sh <day_of_week> $CEPH_BRANCH $MACHINE_NAME $SUITE_NAME $CEPH_QA_EMAIL
4
5 # $1 - part (day of week)
6 # $2 - branch name
7 # $3 - machine name
8 # $4 - suite name
9 # $5 - email address
10 # $6 - filter out (this arg is to be at the end of the command line for now)
11
12 ## example #1
13 ## (date +%U) week number
14 ## % 2 - mod 2 (e.g. 0,1,0,1 ...)
15 ## * 7 - multiplied by 7 (e.g. 0,7,0,7...)
16 ## $1 day of the week (0-6)
17 ## /14 for 2 weeks
18
19 ## example #2
20 ## (date +%U) week number
21 ## % 4 - mod 4 (e.g. 0,1,2,3,0,1,2,3 ...)
22 ## * 7 - multiplied by 7 (e.g. 0,7,14,21,0,7,14,21...)
23 ## $1 day of the week (0-6)
24 ## /28 for 4 weeks
25
26 echo "Scheduling " $2 " branch"
27 if [ $2 = "master" ] ; then
28 # run master branch with --newest option looking for good sha1 7 builds back with /999 jobs
29 teuthology-suite -v -c $2 -m $3 -k distro -s $4 --subset $(echo "(($(date +%U) % 4) * 7) + $1" | bc)/999 --newest 7 -e $5 $6
30 elif [ $2 = "hammer" ] ; then
31 # run hammer branch with less jobs
32 teuthology-suite -v -c $2 -m $3 -k distro -s $4 --subset $(echo "(($(date +%U) % 4) * 7) + $1" | bc)/56 -e $5 $6
33 elif [ $2 = "jewel" ] ; then
34 # run jewel branch with /40 jobs
35 teuthology-suite -v -c $2 -m $3 -k distro -s $4 --subset $(echo "(($(date +%U) % 4) * 7) + $1" | bc)/40 -e $5 $6
36 elif [ $2 = "kraken" ] ; then
37 # run kraken branch with /999 jobs
38 teuthology-suite -v -c $2 -m $3 -k distro -s $4 --subset $(echo "(($(date +%U) % 4) * 7) + $1" | bc)/999 -e $5 $6
39 elif [ $2 = "luminous" ] ; then
40 # run luminous branch with /999 jobs
41 teuthology-suite -v -c $2 -m $3 -k distro -s $4 --subset $(echo "(($(date +%U) % 4) * 7) + $1" | bc)/999 -e $5 $6
42 else
43 # run NON master branches without --newest
44 teuthology-suite -v -c $2 -m $3 -k distro -s $4 --subset $(echo "(($(date +%U) % 4) * 7) + $1" | bc)/28 -e $5 $6
45 fi