-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdummy_mon
executable file
·60 lines (49 loc) · 1.75 KB
/
dummy_mon
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# SPDX-Identifier: gpl-2.0-or-later
# Copyright (C) 2021, Red Hat, Inc.
#
# Used to do a dummy check
#
# Licensed under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. You may obtain a copy of the
# license at
#
# https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
[ -f "${HOME}/.pwmon-rc" ] && source "${HOME}/.pwmon-rc"
[ -f "${HOME}/.cimon-rc" ] && source "${HOME}/.cimon-rc"
source $(dirname $0)/series_db_lib.sh
if [ "$1" != "" ]; then
pw_instance="$1"
shift
fi
if [ "$1" != "" ]; then
dummy_token="$1"
shift
fi
if [ "$1" != "" ]; then
pw_project="$1"
shift
fi
date=$(date)
echo "Starting dummy for [$pw_project @ $pw_instance] at $date" > dummy.log
for branch in $(series_get_active_branches "$pw_instance"); do
series_id=$(echo $branch | cut -d\| -f1)
project=$(echo $branch | cut -d\| -f2)
series_url=$(echo $branch | cut -d\| -f3)
travis_repo=$(echo $branch | cut -d\| -f4)
branchname=$(echo $branch | cut -d\| -f5)
if [ "X$pw_project" != "X" -a "X$pw_project" != "X$project" ]; then
continue
fi
echo "Caught [$series_id]|[$series_url]" >> dummy.log
if [ "X$dummy_token" = "Xemit" ]; then
echo "pw|${pw_instance}|build|${series_id}|sha|AAAAAAAAAAAA|passed|http://foo.com/${project}/${series_id}|.... subject ....|dummy%Frepo"
fi
done