-
Notifications
You must be signed in to change notification settings - Fork 4
/
sync.sh
executable file
·162 lines (143 loc) · 4.28 KB
/
sync.sh
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/bin/bash
set -eu
BINDIR=$(dirname $0)
source ${BINDIR}/lib.sh
echo "Starting $(date +%F-%H%M%S)"
function finished {
set +x
echo
echo "Finished $(date +%F-%H%M%S)"
}
trap finished EXIT
function header {
local msg="$1"
echo
echo "$msg" | sed 's/./=/g'
echo $msg
echo "$msg" | sed 's/./=/g'
echo
}
# header "Removing old logs"
# find $LOGDIR -ctime 7 -print -exec rm '{}' \;
github_to_jira=$BINDIR/github-to-jira
bugzilla_to_jira=$BINDIR/bugzilla-to-jira
find_closed=$BINDIR/find-closed
SETTINGS_FILE=${SETTINGS_FILE:-/etc/jira-sync/settings.sh}
source ${SETTINGS_FILE}
if [ -z "$jira_url" ]; then
echo "NO JIRA URL SET"
exit 1
fi
header "Importing all items from openshift forks of metal3 repos for the hardware team"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy HW Mgmt' \
\
-github-org openshift \
ironic \
ironic-hardware-inventory-recorder-image \
ironic-image \
ironic-inspector \
ironic-inspector-image \
ironic-ipa-downloader \
ironic-lib \
ironic-prometheus-exporter \
ironic-rhcos-downloader \
ironic-static-ip-manager \
metal3-smart-exporter
header "Importing all items from openshift forks of metal3 repos for installer team"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy Install' \
\
-github-org openshift \
baremetal-operator \
cluster-api-provider-baremetal
header "Importing openshift items tagged platform/baremetal"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy Install' \
\
-github-org openshift \
-github-label 'platform/baremetal'
header "Importing metal3-io items for the hardware team"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy HW Mgmt' \
\
-github-org metal3-io \
ironic \
ironic-hardware-inventory-recorder-image \
ironic-image \
ironic-inspector-image \
ironic-ipa-downloader \
ironic-prometheus-exporter \
metal3-smart-exporter
header "Importing metal3-io items"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy Install' \
\
-github-org metal3-io \
-github-ignore metal3-io.github.io,cluster-api-provider-metal3,hardware-classification-controller,metal3-helm-chart
header "Importing openshift-metal3 items for the UX team"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy UI & Validations' \
\
-github-org openshift-metal3 \
facet
header "Importing openshift-metal3 items"
$github_to_jira \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY \
-jira-component 'KNI Deploy Install' \
\
-github-org openshift-metal3
# header "Importing bugzilla 'KNI Deploy Install' items"
# $bugzilla_to_jira \
# -jira-user "$jira_user" \
# -jira-password "$jira_password" \
# -jira-url "$jira_url" \
# -bugzilla-token "$bugzilla_token" \
# -bugzilla-url "$bugzilla_url" \
# -jira-project KNIDEPLOY \
# -jira-component 'KNI Deploy Install' \
# \
# -bugzilla-product 'Kubernetes-native Infrastructure' \
# -bugzilla-component 'Deployment'
header "Reporting on items closed upstream but not in jira"
$find_closed \
-jira-user "$jira_user" \
-jira-password "$jira_password" \
-jira-url "$jira_url" \
-bugzilla-url "$bugzilla_url" \
-github-token "$github_token" \
-jira-project KNIDEPLOY