Compare commits
572 Commits
release-te
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d9a254b63 | ||
|
|
ff5533b647 | ||
|
|
b3845187f6 | ||
|
|
019c818a19 | ||
|
|
1137d826ae | ||
|
|
b529388871 | ||
|
|
aef17893d9 | ||
|
|
4f598b0017 | ||
|
|
b71ec627d7 | ||
|
|
af56f8ccad | ||
|
|
0b451ed62f | ||
|
|
11395279af | ||
|
|
a07cfe51aa | ||
|
|
ad397f6fe7 | ||
|
|
85fdec2e5a | ||
|
|
f1b75a7ff0 | ||
|
|
6690302ac3 | ||
|
|
1320222d79 | ||
|
|
baea8ce5e5 | ||
|
|
d69126a980 | ||
|
|
79a2b9f0a3 | ||
|
|
2a755f2bd3 | ||
|
|
edb8a79f94 | ||
|
|
4a5136deee | ||
|
|
f2eaba7e5f | ||
|
|
3b576c6a47 | ||
|
|
557fc48d05 | ||
|
|
353d5ad462 | ||
|
|
df55be5e19 | ||
|
|
35425c576a | ||
|
|
d4abc0fcfb | ||
|
|
11c0937214 | ||
|
|
12fe7ac9bb | ||
|
|
b997b928b8 | ||
|
|
10f57c6aeb | ||
|
|
254cbdf0d6 | ||
|
|
6b1286ba13 | ||
|
|
aea66f4616 | ||
|
|
c73340ec51 | ||
|
|
07904c35e6 | ||
|
|
474cdd56c6 | ||
|
|
83732fa1b5 | ||
|
|
6b1650a634 | ||
|
|
4f7d65f0e8 | ||
|
|
1f10a3f096 | ||
|
|
909c2a6d55 | ||
|
|
37666a00c7 | ||
|
|
b7925f311b | ||
|
|
97620881d3 | ||
|
|
0e68f26c57 | ||
|
|
9736d23653 | ||
|
|
261a5afbdd | ||
|
|
3a7c1765ee | ||
|
|
c16a8b023c | ||
|
|
4b16e6a004 | ||
|
|
bd8f035c46 | ||
|
|
bdcce37b5a | ||
|
|
7af5c50a27 | ||
|
|
5860da285e | ||
|
|
3ece576476 | ||
|
|
4dac420bed | ||
|
|
ddf338bc72 | ||
|
|
0cca61517c | ||
|
|
fe5e8b8e1c | ||
|
|
dfdc6a33ad | ||
|
|
35e2d626a0 | ||
|
|
228e21ba78 | ||
|
|
68df7cd728 | ||
|
|
ffd6eb4e68 | ||
|
|
e205209b12 | ||
|
|
3ea84a3597 | ||
|
|
b71c4398d2 | ||
|
|
c26ad130ed | ||
|
|
279a9ab037 | ||
|
|
4e00c03ef2 | ||
|
|
c813ddc0ac | ||
|
|
23f8b54011 | ||
|
|
8122f6f4e1 | ||
|
|
e76242bddd | ||
|
|
af0ba78ae9 | ||
|
|
1904b95adf | ||
|
|
d43cece48a | ||
|
|
ba7196cac1 | ||
|
|
7eecb001c6 | ||
|
|
0b01da936d | ||
|
|
b88c0d9b96 | ||
|
|
b7554e30ff | ||
|
|
b03cda3ccc | ||
|
|
7bfd424a64 | ||
|
|
9ee29e91ba | ||
|
|
b24059b538 | ||
|
|
a7b18d8151 | ||
|
|
23862ad3ac | ||
|
|
566da623bf | ||
|
|
69241ed36c | ||
|
|
c469f943f1 | ||
|
|
0a714f8484 | ||
|
|
1d2089b0c4 | ||
|
|
f975ecf551 | ||
|
|
e6d27d7810 | ||
|
|
f209c7359e | ||
|
|
33d4ab3d2f | ||
|
|
07bca1d638 | ||
|
|
09c21eafa7 | ||
|
|
e6d6e477d9 | ||
|
|
915483c109 | ||
|
|
c600d9f818 | ||
|
|
5147f853ae | ||
|
|
0288292058 | ||
|
|
8752448eed | ||
|
|
1d71bef7aa | ||
|
|
114ded790e | ||
|
|
ae638b16be | ||
|
|
133db833ee | ||
|
|
1f0cf50166 | ||
|
|
eb6b413adb | ||
|
|
6e93a5be79 | ||
|
|
ac3d523c0e | ||
|
|
75f0a49fc1 | ||
|
|
cab7a75ec1 | ||
|
|
b8af6fb6b2 | ||
|
|
13e0793219 | ||
|
|
f80912c617 | ||
|
|
66c643677d | ||
|
|
1451d6f584 | ||
|
|
5f4a05044b | ||
|
|
02a4784e58 | ||
|
|
9256566f89 | ||
|
|
9b61443b2f | ||
|
|
5169092892 | ||
|
|
017276c94a | ||
|
|
e96e8ea54a | ||
|
|
2b68a9f054 | ||
|
|
83e297cc9b | ||
|
|
9f5ccabb0c | ||
|
|
415fd2eb58 | ||
|
|
340aa73bde | ||
|
|
43561f237e | ||
|
|
311eb98236 | ||
|
|
8b2613b9f6 | ||
|
|
071bd2b85e | ||
|
|
1ef696efe8 | ||
|
|
c059a2eabd | ||
|
|
84fc89071a | ||
|
|
ccc03da62d | ||
|
|
ff4cd35ed3 | ||
|
|
f386a8f7e0 | ||
|
|
2e6b7c8ab5 | ||
|
|
85edd2296e | ||
|
|
869cbd43e0 | ||
|
|
aca9bcf496 | ||
|
|
146b8a6e40 | ||
|
|
9dc80b4965 | ||
|
|
04c726e964 | ||
|
|
f265d0ff45 | ||
|
|
e448e8d249 | ||
|
|
eda88aa048 | ||
|
|
da40e8f09c | ||
|
|
d6a47932e7 | ||
|
|
7160e0ee2e | ||
|
|
2220e2560f | ||
|
|
31de71f743 | ||
|
|
7ff563f644 | ||
|
|
a47ebaa9df | ||
|
|
88ce6a2c9e | ||
|
|
cad3a99f70 | ||
|
|
0ebd2ab17e | ||
|
|
9ca9b7a144 | ||
|
|
fd3e584fac | ||
|
|
ce6e09a7d0 | ||
|
|
6d56255a5a | ||
|
|
363f12f86f | ||
|
|
0be9c26f09 | ||
|
|
71127a6db9 | ||
|
|
f6d39a4c26 | ||
|
|
34d1dd5629 | ||
|
|
f0d71937e3 | ||
|
|
dd8bddc971 | ||
|
|
ddd4d31f25 | ||
|
|
5305984b1a | ||
|
|
0ab6488f58 | ||
|
|
5a78a6668f | ||
|
|
d0628caa05 | ||
|
|
68d1a1796b | ||
|
|
c95fb1e1f6 | ||
|
|
c1f370faaf | ||
|
|
13d421c2bc | ||
|
|
b524fd5995 | ||
|
|
a1b59de44d | ||
|
|
fbdfeee73c | ||
|
|
f03342bc55 | ||
|
|
a65d6a2774 | ||
|
|
cb68c16eb8 | ||
|
|
c31bb47bb8 | ||
|
|
dc52ec2022 | ||
|
|
bc87bcd5cf | ||
|
|
e3ee9412c9 | ||
|
|
8110b9cccc | ||
|
|
ebbf957419 | ||
|
|
12d168d14c | ||
|
|
439ce7de63 | ||
|
|
5adf7ed12e | ||
|
|
f8183399e2 | ||
|
|
e44cb3b955 | ||
|
|
a9aca6e4ff | ||
|
|
562db3def9 | ||
|
|
701ee2e6c8 | ||
|
|
f8ff19a3fa | ||
|
|
ecb28b9328 | ||
|
|
cdef84e269 | ||
|
|
4caa23ba3c | ||
|
|
b7db9c5fad | ||
|
|
b4df229de4 | ||
|
|
fc7d271a29 | ||
|
|
aef30c8cbe | ||
|
|
c0b99203da | ||
|
|
cd58916e05 | ||
|
|
29d875765e | ||
|
|
63191a3b61 | ||
|
|
3877a4670d | ||
|
|
25b7936bf4 | ||
|
|
73ef74770e | ||
|
|
bbbd3e757b | ||
|
|
9cc9a3bd94 | ||
|
|
83efd97bdf | ||
|
|
447b0e280c | ||
|
|
a9d326c234 | ||
|
|
cd277f3f9a | ||
|
|
7ca4249f04 | ||
|
|
270122b135 | ||
|
|
0d0f624a3f | ||
|
|
32d8c6b896 | ||
|
|
91c27b7684 | ||
|
|
548c7a05e9 | ||
|
|
eaf1b3c8b8 | ||
|
|
19b544540e | ||
|
|
f978d837e7 | ||
|
|
feeec9d1f5 | ||
|
|
4442c7cbbe | ||
|
|
a1b7505035 | ||
|
|
1e8bc39c7f | ||
|
|
84b0da1f95 | ||
|
|
ce3deecd1b | ||
|
|
8e159a1c2a | ||
|
|
48d2e625db | ||
|
|
878657ad4a | ||
|
|
1daeedbfdb | ||
|
|
df74dc358c | ||
|
|
186896da15 | ||
|
|
4be13e002d | ||
|
|
cf30b97a16 | ||
|
|
44759b1aac | ||
|
|
5ab2f02c56 | ||
|
|
d5178e7435 | ||
|
|
f595cae1b8 | ||
|
|
48a2bddfd9 | ||
|
|
fbcafd2014 | ||
|
|
4548b5e510 | ||
|
|
06b5249e5a | ||
|
|
9f7c8c99c0 | ||
|
|
e877942175 | ||
|
|
92193d499a | ||
|
|
6d6eee91e0 | ||
|
|
c32b38b783 | ||
|
|
08a37ff264 | ||
|
|
f9d5082f39 | ||
|
|
f00861702a | ||
|
|
dbff86915e | ||
|
|
4d462a883a | ||
|
|
986b710aaa | ||
|
|
794dae0c15 | ||
|
|
271d85482d | ||
|
|
7c83a9ccae | ||
|
|
8dfbcea0da | ||
|
|
52b71a267b | ||
|
|
f142d615fa | ||
|
|
8aa45baee8 | ||
|
|
f2f8728319 | ||
|
|
ded446de93 | ||
|
|
1524ec2473 | ||
|
|
a59cb0fffb | ||
|
|
a7bb32ec4a | ||
|
|
cf56239da2 | ||
|
|
6e931c5afb | ||
|
|
d23336a065 | ||
|
|
3ac1218a6b | ||
|
|
e732db08d8 | ||
|
|
1ad3cb70c6 | ||
|
|
46fdef854e | ||
|
|
7075c2a9eb | ||
|
|
4c427d2632 | ||
|
|
658de1c1ae | ||
|
|
6b1020be8f | ||
|
|
d08c6c99af | ||
|
|
4c527b1959 | ||
|
|
8793606070 | ||
|
|
d627bb8a09 | ||
|
|
0edad18545 | ||
|
|
81c299dd99 | ||
|
|
6111583678 | ||
|
|
196a8018e5 | ||
|
|
c4efaf1a1a | ||
|
|
cbf7622909 | ||
|
|
87ede1ad3b | ||
|
|
0213d193e8 | ||
|
|
0a9f125d76 | ||
|
|
7f8e2d5411 | ||
|
|
4a73d5f8c4 | ||
|
|
7652e5ef08 | ||
|
|
9852004a36 | ||
|
|
6f62a016d4 | ||
|
|
f2ef2228c3 | ||
|
|
f6c3f69801 | ||
|
|
9f8ccc436f | ||
|
|
95c058265e | ||
|
|
6deaa37df7 | ||
|
|
fce3214650 | ||
|
|
9d8c736d92 | ||
|
|
1c18bf03b6 | ||
|
|
f455cd6262 | ||
|
|
2f2e401ae5 | ||
|
|
f4da949bfd | ||
|
|
01dda79d72 | ||
|
|
3fc184b4af | ||
|
|
16f743c4c4 | ||
|
|
9baae2d2dc | ||
|
|
a6f56d71ee | ||
|
|
1bc6618a6d | ||
|
|
60bb8f9e20 | ||
|
|
57fc7a17b5 | ||
|
|
32a452bdb2 | ||
|
|
9e1bc8944f | ||
|
|
48ff009d39 | ||
|
|
b2fef69ea9 | ||
|
|
11aa73f190 | ||
|
|
4d325d1751 | ||
|
|
a676d65f0a | ||
|
|
afa05f381c | ||
|
|
9380d9bfc6 | ||
|
|
1c39555bfc | ||
|
|
ad715285c6 | ||
|
|
63892bad83 | ||
|
|
0f35789b91 | ||
|
|
5b97b61966 | ||
|
|
45b2cad30c | ||
|
|
b8b3416795 | ||
|
|
934ee7f44d | ||
|
|
6c6970c70a | ||
|
|
5ef222134e | ||
|
|
bce9866ba3 | ||
|
|
f1583cf783 | ||
|
|
8fe649cb7f | ||
|
|
375e8e87a8 | ||
|
|
f7ec740e7a | ||
|
|
b1f169def5 | ||
|
|
a0da277c05 | ||
|
|
b900d4d281 | ||
|
|
342baa9826 | ||
|
|
20157341f6 | ||
|
|
3ad0d87814 | ||
|
|
9f8e20230b | ||
|
|
2d0697f56b | ||
|
|
d92cb1d28b | ||
|
|
c246586498 | ||
|
|
4399a61f2b | ||
|
|
94f34a0fde | ||
|
|
62a5155ee1 | ||
|
|
302f302473 | ||
|
|
f82f202b63 | ||
|
|
ebfc05040b | ||
|
|
40da605780 | ||
|
|
cca9cf6e5e | ||
|
|
6db8b4cbd7 | ||
|
|
52e4722a3f | ||
|
|
3dd3aeb274 | ||
|
|
c4fecb9a0c | ||
|
|
fee99a0974 | ||
|
|
15fa10e265 | ||
|
|
ef376d3027 | ||
|
|
9cbb07efa3 | ||
|
|
837d6af4cd | ||
|
|
a0ab885526 | ||
|
|
cbb412218e | ||
|
|
cc36b806c5 | ||
|
|
c3750e3c1c | ||
|
|
8b04adf095 | ||
|
|
aab5bf2af6 | ||
|
|
1c2cdc0fb2 | ||
|
|
501fc5a15d | ||
|
|
f38733f9b2 | ||
|
|
68aaa0e548 | ||
|
|
99ac6be9fd | ||
|
|
87dd0f6d6b | ||
|
|
446b9365f2 | ||
|
|
912ea52351 | ||
|
|
d7bb56af54 | ||
|
|
50e3684423 | ||
|
|
da131e82e6 | ||
|
|
b3660fbb69 | ||
|
|
64fe6bcbe7 | ||
|
|
ad49a19f04 | ||
|
|
36401d0542 | ||
|
|
eb3c7e55bd | ||
|
|
40162ef3af | ||
|
|
aeb2eb392a | ||
|
|
effbfe9d46 | ||
|
|
5c0d5f6476 | ||
|
|
ee161a405f | ||
|
|
dd00b2fe9b | ||
|
|
35923f84e2 | ||
|
|
e228d06cc7 | ||
|
|
7c16e7c358 | ||
|
|
7421203bc4 | ||
|
|
4b0110856c | ||
|
|
4dd3e646f4 | ||
|
|
6d163a9067 | ||
|
|
b5449640be | ||
|
|
09ff4327ee | ||
|
|
f79d8d395d | ||
|
|
0cdb0f4267 | ||
|
|
86d17d6729 | ||
|
|
1e4a545bf8 | ||
|
|
c9124f8661 | ||
|
|
36716dc408 | ||
|
|
8a2ca2b786 | ||
|
|
0212c61bbc | ||
|
|
ef4f22029b | ||
|
|
bc110712b0 | ||
|
|
e38112924d | ||
|
|
bea541ed24 | ||
|
|
0da1aeab81 | ||
|
|
f4e2d47bdd | ||
|
|
deb3431d74 | ||
|
|
42dab2a45d | ||
|
|
d0f4971dc9 | ||
|
|
0326a1cf79 | ||
|
|
18757e3243 | ||
|
|
da31ae441f | ||
|
|
2d01f3025c | ||
|
|
5076e5143c | ||
|
|
c089060162 | ||
|
|
93e86e952b | ||
|
|
e9541e22a2 | ||
|
|
b00cffae4c | ||
|
|
976271ab92 | ||
|
|
83add51148 | ||
|
|
01d92b2408 | ||
|
|
f33af7a9cd | ||
|
|
e6da791406 | ||
|
|
b314fe4b46 | ||
|
|
f3dde1874d | ||
|
|
b8c4fe009a | ||
|
|
f4347ff5c0 | ||
|
|
9c9404367b | ||
|
|
2a867f2a71 | ||
|
|
a354009346 | ||
|
|
375e3a5a3b | ||
|
|
8474c6a4f5 | ||
|
|
8ace80de74 | ||
|
|
08e5a9cd4a | ||
|
|
c283df9b0a | ||
|
|
911d028073 | ||
|
|
8bee0c2a73 | ||
|
|
855cfbf347 | ||
|
|
4bedc9ec95 | ||
|
|
4b812fc0b3 | ||
|
|
565db8c8b7 | ||
|
|
48b45d2773 | ||
|
|
a4dd5addde | ||
|
|
b2f21cf4f8 | ||
|
|
81d966ad1f | ||
|
|
c844837aec | ||
|
|
463b372c9b | ||
|
|
7ea9f5b811 | ||
|
|
815082d584 | ||
|
|
ac56629332 | ||
|
|
83e923d15e | ||
|
|
279fecec88 | ||
|
|
fe3910cbe1 | ||
|
|
215ccbee0c | ||
|
|
f553bfc95b | ||
|
|
9323cd02e4 | ||
|
|
96848f5e54 | ||
|
|
c46d2bad61 | ||
|
|
434e3d9c27 | ||
|
|
364bfb5135 | ||
|
|
2f5516ec81 | ||
|
|
a6206a624a | ||
|
|
7196491cf0 | ||
|
|
74bf434786 | ||
|
|
58674f7773 | ||
|
|
d2c2223acf | ||
|
|
c9bc6393c6 | ||
|
|
00f4966aa9 | ||
|
|
897bad289b | ||
|
|
45350d0ab8 | ||
|
|
cdb6931d57 | ||
|
|
d258d569f7 | ||
|
|
273ba588ce | ||
|
|
162470838d | ||
|
|
69ff6f3432 | ||
|
|
685a8f6c3e | ||
|
|
cafacb761d | ||
|
|
370d143c2c | ||
|
|
55b854af36 | ||
|
|
18adadce28 | ||
|
|
7793ecdb1e | ||
|
|
274292c389 | ||
|
|
ba802dec40 | ||
|
|
2d569aee6d | ||
|
|
49bd0e5ffe | ||
|
|
a5b07596c1 | ||
|
|
be475c29a6 | ||
|
|
d48afdbffd | ||
|
|
5b0058b707 | ||
|
|
f4293213be | ||
|
|
e733eb7668 | ||
|
|
3f018d1100 | ||
|
|
8e317f5aca | ||
|
|
3af64fbf8e | ||
|
|
0e57d0cb81 | ||
|
|
7682c41ba5 | ||
|
|
aef6a35a7d | ||
|
|
1eedc5c0be | ||
|
|
34cf80d636 | ||
|
|
f70e266e85 | ||
|
|
983726eaf3 | ||
|
|
a8bacefc5f | ||
|
|
964077a480 | ||
|
|
c4c2038e6e | ||
|
|
6baeb0b049 | ||
|
|
664e815ef9 | ||
|
|
d942dc73f1 | ||
|
|
088e6afc85 | ||
|
|
1cc7a0141d | ||
|
|
65f80b9a5b | ||
|
|
3e0c483b57 | ||
|
|
90a4d99cf5 | ||
|
|
5cfe069b58 | ||
|
|
0bcc518db1 | ||
|
|
98e207f19f | ||
|
|
3e90261ecc | ||
|
|
d016242bab | ||
|
|
879169c3c7 | ||
|
|
423e5ab1e3 | ||
|
|
ded673ec74 | ||
|
|
deb08d81d2 | ||
|
|
f289bb3d19 | ||
|
|
9a01eff837 | ||
|
|
ba7ef1b4c6 | ||
|
|
de13753ef6 | ||
|
|
8265ca38c8 | ||
|
|
bf4dc1d717 | ||
|
|
1a0edee5c9 | ||
|
|
9ca4ae61f8 | ||
|
|
ecc44e58e0 | ||
|
|
f994c23b51 | ||
|
|
3f4d4ec436 | ||
|
|
f120f4f7e5 | ||
|
|
409a021cdb | ||
|
|
19f1997bd6 | ||
|
|
3ba1350bbd | ||
|
|
3b02f709b2 | ||
|
|
6fd646f753 | ||
|
|
0e800c6aec | ||
|
|
2f5daa46f5 | ||
|
|
7430ab5715 | ||
|
|
fa1b3aa5a0 | ||
|
|
faac4bcdb8 | ||
|
|
d4a2922ae8 | ||
|
|
3dc0dd4fdb | ||
|
|
8a76b2adb5 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
environment_building_tools/logfile.log
|
||||
29
DockerfileFunctionDictation.dockerfile
Normal file
29
DockerfileFunctionDictation.dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
#ビルドイメージ
|
||||
FROM node:18.17.1-buster AS build-container
|
||||
WORKDIR /app
|
||||
RUN mkdir dictation_function
|
||||
COPY dictation_function/ dictation_function/
|
||||
RUN npm install --force -g n && n 18.17.1 \
|
||||
&& cd dictation_function \
|
||||
&& npm ci \
|
||||
&& npm run build \
|
||||
&& cd ..
|
||||
|
||||
# 成果物イメージ
|
||||
FROM mcr.microsoft.com/azure-functions/node:4-node18
|
||||
|
||||
WORKDIR /home/site/wwwroot
|
||||
RUN mkdir build \
|
||||
&& mkdir dist \
|
||||
&& mkdir node_modules
|
||||
|
||||
COPY --from=build-container app/dictation_function/dist/ dist/
|
||||
COPY --from=build-container app/dictation_function/node_modules/ node_modules/
|
||||
COPY --from=build-container app/dictation_function/.env ./
|
||||
COPY --from=build-container app/dictation_function/host.json ./
|
||||
COPY --from=build-container app/dictation_function/package.json ./
|
||||
|
||||
ARG BUILD_VERSION
|
||||
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
|
||||
AzureFunctionsJobHost__Logging__Console__IsEnabled=true \
|
||||
BUILD_VERSION=${BUILD_VERSION}
|
||||
@ -20,4 +20,6 @@ RUN mkdir build \
|
||||
COPY --from=build-container app/dictation_server/dist/ dist/
|
||||
COPY --from=build-container app/dictation_server/.env ./
|
||||
COPY --from=build-container app/dictation_server/node_modules/ node_modules/
|
||||
ARG BUILD_VERSION
|
||||
ENV BUILD_VERSION=${BUILD_VERSION}
|
||||
CMD ["node", "./dist/main.js" ]
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
# Pipeline側でKeyVaultやDocker、AppService等に対する操作権限を持ったServiceConenctionを作成し、
|
||||
# 環境変数 AZURE_SERVICE_CONNECTION の値としてServiceConenction名を設定しておくこと
|
||||
# Pipeline側でKeyVaultやDocker、AppService等に対する操作権限を持ったServiceConenctionを作成しておくこと
|
||||
# また、環境変数 STATIC_DICTATION_DEPLOYMENT_TOKEN の値として静的WebAppsのデプロイトークンを設定しておくこと
|
||||
trigger:
|
||||
tags:
|
||||
@ -26,50 +25,46 @@ jobs:
|
||||
fi
|
||||
displayName: 'タグが付けられたCommitがmainブランチに存在するか確認'
|
||||
- job: backend_deploy
|
||||
dependsOn: initialize
|
||||
condition: succeeded('initialize')
|
||||
displayName: Backend Deploy
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureRmWebAppDeployment@4
|
||||
- task: AzureWebAppContainer@1
|
||||
inputs:
|
||||
ConnectionType: 'AzureRM'
|
||||
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
||||
appType: 'webAppContainer'
|
||||
WebAppName: 'app-odms-dictation-prod'
|
||||
ResourceGroupName: 'prod-application-rg'
|
||||
DockerNamespace: 'crodmsregistrymaintenance.azurecr.io'
|
||||
DockerRepository: '$(Build.Repository.Name)/staging/dictation'
|
||||
DockerImageTag: '$(Build.SourceVersion)'
|
||||
azureSubscription: 'omds-service-connection-prod'
|
||||
appName: 'app-odms-dictation-prod'
|
||||
deployToSlotOrASE: true
|
||||
resourceGroupName: 'odms-prod-rg'
|
||||
slotName: 'staging'
|
||||
containers: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation:$(Build.SourceVersion)'
|
||||
- job: frontend_deploy
|
||||
dependsOn: backend_deploy
|
||||
condition: succeeded('backend_deploy')
|
||||
displayName: Deploy Frontend Files
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
containerName: staging
|
||||
environment: production
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-prod'
|
||||
inputs:
|
||||
ConnectedServiceName: $(AZURE_SERVICE_CONNECTION)
|
||||
KeyVaultName: kv-odms-secret-prod
|
||||
SecretsFilter: '*'
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
||||
azureSubscription: 'omds-service-connection-prod'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob download \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(containerName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--file $(Build.SourcesDirectory)/$(Build.SourceVersion).zip
|
||||
- task: Bash@3
|
||||
@ -88,15 +83,57 @@ jobs:
|
||||
is_static_export: false
|
||||
verbose: false
|
||||
azure_static_web_apps_api_token: $(STATIC_DICTATION_DEPLOYMENT_TOKEN)
|
||||
- job: migration
|
||||
condition: succeeded('initialize')
|
||||
displayName: DB migration
|
||||
dependsOn:
|
||||
- initialize
|
||||
- backend_deploy
|
||||
- frontend_deploy
|
||||
- job: function_deploy
|
||||
dependsOn: frontend_deploy
|
||||
condition: succeeded('frontend_deploy')
|
||||
displayName: function Deploy
|
||||
pool:
|
||||
name: db-migrate-pipelines
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureFunctionAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-prod'
|
||||
appName: 'func-odms-dictation-prod'
|
||||
imageName: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation_function:$(Build.SourceVersion)'
|
||||
- job: smoke_test
|
||||
dependsOn: function_deploy
|
||||
condition: succeeded('function_deploy')
|
||||
displayName: 'smoke test'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
# スモークテスト用にjobを確保
|
||||
- job: swap_slot
|
||||
dependsOn: smoke_test
|
||||
condition: succeeded('smoke_test')
|
||||
displayName: 'Swap Staging and Production'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureAppServiceManage@0
|
||||
displayName: 'Azure App Service Manage: app-odms-dictation-prod'
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-prod'
|
||||
action: 'Swap Slots'
|
||||
WebAppName: 'app-odms-dictation-prod'
|
||||
ResourceGroupName: 'odms-prod-rg'
|
||||
SourceSlot: 'staging'
|
||||
SwapWithProduction: true
|
||||
- job: migration
|
||||
dependsOn: swap_slot
|
||||
condition: succeeded('swap_slot')
|
||||
displayName: DB migration
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
@ -104,19 +141,19 @@ jobs:
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-prod'
|
||||
inputs:
|
||||
ConnectedServiceName: $(AZURE_SERVICE_CONNECTION)
|
||||
ConnectedServiceName: 'omds-service-connection-prod'
|
||||
KeyVaultName: kv-odms-secret-prod
|
||||
- task: CmdLine@2
|
||||
displayName: migration
|
||||
inputs:
|
||||
script: >2
|
||||
# DB接続情報書き換え
|
||||
sed -i -e "s/DB_NAME/$(db-name)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PASS/$(db-pass)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_USERNAME/$(db-user)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PORT/$(db-port)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_HOST/$(db-host)/g" ./dictation_server/db/dbconfig.yml
|
||||
sql-migrate --version
|
||||
cat ./dictation_server/db/dbconfig.yml
|
||||
# migration実行
|
||||
sql-migrate up -config=./dictation_server/db/dbconfig.yml -env=ci
|
||||
sed -i -e "s/DB_NAME/$(db-name)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PASS/$(admin-db-pass)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_USERNAME/$(admin-db-user)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PORT/$(db-port)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_HOST/$(db-host)/g" ./dictation_server/db/dbconfig.yml
|
||||
sql-migrate --version
|
||||
cat ./dictation_server/db/dbconfig.yml
|
||||
# migration実行
|
||||
sql-migrate up -config=./dictation_server/db/dbconfig.yml -env=ci
|
||||
312
azure-pipelines-staging-ccb.yml
Normal file
312
azure-pipelines-staging-ccb.yml
Normal file
@ -0,0 +1,312 @@
|
||||
# Pipeline側でKeyVaultやDocker、AppService等に対する操作権限を持ったServiceConenctionを作成しておくこと
|
||||
# また、環境変数 STATIC_DICTATION_DEPLOYMENT_TOKEN の値として静的WebAppsのデプロイトークンを設定しておくこと
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- release-ccb
|
||||
tags:
|
||||
include:
|
||||
- stage-*
|
||||
|
||||
jobs:
|
||||
- job: initialize
|
||||
displayName: Initialize
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
persistCredentials: true
|
||||
- script: |
|
||||
git fetch origin release-ccb:release-ccb
|
||||
if git merge-base --is-ancestor $(Build.SourceVersion) release-ccb; then
|
||||
echo "This commit is in the release-ccb branch."
|
||||
else
|
||||
echo "This commit is not in the release-ccb branch."
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'タグが付けられたCommitがrelease-ccbブランチに存在するか確認'
|
||||
- job: backend_test
|
||||
dependsOn: initialize
|
||||
condition: succeeded('initialize')
|
||||
displayName: UnitTest
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: dictation_server/.devcontainer
|
||||
script: |
|
||||
docker-compose -f pipeline-docker-compose.yml build
|
||||
docker-compose -f pipeline-docker-compose.yml up -d
|
||||
docker-compose exec -T dictation_server sudo npm ci
|
||||
docker-compose exec -T dictation_server sudo npm run migrate:up:test
|
||||
docker-compose exec -T dictation_server sudo npm run test
|
||||
- job: backend_build
|
||||
dependsOn: backend_test
|
||||
condition: succeeded('backend_test')
|
||||
displayName: Build And Push Backend Image
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_server
|
||||
verbose: false
|
||||
- task: Docker@0
|
||||
displayName: build
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
dockerFile: DockerfileServerDictation.dockerfile
|
||||
imageName: odmscloud/staging/dictation:$(Build.SourceVersion)
|
||||
buildArguments: |
|
||||
BUILD_VERSION=$(Build.SourceVersion)
|
||||
- task: Docker@0
|
||||
displayName: push
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
action: Push an image
|
||||
imageName: odmscloud/staging/dictation:$(Build.SourceVersion)
|
||||
- job: frontend_build_staging
|
||||
dependsOn: backend_build
|
||||
condition: succeeded('backend_build')
|
||||
displayName: Build Frontend Files(staging)
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
environment: staging
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_client
|
||||
verbose: false
|
||||
- task: Bash@3
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: cd dictation_client && npm run build:stg
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: dictation_client/build
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip'
|
||||
replaceExistingArchive: true
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob upload \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--type block \
|
||||
--overwrite \
|
||||
--file $(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip
|
||||
- job: function_test
|
||||
dependsOn: frontend_build_staging
|
||||
condition: succeeded('frontend_build_staging')
|
||||
displayName: UnitTest
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: dictation_function/.devcontainer
|
||||
script: |
|
||||
docker-compose -f pipeline-docker-compose.yml build
|
||||
docker-compose -f pipeline-docker-compose.yml up -d
|
||||
docker-compose exec -T dictation_function sudo npm ci
|
||||
docker-compose exec -T dictation_function sudo npm run test
|
||||
- job: function_build
|
||||
dependsOn: function_test
|
||||
condition: succeeded('function_test')
|
||||
displayName: Build And Push Function Image
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_function
|
||||
verbose: false
|
||||
- task: Docker@0
|
||||
displayName: build
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
dockerFile: DockerfileFunctionDictation.dockerfile
|
||||
imageName: odmscloud/staging/dictation_function:$(Build.SourceVersion)
|
||||
buildArguments: |
|
||||
BUILD_VERSION=$(Build.SourceVersion)
|
||||
- task: Docker@0
|
||||
displayName: push
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
action: Push an image
|
||||
imageName: odmscloud/staging/dictation_function:$(Build.SourceVersion)
|
||||
- job: backend_deploy
|
||||
dependsOn: function_build
|
||||
condition: succeeded('function_build')
|
||||
displayName: Backend Deploy
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureWebAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
appName: 'app-odms-dictation-stg'
|
||||
deployToSlotOrASE: true
|
||||
resourceGroupName: 'stg-application-rg'
|
||||
slotName: 'staging'
|
||||
containers: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation:$(Build.SourceVersion)'
|
||||
- job: frontend_deploy
|
||||
dependsOn: backend_deploy
|
||||
condition: succeeded('backend_deploy')
|
||||
displayName: Deploy Frontend Files
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
environment: staging
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob download \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--file $(Build.SourcesDirectory)/$(Build.SourceVersion).zip
|
||||
- task: Bash@3
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: unzip $(Build.SourcesDirectory)/$(Build.SourceVersion).zip -d $(Build.SourcesDirectory)/$(Build.SourceVersion)
|
||||
- task: AzureStaticWebApp@0
|
||||
displayName: 'Static Web App: '
|
||||
inputs:
|
||||
workingDirectory: '$(Build.SourcesDirectory)'
|
||||
app_location: '/$(Build.SourceVersion)'
|
||||
config_file_location: /dictation_client
|
||||
skip_app_build: true
|
||||
skip_api_build: true
|
||||
is_static_export: false
|
||||
verbose: false
|
||||
azure_static_web_apps_api_token: $(STATIC_DICTATION_DEPLOYMENT_TOKEN)
|
||||
- job: function_deploy
|
||||
dependsOn: frontend_deploy
|
||||
condition: succeeded('frontend_deploy')
|
||||
displayName: Function Deploy
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureFunctionAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
appName: 'func-odms-dictation-stg'
|
||||
imageName: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation_function:$(Build.SourceVersion)'
|
||||
- job: smoke_test
|
||||
dependsOn: function_deploy
|
||||
condition: succeeded('function_deploy')
|
||||
displayName: 'smoke test'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
# スモークテスト用にjobを確保
|
||||
- job: swap_slot
|
||||
dependsOn: smoke_test
|
||||
condition: succeeded('smoke_test')
|
||||
displayName: 'Swap Staging and Production'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureAppServiceManage@0
|
||||
displayName: 'Azure App Service Manage: app-odms-dictation-stg'
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
action: 'Swap Slots'
|
||||
WebAppName: 'app-odms-dictation-stg'
|
||||
ResourceGroupName: 'stg-application-rg'
|
||||
SourceSlot: 'staging'
|
||||
SwapWithProduction: true
|
||||
- job: migration
|
||||
dependsOn: swap_slot
|
||||
condition: succeeded('swap_slot')
|
||||
displayName: DB migration
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-stg'
|
||||
inputs:
|
||||
ConnectedServiceName: 'omds-service-connection-stg'
|
||||
KeyVaultName: kv-odms-secret-stg
|
||||
- task: CmdLine@2
|
||||
displayName: migration
|
||||
inputs:
|
||||
script: >2
|
||||
# DB接続情報書き換え
|
||||
sed -i -e "s/DB_NAME_CCB/$(db-name-ccb)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PASS/$(admin-db-pass)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_USERNAME/$(admin-db-user)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PORT/$(db-port)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_HOST/$(db-host)/g" ./dictation_server/db/dbconfig.yml
|
||||
sql-migrate --version
|
||||
cat ./dictation_server/db/dbconfig.yml
|
||||
# migration実行
|
||||
sql-migrate up -config=./dictation_server/db/dbconfig.yml -env=ci_ccb
|
||||
363
azure-pipelines-staging-ph1-enhance.yml
Normal file
363
azure-pipelines-staging-ph1-enhance.yml
Normal file
@ -0,0 +1,363 @@
|
||||
# Pipeline側でKeyVaultやDocker、AppService等に対する操作権限を持ったServiceConnectionを作成しておくこと
|
||||
# また、環境変数 STATIC_DICTATION_DEPLOYMENT_TOKEN の値として静的WebAppsのデプロイトークンを設定しておくこと
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- release-ph1-enhance
|
||||
tags:
|
||||
include:
|
||||
- stage-*
|
||||
|
||||
jobs:
|
||||
- job: initialize
|
||||
displayName: Initialize
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
persistCredentials: true
|
||||
- script: |
|
||||
git fetch origin release-ph1-enhance:release-ph1-enhance
|
||||
if git merge-base --is-ancestor $(Build.SourceVersion) release-ph1-enhance; then
|
||||
echo "This commit is in the release-ph1-enhance branch."
|
||||
else
|
||||
echo "This commit is not in the release-ph1-enhance branch."
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'タグが付けられたCommitがrelease-ph1-enhanceブランチに存在するか確認'
|
||||
- job: backend_test
|
||||
dependsOn: initialize
|
||||
condition: succeeded('initialize')
|
||||
displayName: UnitTest
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: dictation_server/.devcontainer
|
||||
script: |
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
docker-compose -f pipeline-docker-compose.yml build
|
||||
docker-compose -f pipeline-docker-compose.yml up -d
|
||||
docker-compose exec -T dictation_server sudo npm ci
|
||||
docker-compose exec -T dictation_server sudo npm run migrate:up:test
|
||||
docker-compose exec -T dictation_server sudo npm run test
|
||||
- job: backend_build
|
||||
dependsOn: backend_test
|
||||
condition: succeeded('backend_test')
|
||||
displayName: Build And Push Backend Image
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_server
|
||||
verbose: false
|
||||
- task: Docker@0
|
||||
displayName: build
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
dockerFile: DockerfileServerDictation.dockerfile
|
||||
imageName: odmscloud/staging/dictation:$(Build.SourceVersion)
|
||||
buildArguments: |
|
||||
BUILD_VERSION=$(Build.SourceVersion)
|
||||
- task: Docker@0
|
||||
displayName: push
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
action: Push an image
|
||||
imageName: odmscloud/staging/dictation:$(Build.SourceVersion)
|
||||
- job: frontend_build_staging
|
||||
dependsOn: backend_build
|
||||
condition: succeeded('backend_build')
|
||||
displayName: Build Frontend Files(staging)
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
environment: staging
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_client
|
||||
verbose: false
|
||||
- task: Bash@3
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: cd dictation_client && npm run build:stg
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: dictation_client/build
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip'
|
||||
replaceExistingArchive: true
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob upload \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--type block \
|
||||
--overwrite \
|
||||
--file $(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip
|
||||
- job: frontend_build_production
|
||||
dependsOn: frontend_build_staging
|
||||
condition: succeeded('frontend_build_staging')
|
||||
displayName: Build Frontend Files(production)
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
environment: production
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_client
|
||||
verbose: false
|
||||
- task: Bash@3
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: cd dictation_client && npm run build:prod
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: dictation_client/build
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip'
|
||||
replaceExistingArchive: true
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob upload \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--type block \
|
||||
--overwrite \
|
||||
--file $(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip
|
||||
- job: function_test
|
||||
dependsOn: frontend_build_production
|
||||
condition: succeeded('frontend_build_production')
|
||||
displayName: UnitTest
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: dictation_function/.devcontainer
|
||||
script: |
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
docker-compose -f pipeline-docker-compose.yml build
|
||||
docker-compose -f pipeline-docker-compose.yml up -d
|
||||
docker-compose exec -T dictation_function sudo npm ci
|
||||
docker-compose exec -T dictation_function sudo npm run test
|
||||
- job: function_build
|
||||
dependsOn: function_test
|
||||
condition: succeeded('function_test')
|
||||
displayName: Build And Push Function Image
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_function
|
||||
verbose: false
|
||||
- task: Docker@0
|
||||
displayName: build
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
dockerFile: DockerfileFunctionDictation.dockerfile
|
||||
imageName: odmscloud/staging/dictation_function:$(Build.SourceVersion)
|
||||
buildArguments: |
|
||||
BUILD_VERSION=$(Build.SourceVersion)
|
||||
- task: Docker@0
|
||||
displayName: push
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
action: Push an image
|
||||
imageName: odmscloud/staging/dictation_function:$(Build.SourceVersion)
|
||||
- job: backend_deploy
|
||||
dependsOn: function_build
|
||||
condition: succeeded('function_build')
|
||||
displayName: Backend Deploy
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureWebAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
appName: 'app-odms-dictation-stg'
|
||||
deployToSlotOrASE: true
|
||||
resourceGroupName: 'stg-application-rg'
|
||||
slotName: 'staging'
|
||||
containers: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation:$(Build.SourceVersion)'
|
||||
- job: frontend_deploy
|
||||
dependsOn: backend_deploy
|
||||
condition: succeeded('backend_deploy')
|
||||
displayName: Deploy Frontend Files
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
environment: staging
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob download \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--file $(Build.SourcesDirectory)/$(Build.SourceVersion).zip
|
||||
- task: Bash@3
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: unzip $(Build.SourcesDirectory)/$(Build.SourceVersion).zip -d $(Build.SourcesDirectory)/$(Build.SourceVersion)
|
||||
- task: AzureStaticWebApp@0
|
||||
displayName: 'Static Web App: '
|
||||
inputs:
|
||||
workingDirectory: '$(Build.SourcesDirectory)'
|
||||
app_location: '/$(Build.SourceVersion)'
|
||||
config_file_location: /dictation_client
|
||||
skip_app_build: true
|
||||
skip_api_build: true
|
||||
is_static_export: false
|
||||
verbose: false
|
||||
azure_static_web_apps_api_token: $(STATIC_DICTATION_DEPLOYMENT_TOKEN)
|
||||
- job: function_deploy
|
||||
dependsOn: frontend_deploy
|
||||
condition: succeeded('frontend_deploy')
|
||||
displayName: Function Deploy
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureFunctionAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
appName: 'func-odms-dictation-stg'
|
||||
imageName: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation_function:$(Build.SourceVersion)'
|
||||
- job: smoke_test
|
||||
dependsOn: function_deploy
|
||||
condition: succeeded('function_deploy')
|
||||
displayName: 'smoke test'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
# スモークテスト用にjobを確保
|
||||
- job: swap_slot
|
||||
dependsOn: smoke_test
|
||||
condition: succeeded('smoke_test')
|
||||
displayName: 'Swap Staging and Production'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureAppServiceManage@0
|
||||
displayName: 'Azure App Service Manage: app-odms-dictation-stg'
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
action: 'Swap Slots'
|
||||
WebAppName: 'app-odms-dictation-stg'
|
||||
ResourceGroupName: 'stg-application-rg'
|
||||
SourceSlot: 'staging'
|
||||
SwapWithProduction: true
|
||||
- job: migration
|
||||
dependsOn: swap_slot
|
||||
condition: succeeded('swap_slot')
|
||||
displayName: DB migration
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-stg'
|
||||
inputs:
|
||||
ConnectedServiceName: 'omds-service-connection-stg'
|
||||
KeyVaultName: kv-odms-secret-stg
|
||||
- task: CmdLine@2
|
||||
displayName: migration
|
||||
inputs:
|
||||
script: >2
|
||||
# DB接続情報書き換え
|
||||
sed -i -e "s/DB_NAME/$(db-name-ph1-enhance)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PASS/$(admin-db-pass)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_USERNAME/$(admin-db-user)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PORT/$(db-port)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_HOST/$(db-host)/g" ./dictation_server/db/dbconfig.yml
|
||||
sql-migrate --version
|
||||
cat ./dictation_server/db/dbconfig.yml
|
||||
# migration実行
|
||||
sql-migrate up -config=./dictation_server/db/dbconfig.yml -env=ci
|
||||
@ -1,5 +1,4 @@
|
||||
# Pipeline側でKeyVaultやDocker、AppService等に対する操作権限を持ったServiceConenctionを作成し、
|
||||
# 環境変数 AZURE_SERVICE_CONNECTION の値としてServiceConenction名を設定しておくこと
|
||||
# Pipeline側でKeyVaultやDocker、AppService等に対する操作権限を持ったServiceConenctionを作成しておくこと
|
||||
# また、環境変数 STATIC_DICTATION_DEPLOYMENT_TOKEN の値として静的WebAppsのデプロイトークンを設定しておくこと
|
||||
trigger:
|
||||
branches:
|
||||
@ -28,9 +27,33 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'タグが付けられたCommitがmainブランチに存在するか確認'
|
||||
- job: backend_build
|
||||
- job: backend_test
|
||||
dependsOn: initialize
|
||||
condition: succeeded('initialize')
|
||||
displayName: UnitTest
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: dictation_server/.devcontainer
|
||||
script: |
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
docker-compose -f pipeline-docker-compose.yml build
|
||||
docker-compose -f pipeline-docker-compose.yml up -d
|
||||
docker-compose exec -T dictation_server sudo npm ci
|
||||
docker-compose exec -T dictation_server sudo npm run migrate:up:test
|
||||
docker-compose exec -T dictation_server sudo npm run test
|
||||
- job: backend_build
|
||||
dependsOn: backend_test
|
||||
condition: succeeded('backend_test')
|
||||
displayName: Build And Push Backend Image
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
@ -44,77 +67,29 @@ jobs:
|
||||
command: ci
|
||||
workingDir: dictation_server
|
||||
verbose: false
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-stg'
|
||||
inputs:
|
||||
ConnectedServiceName: $(AZURE_SERVICE_CONNECTION)
|
||||
KeyVaultName: kv-odms-secret-stg
|
||||
SecretsFilter: '*'
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
cd dictation_server
|
||||
npm run test
|
||||
env:
|
||||
JWT_PUBLIC_KEY: $(token-public-key)
|
||||
SENDGRID_API_KEY: $(sendgrid-api-key)
|
||||
NOTIFICATION_HUB_NAME: $(notification-hub-name)
|
||||
NOTIFICATION_HUB_CONNECT_STRING: $(notification-hub-connect-string)
|
||||
STORAGE_ACCOUNT_NAME_US: $(storage-account-name-us)
|
||||
STORAGE_ACCOUNT_NAME_AU: $(storage-account-name-au)
|
||||
STORAGE_ACCOUNT_NAME_EU: $(storage-account-name-eu)
|
||||
STORAGE_ACCOUNT_KEY_US: $(storage-account-key-us)
|
||||
STORAGE_ACCOUNT_KEY_AU: $(storage-account-key-au)
|
||||
STORAGE_ACCOUNT_KEY_EU: $(storage-account-key-eu)
|
||||
STORAGE_ACCOUNT_ENDPOINT_US: $(storage-account-endpoint-us)
|
||||
STORAGE_ACCOUNT_ENDPOINT_AU: $(storage-account-endpoint-au)
|
||||
STORAGE_ACCOUNT_ENDPOINT_EU: $(storage-account-endpoint-eu)
|
||||
ADB2C_TENANT_ID: $(adb2c-tenant-id)
|
||||
ADB2C_CLIENT_ID: $(adb2c-client-id)
|
||||
ADB2C_CLIENT_SECRET: $(adb2c-client-secret)
|
||||
- task: Docker@0
|
||||
displayName: build
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: $(AZURE_SERVICE_CONNECTION)
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
dockerFile: DockerfileServerDictation.dockerfile
|
||||
imageName: $(Build.Repository.Name)/staging/dictation:$(Build.SourceVersion)
|
||||
imageName: odmscloud/staging/dictation:$(Build.SourceVersion)
|
||||
buildArguments: |
|
||||
BUILD_VERSION=$(Build.SourceVersion)
|
||||
- task: Docker@0
|
||||
displayName: push
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: $(AZURE_SERVICE_CONNECTION)
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
action: Push an image
|
||||
imageName: $(Build.Repository.Name)/staging/dictation:$(Build.SourceVersion)
|
||||
- job: backend_deploy
|
||||
imageName: odmscloud/staging/dictation:$(Build.SourceVersion)
|
||||
- job: frontend_build_staging
|
||||
dependsOn: backend_build
|
||||
condition: succeeded('backend_build')
|
||||
displayName: Backend Deploy
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureRmWebAppDeployment@4
|
||||
inputs:
|
||||
ConnectionType: 'AzureRM'
|
||||
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
||||
appType: 'webAppContainer'
|
||||
WebAppName: 'app-odms-dictation-stg'
|
||||
ResourceGroupName: 'stg-application-rg'
|
||||
DockerNamespace: 'crodmsregistrymaintenance.azurecr.io'
|
||||
DockerRepository: '$(Build.Repository.Name)/staging/dictation'
|
||||
DockerImageTag: '$(Build.SourceVersion)'
|
||||
- job: frontend_build
|
||||
dependsOn: initialize
|
||||
condition: succeeded('initialize')
|
||||
displayName: Build Frontend Files
|
||||
displayName: Build Frontend Files(staging)
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
containerName: staging
|
||||
environment: staging
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
@ -131,7 +106,7 @@ jobs:
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: cd dictation_client && npm run build
|
||||
script: cd dictation_client && npm run build:stg
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: dictation_client/build
|
||||
@ -141,46 +116,159 @@ jobs:
|
||||
replaceExistingArchive: true
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob upload \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(containerName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--type block \
|
||||
--overwrite \
|
||||
--file $(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip
|
||||
- job: frontend_deploy
|
||||
dependsOn: frontend_build
|
||||
condition: succeeded('frontend_build')
|
||||
displayName: Deploy Frontend Files
|
||||
- job: frontend_build_production
|
||||
dependsOn: frontend_build_staging
|
||||
condition: succeeded('frontend_build_staging')
|
||||
displayName: Build Frontend Files(production)
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
containerName: staging
|
||||
environment: production
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-stg'
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
ConnectedServiceName: $(AZURE_SERVICE_CONNECTION)
|
||||
KeyVaultName: kv-odms-secret-stg
|
||||
SecretsFilter: '*'
|
||||
command: ci
|
||||
workingDir: dictation_client
|
||||
verbose: false
|
||||
- task: Bash@3
|
||||
displayName: Bash Script
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: cd dictation_client && npm run build:prod
|
||||
- task: ArchiveFiles@2
|
||||
inputs:
|
||||
rootFolderOrFile: dictation_client/build
|
||||
includeRootFolder: false
|
||||
archiveType: 'zip'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip'
|
||||
replaceExistingArchive: true
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob upload \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--type block \
|
||||
--overwrite \
|
||||
--file $(Build.ArtifactStagingDirectory)/$(Build.SourceVersion).zip
|
||||
- job: function_test
|
||||
dependsOn: frontend_build_production
|
||||
condition: succeeded('frontend_build_production')
|
||||
displayName: UnitTest
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Bash@3
|
||||
displayName: Bash Script (Test)
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: dictation_function/.devcontainer
|
||||
script: |
|
||||
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
docker-compose -f pipeline-docker-compose.yml build
|
||||
docker-compose -f pipeline-docker-compose.yml up -d
|
||||
docker-compose exec -T dictation_function sudo npm ci
|
||||
docker-compose exec -T dictation_function sudo npm run test
|
||||
- job: function_build
|
||||
dependsOn: function_test
|
||||
condition: succeeded('function_test')
|
||||
displayName: Build And Push Function Image
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: Npm@1
|
||||
displayName: npm ci
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: dictation_function
|
||||
verbose: false
|
||||
- task: Docker@0
|
||||
displayName: build
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
dockerFile: DockerfileFunctionDictation.dockerfile
|
||||
imageName: odmscloud/staging/dictation_function:$(Build.SourceVersion)
|
||||
buildArguments: |
|
||||
BUILD_VERSION=$(Build.SourceVersion)
|
||||
- task: Docker@0
|
||||
displayName: push
|
||||
inputs:
|
||||
azureSubscriptionEndpoint: 'omds-service-connection-stg'
|
||||
azureContainerRegistry: '{"loginServer":"crodmsregistrymaintenance.azurecr.io", "id" : "/subscriptions/108fb131-cdca-4729-a2be-e5bd8c0b3ba7/resourceGroups/maintenance-rg/providers/Microsoft.ContainerRegistry/registries/crOdmsRegistryMaintenance"}'
|
||||
action: Push an image
|
||||
imageName: odmscloud/staging/dictation_function:$(Build.SourceVersion)
|
||||
- job: backend_deploy
|
||||
dependsOn: function_build
|
||||
condition: succeeded('function_build')
|
||||
displayName: Backend Deploy
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureWebAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
appName: 'app-odms-dictation-stg'
|
||||
deployToSlotOrASE: true
|
||||
resourceGroupName: 'stg-application-rg'
|
||||
slotName: 'staging'
|
||||
containers: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation:$(Build.SourceVersion)'
|
||||
- job: frontend_deploy
|
||||
dependsOn: backend_deploy
|
||||
condition: succeeded('backend_deploy')
|
||||
displayName: Deploy Frontend Files
|
||||
variables:
|
||||
storageAccountName: saomdspipeline
|
||||
environment: staging
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
scriptType: 'bash'
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az storage blob download \
|
||||
--auth-mode login \
|
||||
--account-name $(storageAccountName) \
|
||||
--container-name $(containerName) \
|
||||
--container-name $(environment) \
|
||||
--name $(Build.SourceVersion).zip \
|
||||
--file $(Build.SourcesDirectory)/$(Build.SourceVersion).zip
|
||||
- task: Bash@3
|
||||
@ -199,15 +287,57 @@ jobs:
|
||||
is_static_export: false
|
||||
verbose: false
|
||||
azure_static_web_apps_api_token: $(STATIC_DICTATION_DEPLOYMENT_TOKEN)
|
||||
- job: migration
|
||||
condition: succeeded('initialize')
|
||||
displayName: DB migration
|
||||
dependsOn:
|
||||
- initialize
|
||||
- backend_deploy
|
||||
- frontend_deploy
|
||||
- job: function_deploy
|
||||
dependsOn: frontend_deploy
|
||||
condition: succeeded('frontend_deploy')
|
||||
displayName: Function Deploy
|
||||
pool:
|
||||
name: db-migrate-pipelines
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureFunctionAppContainer@1
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
appName: 'func-odms-dictation-stg'
|
||||
imageName: 'crodmsregistrymaintenance.azurecr.io/odmscloud/staging/dictation_function:$(Build.SourceVersion)'
|
||||
- job: smoke_test
|
||||
dependsOn: function_deploy
|
||||
condition: succeeded('function_deploy')
|
||||
displayName: 'smoke test'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
# スモークテスト用にjobを確保
|
||||
- job: swap_slot
|
||||
dependsOn: smoke_test
|
||||
condition: succeeded('smoke_test')
|
||||
displayName: 'Swap Staging and Production'
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
- task: AzureAppServiceManage@0
|
||||
displayName: 'Azure App Service Manage: app-odms-dictation-stg'
|
||||
inputs:
|
||||
azureSubscription: 'omds-service-connection-stg'
|
||||
action: 'Swap Slots'
|
||||
WebAppName: 'app-odms-dictation-stg'
|
||||
ResourceGroupName: 'stg-application-rg'
|
||||
SourceSlot: 'staging'
|
||||
SwapWithProduction: true
|
||||
- job: migration
|
||||
dependsOn: swap_slot
|
||||
condition: succeeded('swap_slot')
|
||||
displayName: DB migration
|
||||
pool:
|
||||
name: odms-deploy-pipeline
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
@ -215,19 +345,19 @@ jobs:
|
||||
- task: AzureKeyVault@2
|
||||
displayName: 'Azure Key Vault: kv-odms-secret-stg'
|
||||
inputs:
|
||||
ConnectedServiceName: $(AZURE_SERVICE_CONNECTION)
|
||||
ConnectedServiceName: 'omds-service-connection-stg'
|
||||
KeyVaultName: kv-odms-secret-stg
|
||||
- task: CmdLine@2
|
||||
displayName: migration
|
||||
inputs:
|
||||
script: >2
|
||||
# DB接続情報書き換え
|
||||
sed -i -e "s/DB_NAME/$(db-name)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PASS/$(db-pass)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_USERNAME/$(db-user)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PORT/$(db-port)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_HOST/$(db-host)/g" ./dictation_server/db/dbconfig.yml
|
||||
sql-migrate --version
|
||||
cat ./dictation_server/db/dbconfig.yml
|
||||
# migration実行
|
||||
sql-migrate up -config=./dictation_server/db/dbconfig.yml -env=ci
|
||||
sed -i -e "s/DB_NAME/$(db-name)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PASS/$(admin-db-pass)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_USERNAME/$(admin-db-user)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_PORT/$(db-port)/g" ./dictation_server/db/dbconfig.yml
|
||||
sed -i -e "s/DB_HOST/$(db-host)/g" ./dictation_server/db/dbconfig.yml
|
||||
sql-migrate --version
|
||||
cat ./dictation_server/db/dbconfig.yml
|
||||
# migration実行
|
||||
sql-migrate up -config=./dictation_server/db/dbconfig.yml -env=ci
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
96
configurations/azure/dev-monitor-rg.json
Normal file
96
configurations/azure/dev-monitor-rg.json
Normal file
@ -0,0 +1,96 @@
|
||||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"actionGroups_ag_manual_recovery_alerts_odms_dev_name": {
|
||||
"type": "String"
|
||||
},
|
||||
"scheduledqueryrules_ManualRecoveryAlerts_name": {
|
||||
"type": "String"
|
||||
},
|
||||
"sites_app_odms_dictation_dev_externalid": {
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2023-01-01",
|
||||
"location": "Global",
|
||||
"name": "[parameters('actionGroups_ag_manual_recovery_alerts_odms_dev_name')]",
|
||||
"properties": {
|
||||
"armRoleReceivers": [],
|
||||
"automationRunbookReceivers": [],
|
||||
"azureAppPushReceivers": [],
|
||||
"azureFunctionReceivers": [],
|
||||
"emailReceivers": [
|
||||
{
|
||||
"emailAddress": "saito.k@nds-tyo.co.jp",
|
||||
"name": "テスト通知_-EmailAction-",
|
||||
"useCommonAlertSchema": false
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"eventHubReceivers": [],
|
||||
"groupShortName": "手動復旧が必要なエラー",
|
||||
"itsmReceivers": [],
|
||||
"logicAppReceivers": [],
|
||||
"smsReceivers": [],
|
||||
"voiceReceivers": [],
|
||||
"webhookReceivers": []
|
||||
},
|
||||
"tags": {
|
||||
"Environment": "develop",
|
||||
"Project": "ODMS",
|
||||
"ms-resource-usage": "ManualRecoveryAlerts"
|
||||
},
|
||||
"type": "microsoft.insights/actionGroups"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2023-03-15-preview",
|
||||
"dependsOn": [
|
||||
"[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_ag_manual_recovery_alerts_odms_dev_name'))]"
|
||||
],
|
||||
"location": "japaneast",
|
||||
"name": "[parameters('scheduledqueryrules_ManualRecoveryAlerts_name')]",
|
||||
"properties": {
|
||||
"actions": {
|
||||
"actionGroups": [
|
||||
"[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_ag_manual_recovery_alerts_odms_dev_name'))]"
|
||||
],
|
||||
"actionProperties": {},
|
||||
"customProperties": {}
|
||||
},
|
||||
"autoMitigate": false,
|
||||
"criteria": {
|
||||
"allOf": [
|
||||
{
|
||||
"dimensions": [],
|
||||
"failingPeriods": {
|
||||
"minFailingPeriodsToAlert": 1,
|
||||
"numberOfEvaluationPeriods": 1
|
||||
},
|
||||
"operator": "GreaterThanOrEqual",
|
||||
"query": "AppServiceConsoleLogs | where Level == \"Error\" and ResultDescription contains \"[MANUAL_RECOVERY_REQUIRED]\"\n",
|
||||
"threshold": 1.0,
|
||||
"timeAggregation": "Count"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "手動復旧が必要なエラーを検知し、設定されたメールアドレスに通知を行う",
|
||||
"displayName": "[parameters('scheduledqueryrules_ManualRecoveryAlerts_name')]",
|
||||
"enabled": true,
|
||||
"evaluationFrequency": "PT1M",
|
||||
"scopes": [
|
||||
"[parameters('sites_app_odms_dictation_dev_externalid')]"
|
||||
],
|
||||
"severity": 0,
|
||||
"targetResourceTypes": [
|
||||
"Microsoft.Web/sites"
|
||||
],
|
||||
"windowSize": "PT1M"
|
||||
},
|
||||
"type": "microsoft.insights/scheduledqueryrules"
|
||||
}
|
||||
],
|
||||
"variables": {}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -8,17 +8,15 @@
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"location": "Japan East",
|
||||
"name": "[parameters('namespaces_ntfns_odms_dev_name')]",
|
||||
"properties": {
|
||||
"createdAt": "2023-07-24T01:26:14.6870000Z",
|
||||
"critical": false,
|
||||
"enabled": true,
|
||||
"namespaceType": "NotificationHub",
|
||||
"networkAcls": {},
|
||||
"provisioningState": "Succeeded",
|
||||
"serviceBusEndpoint": "[concat('https://', parameters('namespaces_ntfns_odms_dev_name'), '.servicebus.windows.net:443/')]",
|
||||
"status": "Active",
|
||||
"updatedAt": "2023-07-24T01:26:14.7370000Z"
|
||||
"publicNetworkAccess": "Enabled",
|
||||
"status": "Created"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Free"
|
||||
@ -26,11 +24,10 @@
|
||||
"type": "Microsoft.NotificationHubs/namespaces"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_dev_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_dev_name'), '/RootManageSharedAccessKey')]",
|
||||
"properties": {
|
||||
"rights": [
|
||||
@ -39,32 +36,31 @@
|
||||
"Send"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/AuthorizationRules"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/authorizationRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_dev_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_dev_name'), '/ntf-odms-dev')]",
|
||||
"properties": {
|
||||
"authorizationRules": [],
|
||||
"name": "ntf-odms-dev",
|
||||
"registrationTtl": "10675199.02:48:05.4775807"
|
||||
},
|
||||
"tags": {
|
||||
"Project": "OMDS",
|
||||
"environment": "develop"
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/NotificationHubs"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/NotificationHubs', parameters('namespaces_ntfns_odms_dev_name'), 'ntf-odms-dev')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/notificationHubs', parameters('namespaces_ntfns_odms_dev_name'), 'ntf-odms-dev')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_dev_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_dev_name'), '/ntf-odms-dev/DefaultFullSharedAccessSignature')]",
|
||||
"properties": {
|
||||
"rights": [
|
||||
@ -73,22 +69,21 @@
|
||||
"Send"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/NotificationHubs/AuthorizationRules"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/NotificationHubs', parameters('namespaces_ntfns_odms_dev_name'), 'ntf-odms-dev')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/notificationHubs', parameters('namespaces_ntfns_odms_dev_name'), 'ntf-odms-dev')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_dev_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_dev_name'), '/ntf-odms-dev/DefaultListenSharedAccessSignature')]",
|
||||
"properties": {
|
||||
"rights": [
|
||||
"Listen"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/NotificationHubs/AuthorizationRules"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"
|
||||
}
|
||||
],
|
||||
"variables": {}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
39
configurations/azure/stg-monitor-rg.json
Normal file
39
configurations/azure/stg-monitor-rg.json
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
||||
"contentVersion": "1.0.0.0",
|
||||
"parameters": {
|
||||
"actionGroups__ag_manual_recovery_alerts_odms_stg_name": {
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2023-01-01",
|
||||
"location": "Global",
|
||||
"name": "[parameters('actionGroups__ag_manual_recovery_alerts_odms_stg_name')]",
|
||||
"properties": {
|
||||
"armRoleReceivers": [],
|
||||
"automationRunbookReceivers": [],
|
||||
"azureAppPushReceivers": [],
|
||||
"azureFunctionReceivers": [],
|
||||
"emailReceivers": [
|
||||
{
|
||||
"emailAddress": "saito.k@nds-tyo.co.jp",
|
||||
"name": "Alert Notification Address_-EmailAction-",
|
||||
"useCommonAlertSchema": false
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"eventHubReceivers": [],
|
||||
"groupShortName": "Žè“®•œ‹ŒƒGƒ‰<C692>[",
|
||||
"itsmReceivers": [],
|
||||
"logicAppReceivers": [],
|
||||
"smsReceivers": [],
|
||||
"voiceReceivers": [],
|
||||
"webhookReceivers": []
|
||||
},
|
||||
"type": "microsoft.insights/actionGroups"
|
||||
}
|
||||
],
|
||||
"variables": {}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -8,17 +8,15 @@
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"location": "Japan East",
|
||||
"name": "[parameters('namespaces_ntfns_odms_stg_name')]",
|
||||
"properties": {
|
||||
"createdAt": "2023-07-25T01:57:35.5400000Z",
|
||||
"critical": false,
|
||||
"enabled": true,
|
||||
"namespaceType": "NotificationHub",
|
||||
"networkAcls": {},
|
||||
"provisioningState": "Succeeded",
|
||||
"serviceBusEndpoint": "[concat('https://', parameters('namespaces_ntfns_odms_stg_name'), '.servicebus.windows.net:443/')]",
|
||||
"status": "Active",
|
||||
"updatedAt": "2023-07-25T01:57:35.5970000Z"
|
||||
"publicNetworkAccess": "Enabled",
|
||||
"status": "Created"
|
||||
},
|
||||
"sku": {
|
||||
"name": "Free"
|
||||
@ -26,11 +24,10 @@
|
||||
"type": "Microsoft.NotificationHubs/namespaces"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_stg_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_stg_name'), '/RootManageSharedAccessKey')]",
|
||||
"properties": {
|
||||
"rights": [
|
||||
@ -39,32 +36,31 @@
|
||||
"Send"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/AuthorizationRules"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/authorizationRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_stg_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_stg_name'), '/ntf-odms-stg')]",
|
||||
"properties": {
|
||||
"authorizationRules": [],
|
||||
"name": "ntf-odms-stg",
|
||||
"registrationTtl": "10675199.02:48:05.4775807"
|
||||
},
|
||||
"tags": {
|
||||
"Project": "OMDS",
|
||||
"environment": "staging"
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/NotificationHubs"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/NotificationHubs', parameters('namespaces_ntfns_odms_stg_name'), 'ntf-odms-stg')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/notificationHubs', parameters('namespaces_ntfns_odms_stg_name'), 'ntf-odms-stg')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_stg_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_stg_name'), '/ntf-odms-stg/DefaultFullSharedAccessSignature')]",
|
||||
"properties": {
|
||||
"rights": [
|
||||
@ -73,22 +69,21 @@
|
||||
"Send"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/NotificationHubs/AuthorizationRules"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"
|
||||
},
|
||||
{
|
||||
"apiVersion": "2017-04-01",
|
||||
"apiVersion": "2023-09-01",
|
||||
"dependsOn": [
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/NotificationHubs', parameters('namespaces_ntfns_odms_stg_name'), 'ntf-odms-stg')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces/notificationHubs', parameters('namespaces_ntfns_odms_stg_name'), 'ntf-odms-stg')]",
|
||||
"[resourceId('Microsoft.NotificationHubs/namespaces', parameters('namespaces_ntfns_odms_stg_name'))]"
|
||||
],
|
||||
"location": "Japan East",
|
||||
"name": "[concat(parameters('namespaces_ntfns_odms_stg_name'), '/ntf-odms-stg/DefaultListenSharedAccessSignature')]",
|
||||
"properties": {
|
||||
"rights": [
|
||||
"Listen"
|
||||
]
|
||||
},
|
||||
"type": "Microsoft.NotificationHubs/namespaces/NotificationHubs/AuthorizationRules"
|
||||
"type": "Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"
|
||||
}
|
||||
],
|
||||
"variables": {}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1
data_migration_tools/.gitignore
vendored
Normal file
1
data_migration_tools/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/tool*
|
||||
BIN
data_migration_tools/baseNode.zip
Normal file
BIN
data_migration_tools/baseNode.zip
Normal file
Binary file not shown.
8
data_migration_tools/buildTool.ps1
Normal file
8
data_migration_tools/buildTool.ps1
Normal file
@ -0,0 +1,8 @@
|
||||
# 移行ツールをビルドする
|
||||
# docker ps
|
||||
|
||||
$clientContainerName = "client_devcontainer-client-1"
|
||||
$serverContainerName = "server_devcontainer-server-1"
|
||||
|
||||
docker exec -t $clientContainerName sudo npm run build:local
|
||||
docker exec -t $serverContainerName npm run build:exe
|
||||
32
data_migration_tools/client/.devcontainer/Dockerfile
Normal file
32
data_migration_tools/client/.devcontainer/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM node:18.13.0-buster
|
||||
|
||||
RUN /bin/cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
|
||||
echo "Asia/Tokyo" > /etc/timezone
|
||||
|
||||
# Options for setup script
|
||||
ARG INSTALL_ZSH="true"
|
||||
ARG UPGRADE_PACKAGES="false"
|
||||
ARG USERNAME=vscode
|
||||
# 1000 はnodeで使われているためずらす
|
||||
ARG USER_UID=1001
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
|
||||
COPY library-scripts/common-debian.sh /tmp/library-scripts/
|
||||
RUN bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
|
||||
&& apt-get install default-jre -y \
|
||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
|
||||
|
||||
# Install mob
|
||||
RUN curl -sL install.mob.sh | sh
|
||||
|
||||
# 以下 ユーザー権限で実施
|
||||
USER $USERNAME
|
||||
|
||||
# copy init-script
|
||||
COPY --chown=$USERNAME:$USERNAME init.sh /home/${USERNAME}/
|
||||
RUN chmod +x /home/${USERNAME}/init.sh
|
||||
|
||||
# 初期化を行う
|
||||
# node imageのデフォルトENTRYPOINTが邪魔するため上書き
|
||||
ENTRYPOINT /home/vscode/init.sh
|
||||
43
data_migration_tools/client/.devcontainer/devcontainer.json
Normal file
43
data_migration_tools/client/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,43 @@
|
||||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.137.0/containers/go
|
||||
{
|
||||
"name": "data_migration_tools client",
|
||||
"dockerComposeFile": ["./docker-compose.yml"],
|
||||
"service": "client",
|
||||
// コンテナを自動停止させない
|
||||
"shutdownAction": "none",
|
||||
"workspaceFolder": "/app/data_migration_tools/client",
|
||||
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true, // eslint
|
||||
"source.fixAll.stylelint": true // Stylelint
|
||||
},
|
||||
// formatter
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode", // デフォルトフォーマッターをPrettier
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnType": true,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": false,
|
||||
"editor.renderLineHighlight": "all"
|
||||
},
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"salbert.comment-ts",
|
||||
"gruntfuggly.todo-tree",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-vsliveshare.vsliveshare",
|
||||
"albymor.increment-selection",
|
||||
"eamodio.gitlens",
|
||||
"wmaurer.change-case"
|
||||
],
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "yarn install",
|
||||
"postCreateCommand": "sudo npm install @openapitools/openapi-generator-cli -g && sudo chown -R vscode:vscode /app/data_migration_tools/client",
|
||||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
20
data_migration_tools/client/.devcontainer/docker-compose.yml
Normal file
20
data_migration_tools/client/.devcontainer/docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
client:
|
||||
env_file: ../.env
|
||||
build: .
|
||||
working_dir: /app/data_migration_tools/client
|
||||
ports:
|
||||
- "127.0.0.1:3100:3100"
|
||||
volumes:
|
||||
- ../../../:/app
|
||||
- data_migration_tools_client_node_modules:/app/data_migration_tools/client/node_modules
|
||||
expose:
|
||||
- "3100"
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
|
||||
# Data Volume として永続化する
|
||||
volumes:
|
||||
data_migration_tools_client_node_modules:
|
||||
22
data_migration_tools/client/.devcontainer/init.sh
Normal file
22
data_migration_tools/client/.devcontainer/init.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Init Script for client Container
|
||||
#
|
||||
|
||||
echo [init.sh] client initialize.
|
||||
|
||||
# /app の権限がデフォルトでは node ユーザーになっているため、
|
||||
# 権限確認し、vscode ユーザでない場合付け替える
|
||||
ls -ld /app | grep vscode
|
||||
if [ $? -ne 0 ]; then
|
||||
echo [init.sh] change /app owner to vscode.
|
||||
sudo chown -R vscode:vscode /app
|
||||
fi
|
||||
|
||||
cd /app/data_migration_tools/client
|
||||
echo [init.sh] \"npm ci\" start.
|
||||
npm ci
|
||||
|
||||
echo [init.sh] initialize completed!
|
||||
|
||||
sleep infinity
|
||||
@ -0,0 +1,190 @@
|
||||
#!/usr/bin/env bash
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag]
|
||||
|
||||
INSTALL_ZSH=${1:-"true"}
|
||||
USERNAME=${2:-"vscode"}
|
||||
USER_UID=${3:-1000}
|
||||
USER_GID=${4:-1000}
|
||||
UPGRADE_PACKAGES=${5:-"true"}
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo -e 'Script must be run a root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Treat a user name of "none" as root
|
||||
if [ "${USERNAME}" = "none" ] || [ "${USERNAME}" = "root" ]; then
|
||||
USERNAME=root
|
||||
USER_UID=0
|
||||
USER_GID=0
|
||||
fi
|
||||
|
||||
# Load markers to see which steps have already run
|
||||
MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
|
||||
if [ -f "${MARKER_FILE}" ]; then
|
||||
echo "Marker file found:"
|
||||
cat "${MARKER_FILE}"
|
||||
source "${MARKER_FILE}"
|
||||
fi
|
||||
|
||||
# Ensure apt is in non-interactive to avoid prompts
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Function to call apt-get if needed
|
||||
apt-get-update-if-needed()
|
||||
{
|
||||
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
|
||||
echo "Running apt-get update..."
|
||||
apt-get update
|
||||
else
|
||||
echo "Skipping apt-get update."
|
||||
fi
|
||||
}
|
||||
|
||||
# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies
|
||||
if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
|
||||
apt-get-update-if-needed
|
||||
|
||||
PACKAGE_LIST="apt-utils \
|
||||
git \
|
||||
openssh-client \
|
||||
less \
|
||||
iproute2 \
|
||||
procps \
|
||||
curl \
|
||||
wget \
|
||||
unzip \
|
||||
zip \
|
||||
nano \
|
||||
jq \
|
||||
lsb-release \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
dialog \
|
||||
gnupg2 \
|
||||
libc6 \
|
||||
libgcc1 \
|
||||
libgssapi-krb5-2 \
|
||||
libicu[0-9][0-9] \
|
||||
liblttng-ust0 \
|
||||
libstdc++6 \
|
||||
zlib1g \
|
||||
locales \
|
||||
sudo"
|
||||
|
||||
# Install libssl1.1 if available
|
||||
if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then
|
||||
PACKAGE_LIST="${PACKAGE_LIST} libssl1.1"
|
||||
fi
|
||||
|
||||
# Install appropriate version of libssl1.0.x if available
|
||||
LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '')
|
||||
if [ "$(echo "$LIBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then
|
||||
if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then
|
||||
# Debian 9
|
||||
PACKAGE_LIST="${PACKAGE_LIST} libssl1.0.2"
|
||||
elif [[ ! -z $(apt-cache --names-only search ^libssl1.0.0$) ]]; then
|
||||
# Ubuntu 18.04, 16.04, earlier
|
||||
PACKAGE_LIST="${PACKAGE_LIST} libssl1.0.0"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Packages to verify are installed: ${PACKAGE_LIST}"
|
||||
apt-get -y install --no-install-recommends ${PACKAGE_LIST} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 )
|
||||
|
||||
PACKAGES_ALREADY_INSTALLED="true"
|
||||
fi
|
||||
|
||||
# Get to latest versions of all packages
|
||||
if [ "${UPGRADE_PACKAGES}" = "true" ]; then
|
||||
apt-get-update-if-needed
|
||||
apt-get -y upgrade --no-install-recommends
|
||||
apt-get autoremove -y
|
||||
fi
|
||||
|
||||
# Ensure at least the en_US.UTF-8 UTF-8 locale is available.
|
||||
# Common need for both applications and things like the agnoster ZSH theme.
|
||||
if [ "${LOCALE_ALREADY_SET}" != "true" ]; then
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
locale-gen
|
||||
LOCALE_ALREADY_SET="true"
|
||||
fi
|
||||
|
||||
# Create or update a non-root user to match UID/GID - see https://aka.ms/vscode-remote/containers/non-root-user.
|
||||
if id -u $USERNAME > /dev/null 2>&1; then
|
||||
# User exists, update if needed
|
||||
if [ "$USER_GID" != "$(id -G $USERNAME)" ]; then
|
||||
groupmod --gid $USER_GID $USERNAME
|
||||
usermod --gid $USER_GID $USERNAME
|
||||
fi
|
||||
if [ "$USER_UID" != "$(id -u $USERNAME)" ]; then
|
||||
usermod --uid $USER_UID $USERNAME
|
||||
fi
|
||||
else
|
||||
# Create user
|
||||
groupadd --gid $USER_GID $USERNAME
|
||||
useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME
|
||||
fi
|
||||
|
||||
# Add add sudo support for non-root user
|
||||
if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" ]; then
|
||||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
|
||||
chmod 0440 /etc/sudoers.d/$USERNAME
|
||||
EXISTING_NON_ROOT_USER="${USERNAME}"
|
||||
fi
|
||||
|
||||
# .bashrc/.zshrc snippet
|
||||
RC_SNIPPET="$(cat << EOF
|
||||
export USER=\$(whoami)
|
||||
|
||||
export PATH=\$PATH:\$HOME/.local/bin
|
||||
|
||||
if [[ \$(which code-insiders 2>&1) && ! \$(which code 2>&1) ]]; then
|
||||
alias code=code-insiders
|
||||
fi
|
||||
EOF
|
||||
)"
|
||||
|
||||
# Ensure ~/.local/bin is in the PATH for root and non-root users for bash. (zsh is later)
|
||||
if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then
|
||||
echo "${RC_SNIPPET}" | tee -a /root/.bashrc >> /etc/skel/.bashrc
|
||||
if [ "${USERNAME}" != "root" ]; then
|
||||
echo "${RC_SNIPPET}" >> /home/$USERNAME/.bashrc
|
||||
chown $USER_UID:$USER_GID /home/$USERNAME/.bashrc
|
||||
fi
|
||||
RC_SNIPPET_ALREADY_ADDED="true"
|
||||
fi
|
||||
|
||||
# Optionally install and configure zsh
|
||||
if [ "${INSTALL_ZSH}" = "true" ] && [ ! -d "/root/.oh-my-zsh" ] && [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
|
||||
apt-get-update-if-needed
|
||||
apt-get install -y zsh
|
||||
curl -fsSLo- https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash 2>&1
|
||||
echo -e "${RC_SNIPPET}\nDEFAULT_USER=\$USER\nprompt_context(){}" >> /root/.zshrc
|
||||
cp -fR /root/.oh-my-zsh /etc/skel
|
||||
cp -f /root/.zshrc /etc/skel
|
||||
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/\$(whoami)\/.oh-my-zsh/g" /etc/skel/.zshrc
|
||||
if [ "${USERNAME}" != "root" ]; then
|
||||
cp -fR /etc/skel/.oh-my-zsh /etc/skel/.zshrc /home/$USERNAME
|
||||
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc
|
||||
fi
|
||||
ZSH_ALREADY_INSTALLED="true"
|
||||
fi
|
||||
|
||||
# Write marker file
|
||||
mkdir -p "$(dirname "${MARKER_FILE}")"
|
||||
echo -e "\
|
||||
PACKAGES_ALREADY_INSTALLED=${PACKAGES_ALREADY_INSTALLED}\n\
|
||||
LOCALE_ALREADY_SET=${LOCALE_ALREADY_SET}\n\
|
||||
EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}\n\
|
||||
RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
|
||||
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"
|
||||
|
||||
echo "Done!"
|
||||
0
data_migration_tools/client/.env
Normal file
0
data_migration_tools/client/.env
Normal file
1
data_migration_tools/client/.env.local.example
Normal file
1
data_migration_tools/client/.env.local.example
Normal file
@ -0,0 +1 @@
|
||||
VITE_STAGE=local
|
||||
6
data_migration_tools/client/.eslintignore
Normal file
6
data_migration_tools/client/.eslintignore
Normal file
@ -0,0 +1,6 @@
|
||||
node_modules/
|
||||
build/
|
||||
.eslintrc.js
|
||||
jest.config.js
|
||||
vite.config.ts
|
||||
.env.local
|
||||
149
data_migration_tools/client/.eslintrc.js
Normal file
149
data_migration_tools/client/.eslintrc.js
Normal file
@ -0,0 +1,149 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
extends: [
|
||||
"airbnb",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:react/recommended",
|
||||
"prettier",
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
project: "./tsconfig.json",
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
ecmaVersion: 12,
|
||||
sourceType: "module",
|
||||
},
|
||||
plugins: [
|
||||
"react",
|
||||
"@typescript-eslint",
|
||||
"prettier",
|
||||
"react-hooks",
|
||||
"prefer-arrow",
|
||||
],
|
||||
rules: {
|
||||
"react/jsx-uses-react": "off",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/function-component-definition": [
|
||||
"error",
|
||||
{
|
||||
namedComponents: "arrow-function",
|
||||
unnamedComponents: "arrow-function",
|
||||
},
|
||||
],
|
||||
"react/jsx-filename-extension": [
|
||||
"error",
|
||||
{
|
||||
extensions: ["jsx", "tsx"],
|
||||
},
|
||||
],
|
||||
"import/extensions": [
|
||||
"error",
|
||||
"ignorePackages",
|
||||
{
|
||||
js: "never",
|
||||
jsx: "never",
|
||||
ts: "never",
|
||||
tsx: "never",
|
||||
},
|
||||
],
|
||||
"import/no-unresolved": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"no-use-before-define": 0,
|
||||
"prettier/prettier": "error",
|
||||
"no-param-reassign": 0,
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"@typescript-eslint/prefer-interface": "off",
|
||||
"@typescript-eslint/indent": "off",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
// Checks rules of Hooks
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
// Checks effect dependencies
|
||||
"import/no-extraneous-dependencies": [
|
||||
"error",
|
||||
{
|
||||
devDependencies: [
|
||||
"**/*.test.js",
|
||||
"**/*.spec.js",
|
||||
"**/*.test.ts",
|
||||
"**/*.spec.ts",
|
||||
"**/*.test.tsx",
|
||||
"**/*.spec.tsx",
|
||||
"**/setupTests.ts",
|
||||
],
|
||||
},
|
||||
],
|
||||
camelcase: "off",
|
||||
"prefer-arrow/prefer-arrow-functions": [
|
||||
"error",
|
||||
{
|
||||
disallowPrototype: true,
|
||||
singleReturnOnly: false,
|
||||
classPropertiesAllowed: false,
|
||||
},
|
||||
],
|
||||
"func-style": [
|
||||
"error",
|
||||
"expression",
|
||||
{
|
||||
allowArrowFunctions: true,
|
||||
},
|
||||
],
|
||||
"react/no-multi-comp": ["error"],
|
||||
"react/jsx-pascal-case": ["error"],
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error", // default config
|
||||
{
|
||||
selector: "default",
|
||||
format: ["camelCase"],
|
||||
leadingUnderscore: "allow",
|
||||
trailingUnderscore: "allow",
|
||||
},
|
||||
{
|
||||
selector: "variable",
|
||||
format: ["camelCase", "UPPER_CASE"],
|
||||
leadingUnderscore: "allow",
|
||||
trailingUnderscore: "allow",
|
||||
},
|
||||
{
|
||||
selector: "typeLike",
|
||||
format: ["PascalCase"],
|
||||
}, // custom config
|
||||
{
|
||||
selector: ["property"],
|
||||
format: ["camelCase", "PascalCase"],
|
||||
},
|
||||
{
|
||||
selector: ["variable"],
|
||||
types: ["function"],
|
||||
format: ["camelCase", "PascalCase"],
|
||||
},
|
||||
{
|
||||
selector: "interface",
|
||||
format: ["PascalCase"],
|
||||
custom: {
|
||||
regex: "^I[A-Z]",
|
||||
match: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
"max-lines": ["error", 3000],
|
||||
},
|
||||
settings: {
|
||||
"import/parsers": {
|
||||
"@typescript-eslint/parser": [".ts", ".tsx"],
|
||||
},
|
||||
"import/resolver": {
|
||||
node: {
|
||||
extensions: [".js", "jsx", ".ts", ".tsx"],
|
||||
paths: ["src"],
|
||||
},
|
||||
},
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
};
|
||||
24
data_migration_tools/client/.gitignore
vendored
Normal file
24
data_migration_tools/client/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.env.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
.eslintcache
|
||||
|
||||
# credentials
|
||||
credentials
|
||||
2
data_migration_tools/client/codegen.sh
Normal file
2
data_migration_tools/client/codegen.sh
Normal file
@ -0,0 +1,2 @@
|
||||
npx openapi-generator-cli version-manager set 7.1.0
|
||||
npx openapi-generator-cli generate -g typescript-axios -i /app/data_migration_tools/server/src/api/odms/openapi.json -o /app/data_migration_tools/client/src/api/
|
||||
14
data_migration_tools/client/index.html
Normal file
14
data_migration_tools/client/index.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
1
data_migration_tools/client/localdeploy.sh
Normal file
1
data_migration_tools/client/localdeploy.sh
Normal file
@ -0,0 +1 @@
|
||||
cp -r build /app/data_migration_tools/server
|
||||
7
data_migration_tools/client/openapitools.json
Normal file
7
data_migration_tools/client/openapitools.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
|
||||
"spaces": 2,
|
||||
"generator-cli": {
|
||||
"version": "7.1.0"
|
||||
}
|
||||
}
|
||||
14043
data_migration_tools/client/package-lock.json
generated
Normal file
14043
data_migration_tools/client/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
93
data_migration_tools/client/package.json
Normal file
93
data_migration_tools/client/package.json
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
"name": "client",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"build:prod": "tsc && vite build",
|
||||
"build:local": "tsc && vite build && sh localdeploy.sh",
|
||||
"preview": "vite preview",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"codegen": "sh codegen.sh",
|
||||
"lint": "eslint --cache . --ext .js,.ts,.tsx",
|
||||
"lint:fix": "npm run lint -- --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/storage-blob": "^12.14.0",
|
||||
"@reduxjs/toolkit": "^1.8.3",
|
||||
"@testing-library/jest-dom": "^5.16.4",
|
||||
"@testing-library/react": "^13.3.0",
|
||||
"@testing-library/user-event": "^14.2.1",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/node": "^17.0.45",
|
||||
"@types/react": "^18.0.14",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"@types/redux-mock-store": "^1.0.3",
|
||||
"axios": "^0.27.2",
|
||||
"eslint-plugin-prefer-arrow": "^1.2.3",
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^3.3.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-google-recaptcha-v3": "^1.10.0",
|
||||
"react-paginate": "^8.1.3",
|
||||
"react-redux": "^8.0.2",
|
||||
"react-router-dom": "^6.4.1",
|
||||
"redux-mock-store": "^1.5.4",
|
||||
"redux-thunk": "^2.4.1",
|
||||
"styled-components": "^5.3.5",
|
||||
"typescript": "^4.7.4",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.6",
|
||||
"@mdx-js/react": "^2.1.2",
|
||||
"@openapitools/openapi-generator-cli": "^2.5.2",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/luxon": "^3.2.0",
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"@types/redux-mock-store": "^1.0.3",
|
||||
"@types/styled-components": "^5.1.25",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||
"@typescript-eslint/parser": "^5.30.5",
|
||||
"@vitejs/plugin-react": "^1.3.2",
|
||||
"babel-loader": "^8.2.5",
|
||||
"eslint": "^8.19.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"license-checker": "^25.0.1",
|
||||
"prettier": "^2.7.1",
|
||||
"redux-mock-store": "^1.5.4",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^2.9.9",
|
||||
"vite-plugin-env-compatible": "^1.1.1",
|
||||
"vite-tsconfig-paths": "^3.5.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.stories.*"
|
||||
],
|
||||
"rules": {
|
||||
"import/no-anonymous-default-export": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
11
data_migration_tools/client/src/App.tsx
Normal file
11
data_migration_tools/client/src/App.tsx
Normal file
@ -0,0 +1,11 @@
|
||||
import AppRouter from "AppRouter";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import "./styles/GlobalStyle.css";
|
||||
|
||||
const App = (): JSX.Element => (
|
||||
<BrowserRouter>
|
||||
<AppRouter />
|
||||
</BrowserRouter>
|
||||
);
|
||||
|
||||
export default App;
|
||||
12
data_migration_tools/client/src/AppRouter.tsx
Normal file
12
data_migration_tools/client/src/AppRouter.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
import TopPage from "./pages/topPage";
|
||||
import DeletePage from "./pages/deletePage";
|
||||
|
||||
const AppRouter: React.FC = () => (
|
||||
<Routes>
|
||||
<Route path="/" element={<TopPage />} />
|
||||
<Route path="/delete" element={<DeletePage />} />
|
||||
</Routes>
|
||||
);
|
||||
|
||||
export default AppRouter;
|
||||
4
data_migration_tools/client/src/api/.gitignore
vendored
Normal file
4
data_migration_tools/client/src/api/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
||||
1
data_migration_tools/client/src/api/.npmignore
Normal file
1
data_migration_tools/client/src/api/.npmignore
Normal file
@ -0,0 +1 @@
|
||||
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
|
||||
@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@ -0,0 +1,9 @@
|
||||
.gitignore
|
||||
.npmignore
|
||||
.openapi-generator-ignore
|
||||
api.ts
|
||||
base.ts
|
||||
common.ts
|
||||
configuration.ts
|
||||
git_push.sh
|
||||
index.ts
|
||||
@ -0,0 +1 @@
|
||||
7.1.0
|
||||
146
data_migration_tools/client/src/api/api.ts
Normal file
146
data_migration_tools/client/src/api/api.ts
Normal file
@ -0,0 +1,146 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* ODMSOpenAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from './configuration';
|
||||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
||||
import type { RequestArgs } from './base';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ErrorResponse
|
||||
*/
|
||||
export interface ErrorResponse {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ErrorResponse
|
||||
*/
|
||||
'message': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ErrorResponse
|
||||
*/
|
||||
'code': string;
|
||||
}
|
||||
|
||||
/**
|
||||
* DeleteApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const DeleteApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* すべてのデータを削除します
|
||||
* @summary
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteData: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/delete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const DeleteApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = DeleteApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
* すべてのデータを削除します
|
||||
* @summary
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteData(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteData(options);
|
||||
const index = configuration?.serverIndex ?? 0;
|
||||
const operationBasePath = operationServerMap['DeleteApi.deleteData']?.[index]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const DeleteApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = DeleteApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
* すべてのデータを削除します
|
||||
* @summary
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteData(options?: any): AxiosPromise<object> {
|
||||
return localVarFp.deleteData(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteApi - object-oriented interface
|
||||
* @export
|
||||
* @class DeleteApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class DeleteApi extends BaseAPI {
|
||||
/**
|
||||
* すべてのデータを削除します
|
||||
* @summary
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof DeleteApi
|
||||
*/
|
||||
public deleteData(options?: AxiosRequestConfig) {
|
||||
return DeleteApiFp(this.configuration).deleteData(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
86
data_migration_tools/client/src/api/base.ts
Normal file
86
data_migration_tools/client/src/api/base.ts
Normal file
@ -0,0 +1,86 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* ODMSOpenAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from './configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
|
||||
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface RequestArgs
|
||||
*/
|
||||
export interface RequestArgs {
|
||||
url: string;
|
||||
options: AxiosRequestConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class BaseAPI
|
||||
*/
|
||||
export class BaseAPI {
|
||||
protected configuration: Configuration | undefined;
|
||||
|
||||
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = configuration.basePath ?? basePath;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @class RequiredError
|
||||
* @extends {Error}
|
||||
*/
|
||||
export class RequiredError extends Error {
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
this.name = "RequiredError"
|
||||
}
|
||||
}
|
||||
|
||||
interface ServerMap {
|
||||
[key: string]: {
|
||||
url: string,
|
||||
description: string,
|
||||
}[];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const operationServerMap: ServerMap = {
|
||||
}
|
||||
150
data_migration_tools/client/src/api/common.ts
Normal file
150
data_migration_tools/client/src/api/common.ts
Normal file
@ -0,0 +1,150 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* ODMSOpenAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from "./configuration";
|
||||
import type { RequestArgs } from "./base";
|
||||
import type { AxiosInstance, AxiosResponse } from 'axios';
|
||||
import { RequiredError } from "./base";
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const DUMMY_BASE_URL = 'https://example.com'
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws {RequiredError}
|
||||
* @export
|
||||
*/
|
||||
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
||||
if (paramValue === null || paramValue === undefined) {
|
||||
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
||||
if (configuration && configuration.apiKey) {
|
||||
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
||||
? await configuration.apiKey(keyParamName)
|
||||
: await configuration.apiKey;
|
||||
object[keyParamName] = localVarApiKeyValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
||||
if (configuration && (configuration.username || configuration.password)) {
|
||||
object["auth"] = { username: configuration.username, password: configuration.password };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
||||
if (configuration && configuration.accessToken) {
|
||||
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken(name, scopes)
|
||||
: await configuration.accessToken;
|
||||
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
||||
}
|
||||
}
|
||||
|
||||
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
||||
if (parameter == null) return;
|
||||
if (typeof parameter === "object") {
|
||||
if (Array.isArray(parameter)) {
|
||||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
||||
}
|
||||
else {
|
||||
Object.keys(parameter).forEach(currentKey =>
|
||||
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (urlSearchParams.has(key)) {
|
||||
urlSearchParams.append(key, parameter);
|
||||
}
|
||||
else {
|
||||
urlSearchParams.set(key, parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
||||
const searchParams = new URLSearchParams(url.search);
|
||||
setFlattenedQueryParams(searchParams, objects);
|
||||
url.search = searchParams.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
||||
const nonString = typeof value !== 'string';
|
||||
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
||||
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
||||
: nonString;
|
||||
return needsSerialization
|
||||
? JSON.stringify(value !== undefined ? value : {})
|
||||
: (value || "");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const toPathString = function (url: URL) {
|
||||
return url.pathname + url.search + url.hash
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
||||
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url};
|
||||
return axios.request<T, R>(axiosRequestArgs);
|
||||
};
|
||||
}
|
||||
110
data_migration_tools/client/src/api/configuration.ts
Normal file
110
data_migration_tools/client/src/api/configuration.ts
Normal file
@ -0,0 +1,110 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* ODMSOpenAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
basePath?: string;
|
||||
serverIndex?: number;
|
||||
baseOptions?: any;
|
||||
formDataCtor?: new () => any;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* parameter for apiKey security
|
||||
* @param name security name
|
||||
* @memberof Configuration
|
||||
*/
|
||||
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* parameter for basic security
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* parameter for oauth2 security
|
||||
* @param name security name
|
||||
* @param scopes oauth2 scope
|
||||
* @memberof Configuration
|
||||
*/
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
||||
/**
|
||||
* override base path
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* override server index
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
serverIndex?: number;
|
||||
/**
|
||||
* base options for axios calls
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof Configuration
|
||||
*/
|
||||
baseOptions?: any;
|
||||
/**
|
||||
* The FormData constructor that will be used to create multipart form data
|
||||
* requests. You can inject this here so that execution environments that
|
||||
* do not support the FormData class can still run the generated client.
|
||||
*
|
||||
* @type {new () => FormData}
|
||||
*/
|
||||
formDataCtor?: new () => any;
|
||||
|
||||
constructor(param: ConfigurationParameters = {}) {
|
||||
this.apiKey = param.apiKey;
|
||||
this.username = param.username;
|
||||
this.password = param.password;
|
||||
this.accessToken = param.accessToken;
|
||||
this.basePath = param.basePath;
|
||||
this.serverIndex = param.serverIndex;
|
||||
this.baseOptions = param.baseOptions;
|
||||
this.formDataCtor = param.formDataCtor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
}
|
||||
57
data_migration_tools/client/src/api/git_push.sh
Normal file
57
data_migration_tools/client/src/api/git_push.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
18
data_migration_tools/client/src/api/index.ts
Normal file
18
data_migration_tools/client/src/api/index.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* ODMSOpenAPI
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export * from "./api";
|
||||
export * from "./configuration";
|
||||
|
||||
20
data_migration_tools/client/src/app/store.ts
Normal file
20
data_migration_tools/client/src/app/store.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit";
|
||||
import auth from "features/auth/authSlice";
|
||||
import ui from "features/ui/uiSlice";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
auth,
|
||||
ui,
|
||||
},
|
||||
});
|
||||
|
||||
export type RootState = ReturnType<typeof store.getState>;
|
||||
export type AppThunk<ReturnType = void> = ThunkAction<
|
||||
ReturnType,
|
||||
RootState,
|
||||
unknown,
|
||||
Action<string>
|
||||
>;
|
||||
|
||||
export type AppDispatch = typeof store.dispatch;
|
||||
17
data_migration_tools/client/src/common/errors/code.ts
Normal file
17
data_migration_tools/client/src/common/errors/code.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
エラーコード作成方針
|
||||
E+6桁(数字)で構成する。
|
||||
- 1~2桁目の値は種類(業務エラー、システムエラー...)
|
||||
- 3~4桁目の値は原因箇所(トークン、DB、...)
|
||||
- 5~6桁目の値は任意の重複しない値
|
||||
ex)
|
||||
E00XXXX : システムエラー(通信エラーやDB接続失敗など)
|
||||
E01XXXX : 業務エラー
|
||||
EXX00XX : 内部エラー(内部プログラムのエラー)
|
||||
EXX01XX : トークンエラー(トークン認証関連)
|
||||
EXX02XX : DBエラー(DB関連)
|
||||
EXX03XX : ADB2Cエラー(DB関連)
|
||||
*/
|
||||
export const errorCodes = [
|
||||
"E009999", // 汎用エラー
|
||||
] as const;
|
||||
3
data_migration_tools/client/src/common/errors/index.ts
Normal file
3
data_migration_tools/client/src/common/errors/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from "./code";
|
||||
export * from "./types";
|
||||
export * from "./utils";
|
||||
9
data_migration_tools/client/src/common/errors/types.ts
Normal file
9
data_migration_tools/client/src/common/errors/types.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { errorCodes } from "./code";
|
||||
|
||||
export type ErrorObject = {
|
||||
message: string;
|
||||
code: ErrorCodeType;
|
||||
statusCode?: number;
|
||||
};
|
||||
|
||||
export type ErrorCodeType = (typeof errorCodes)[number];
|
||||
101
data_migration_tools/client/src/common/errors/utils.ts
Normal file
101
data_migration_tools/client/src/common/errors/utils.ts
Normal file
@ -0,0 +1,101 @@
|
||||
import { AxiosError } from "axios";
|
||||
import { isError } from "lodash";
|
||||
import { ErrorResponse } from "../../api";
|
||||
import { errorCodes } from "./code";
|
||||
import { ErrorCodeType, ErrorObject } from "./types";
|
||||
|
||||
export const createErrorObject = (error: unknown): ErrorObject => {
|
||||
// 最低限通常のエラーかを判定
|
||||
// Error以外のものがthrowされた場合
|
||||
// 基本的にないはずだがプログラム上あるので拾う
|
||||
if (!isError(error)) {
|
||||
return {
|
||||
message: "not error type.",
|
||||
code: "E009999",
|
||||
};
|
||||
}
|
||||
|
||||
// Axiosエラー 通信してのエラーであるかを判定
|
||||
if (!isAxiosError(error)) {
|
||||
return {
|
||||
message: "not axios error.",
|
||||
code: "E009999",
|
||||
};
|
||||
}
|
||||
|
||||
const errorResponse = error.response;
|
||||
if (!errorResponse) {
|
||||
return {
|
||||
message: error.message,
|
||||
code: "E009999",
|
||||
statusCode: errorResponse,
|
||||
};
|
||||
}
|
||||
|
||||
const { data } = errorResponse;
|
||||
|
||||
// 想定しているエラーレスポンスの型か判定
|
||||
if (!isErrorResponse(data)) {
|
||||
return {
|
||||
message: error.message,
|
||||
code: "E009999",
|
||||
statusCode: errorResponse.status,
|
||||
};
|
||||
}
|
||||
|
||||
const { message, code } = data;
|
||||
|
||||
// 想定しているエラーコードかを判定
|
||||
if (!isErrorCode(code)) {
|
||||
return {
|
||||
message,
|
||||
code: "E009999",
|
||||
statusCode: errorResponse.status,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
message,
|
||||
code,
|
||||
statusCode: errorResponse.status,
|
||||
};
|
||||
};
|
||||
|
||||
const isAxiosError = (e: unknown): e is AxiosError => {
|
||||
const error = e as AxiosError;
|
||||
return error?.isAxiosError ?? false;
|
||||
};
|
||||
|
||||
const isErrorResponse = (error: unknown): error is ErrorResponse => {
|
||||
const errorResponse = error as ErrorResponse;
|
||||
if (
|
||||
errorResponse === undefined ||
|
||||
errorResponse.message === undefined ||
|
||||
errorResponse.code === undefined
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const isErrorCode = (errorCode: string): errorCode is ErrorCodeType =>
|
||||
errorCodes.includes(errorCode as ErrorCodeType);
|
||||
|
||||
export const isErrorObject = (
|
||||
data: unknown
|
||||
): data is { error: ErrorObject } => {
|
||||
if (
|
||||
data &&
|
||||
typeof data === "object" &&
|
||||
"error" in data &&
|
||||
typeof (data as { error: ErrorObject }).error === "object" &&
|
||||
typeof (data as { error: ErrorObject }).error.message === "string" &&
|
||||
typeof (data as { error: ErrorObject }).error.code === "string" &&
|
||||
(typeof (data as { error: ErrorObject }).error.statusCode === "number" ||
|
||||
(data as { error: ErrorObject }).error.statusCode === undefined)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
6
data_migration_tools/client/src/common/getBasePath.ts
Normal file
6
data_migration_tools/client/src/common/getBasePath.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export const getBasePath = () => {
|
||||
if (import.meta.env.VITE_STAGE === "local") {
|
||||
return "http://localhost:8280";
|
||||
}
|
||||
return window.location.origin;
|
||||
};
|
||||
3
data_migration_tools/client/src/common/index.ts
Normal file
3
data_migration_tools/client/src/common/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export interface ErrorObject {
|
||||
message: string;
|
||||
}
|
||||
33
data_migration_tools/client/src/components/SnackBar.css
Normal file
33
data_migration_tools/client/src/components/SnackBar.css
Normal file
@ -0,0 +1,33 @@
|
||||
.snackbar {
|
||||
position: fixed;
|
||||
top: -100px; /* 上から現れるための初期位置 */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background-color: #323232;
|
||||
color: #ffffff;
|
||||
border-radius: 5px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
min-width: 300px;
|
||||
max-width: 80%;
|
||||
z-index: 1000;
|
||||
transition: top 0.5s ease-in-out; /* アニメーション効果の追加 */
|
||||
}
|
||||
|
||||
.snackbar.show {
|
||||
top: 20px; /* 最終的な表示位置 */
|
||||
}
|
||||
|
||||
.snackbar button {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.snackbar p {
|
||||
margin: 0;
|
||||
margin-right: 16px;
|
||||
}
|
||||
19
data_migration_tools/client/src/components/SnackBar.tsx
Normal file
19
data_migration_tools/client/src/components/SnackBar.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import React, { FC } from "react";
|
||||
import "./SnackBar.css";
|
||||
|
||||
interface SnackBarProps {
|
||||
message: string;
|
||||
show: boolean;
|
||||
closeSnackBar: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
||||
}
|
||||
|
||||
const SnackBar: FC<SnackBarProps> = ({ message, show, closeSnackBar }) => (
|
||||
<div className={`snackbar${show ? " show" : ""}`}>
|
||||
<p>{message}</p>
|
||||
<button type="button" onClick={closeSnackBar}>
|
||||
閉じる
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
export default SnackBar;
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
15
data_migration_tools/client/src/features/auth/authSlice.ts
Normal file
15
data_migration_tools/client/src/features/auth/authSlice.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import type { AuthState } from "./state";
|
||||
import { initialConfig } from "./utils";
|
||||
|
||||
const initialState: AuthState = {
|
||||
configuration: initialConfig(),
|
||||
};
|
||||
|
||||
export const authSlice = createSlice({
|
||||
name: "auth",
|
||||
initialState,
|
||||
reducers: {},
|
||||
});
|
||||
|
||||
export default authSlice.reducer;
|
||||
3
data_migration_tools/client/src/features/auth/index.ts
Normal file
3
data_migration_tools/client/src/features/auth/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from "./authSlice";
|
||||
export * from "./state";
|
||||
export * from "./utils";
|
||||
5
data_migration_tools/client/src/features/auth/state.ts
Normal file
5
data_migration_tools/client/src/features/auth/state.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { ConfigurationParameters } from "../../api";
|
||||
|
||||
export interface AuthState {
|
||||
configuration: ConfigurationParameters;
|
||||
}
|
||||
13
data_migration_tools/client/src/features/auth/utils.ts
Normal file
13
data_migration_tools/client/src/features/auth/utils.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { ConfigurationParameters } from "../../api";
|
||||
|
||||
// 初期状態のAPI Config
|
||||
export const initialConfig = (): ConfigurationParameters => {
|
||||
const config: ConfigurationParameters = {};
|
||||
if (import.meta.env.VITE_STAGE === "local") {
|
||||
config.basePath = "http://localhost:8280";
|
||||
} else {
|
||||
config.basePath = `${window.location.origin}/dictation/api`;
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
@ -0,0 +1,25 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { DeleteState } from "./state";
|
||||
import { deleteDataAsync } from "./operations";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
||||
const initialState: DeleteState = {};
|
||||
|
||||
export const deleteSlice = createSlice({
|
||||
name: "detete",
|
||||
initialState,
|
||||
reducers: {},
|
||||
extraReducers: (builder) => {
|
||||
builder.addCase(deleteDataAsync.pending, () => {
|
||||
/* Empty Object */
|
||||
});
|
||||
builder.addCase(deleteDataAsync.fulfilled, () => {
|
||||
/* Empty Object */
|
||||
});
|
||||
builder.addCase(deleteDataAsync.rejected, () => {
|
||||
/* Empty Object */
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export default deleteSlice.reducer;
|
||||
3
data_migration_tools/client/src/features/delete/index.ts
Normal file
3
data_migration_tools/client/src/features/delete/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from "./state";
|
||||
export * from "./deleteSlice";
|
||||
export * from "./operations";
|
||||
@ -0,0 +1,47 @@
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { openSnackbar } from "../ui/uiSlice";
|
||||
import type { RootState } from "../../app/store";
|
||||
import { ErrorObject, createErrorObject } from "../../common/errors";
|
||||
import { DeleteApi } from "../../api/api";
|
||||
import { Configuration } from "../../api/configuration";
|
||||
|
||||
export const deleteDataAsync = createAsyncThunk<
|
||||
{
|
||||
/* Empty Object */
|
||||
},
|
||||
void,
|
||||
{
|
||||
// rejectした時の返却値の型
|
||||
rejectValue: {
|
||||
error: ErrorObject;
|
||||
};
|
||||
}
|
||||
>("delete/deleteDataAsync", async (args, thunkApi) => {
|
||||
// apiのConfigurationを取得する
|
||||
const { getState } = thunkApi;
|
||||
const state = getState() as RootState;
|
||||
const { configuration } = state.auth;
|
||||
const config = new Configuration(configuration);
|
||||
const deleteApi = new DeleteApi(config);
|
||||
|
||||
try {
|
||||
await deleteApi.deleteData();
|
||||
thunkApi.dispatch(
|
||||
openSnackbar({
|
||||
level: "info",
|
||||
message: "削除しました。",
|
||||
})
|
||||
);
|
||||
return {};
|
||||
} catch (e) {
|
||||
const error = createErrorObject(e);
|
||||
thunkApi.dispatch(
|
||||
openSnackbar({
|
||||
level: "error",
|
||||
message: "削除に失敗しました。",
|
||||
})
|
||||
);
|
||||
|
||||
return thunkApi.rejectWithValue({ error });
|
||||
}
|
||||
});
|
||||
2
data_migration_tools/client/src/features/delete/state.ts
Normal file
2
data_migration_tools/client/src/features/delete/state.ts
Normal file
@ -0,0 +1,2 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DeleteState {}
|
||||
2
data_migration_tools/client/src/features/ui/constants.ts
Normal file
2
data_migration_tools/client/src/features/ui/constants.ts
Normal file
@ -0,0 +1,2 @@
|
||||
// 標準のスナックバー表示時間(ミリ秒)
|
||||
export const DEFAULT_SNACKBAR_DURATION = 3000;
|
||||
5
data_migration_tools/client/src/features/ui/index.ts
Normal file
5
data_migration_tools/client/src/features/ui/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export * from "./constants";
|
||||
export * from "./selectors";
|
||||
export * from "./state";
|
||||
export * from "./uiSlice";
|
||||
export * from "./types";
|
||||
15
data_migration_tools/client/src/features/ui/selectors.ts
Normal file
15
data_migration_tools/client/src/features/ui/selectors.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import type { RootState } from "app/store";
|
||||
import { SnackbarLevel } from "./types";
|
||||
|
||||
export const selectSnackber = (
|
||||
state: RootState
|
||||
): {
|
||||
isOpen: boolean;
|
||||
level: SnackbarLevel;
|
||||
message: string;
|
||||
duration?: number;
|
||||
} => {
|
||||
const { isOpen, level, message, duration } = state.ui;
|
||||
|
||||
return { isOpen, level, message, duration };
|
||||
};
|
||||
8
data_migration_tools/client/src/features/ui/state.ts
Normal file
8
data_migration_tools/client/src/features/ui/state.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { SnackbarLevel } from "./types";
|
||||
|
||||
export interface UIState {
|
||||
isOpen: boolean;
|
||||
level: SnackbarLevel;
|
||||
message: string;
|
||||
duration?: number;
|
||||
}
|
||||
1
data_migration_tools/client/src/features/ui/types.ts
Normal file
1
data_migration_tools/client/src/features/ui/types.ts
Normal file
@ -0,0 +1 @@
|
||||
export type SnackbarLevel = "info" | "error";
|
||||
38
data_migration_tools/client/src/features/ui/uiSlice.ts
Normal file
38
data_migration_tools/client/src/features/ui/uiSlice.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
import { SnackbarLevel } from "./types";
|
||||
import { UIState } from "./state";
|
||||
import { DEFAULT_SNACKBAR_DURATION } from "./constants";
|
||||
|
||||
const initialState: UIState = {
|
||||
isOpen: false,
|
||||
level: "error",
|
||||
message: "",
|
||||
};
|
||||
|
||||
export const uiSlice = createSlice({
|
||||
name: "ui",
|
||||
initialState,
|
||||
reducers: {
|
||||
openSnackbar: (
|
||||
state,
|
||||
action: PayloadAction<{
|
||||
level: SnackbarLevel;
|
||||
message: string;
|
||||
duration?: number;
|
||||
}>
|
||||
) => {
|
||||
const { level, message, duration } = action.payload;
|
||||
state.isOpen = true;
|
||||
state.level = level;
|
||||
state.message = message;
|
||||
state.duration =
|
||||
level === "error" ? undefined : duration ?? DEFAULT_SNACKBAR_DURATION;
|
||||
},
|
||||
closeSnackbar: (state) => {
|
||||
state.isOpen = false;
|
||||
},
|
||||
},
|
||||
});
|
||||
export const { openSnackbar, closeSnackbar } = uiSlice.actions;
|
||||
|
||||
export default uiSlice.reducer;
|
||||
23
data_migration_tools/client/src/main.tsx
Normal file
23
data_migration_tools/client/src/main.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import { store } from "app/store";
|
||||
import React from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { Provider } from "react-redux";
|
||||
import App from "./App";
|
||||
import * as serviceWorker from "./serviceWorker";
|
||||
|
||||
const container = document.getElementById("root");
|
||||
if (container) {
|
||||
const root = createRoot(container);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<Provider store={store}>
|
||||
<App />
|
||||
</Provider>
|
||||
</React.StrictMode>
|
||||
);
|
||||
}
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
serviceWorker.unregister();
|
||||
32
data_migration_tools/client/src/pages/deletePage/index.tsx
Normal file
32
data_migration_tools/client/src/pages/deletePage/index.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { AppDispatch } from "app/store";
|
||||
import { deleteDataAsync } from "features/delete";
|
||||
import React, { useCallback } from "react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const DeletePage = (): JSX.Element => {
|
||||
const dispatch: AppDispatch = useDispatch();
|
||||
|
||||
const onDelete = useCallback(() => {
|
||||
if (
|
||||
/* eslint-disable-next-line no-alert */
|
||||
!window.confirm("本当に削除しますか?")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
dispatch(deleteDataAsync());
|
||||
}, [dispatch]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p>データ削除ツール</p>
|
||||
<button type="button" onClick={onDelete}>
|
||||
削除
|
||||
</button>
|
||||
<br />
|
||||
<Link to="/">return to TopPage</Link>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DeletePage;
|
||||
15
data_migration_tools/client/src/pages/topPage/index.tsx
Normal file
15
data_migration_tools/client/src/pages/topPage/index.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const TopPage = (): JSX.Element => {
|
||||
console.log("DeletePage");
|
||||
return (
|
||||
<div>
|
||||
<Link to="/delete">データ削除ツール</Link>
|
||||
<br />
|
||||
<Link to="/">return to TopPage</Link>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TopPage;
|
||||
148
data_migration_tools/client/src/serviceWorker.ts
Normal file
148
data_migration_tools/client/src/serviceWorker.ts
Normal file
@ -0,0 +1,148 @@
|
||||
/* eslint-disable */
|
||||
|
||||
// This optional code is used to register a service worker.
|
||||
// register() is not called by default.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
// it offline capabilities. However, it also means that developers (and users)
|
||||
// will only see deployed updates on subsequent visits to a page, after all the
|
||||
// existing tabs open on the page have been closed, since previously cached
|
||||
// resources are updated in the background.
|
||||
|
||||
// To learn more about the benefits of this model and instructions on how to
|
||||
// opt-in, read https://bit.ly/CRA-PWA
|
||||
|
||||
const isLocalhost = Boolean(
|
||||
window.location.hostname === "localhost" ||
|
||||
// [::1] is the IPv6 localhost address.
|
||||
window.location.hostname === "[::1]" ||
|
||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
|
||||
type Config = {
|
||||
onSuccess?: (registration: ServiceWorkerRegistration) => void;
|
||||
onUpdate?: (registration: ServiceWorkerRegistration) => void;
|
||||
};
|
||||
|
||||
export function register(config?: Config) {
|
||||
if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) {
|
||||
// The URL constructor is available in all browsers that support SW.
|
||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
||||
if (publicUrl.origin !== window.location.origin) {
|
||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||
// from what our page is served on. This might happen if a CDN is used to
|
||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||
checkValidServiceWorker(swUrl, config);
|
||||
|
||||
// Add some additional logging to localhost, pointing developers to the
|
||||
// service worker/PWA documentation.
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
"This web app is being served cache-first by a service " +
|
||||
"worker. To learn more, visit https://bit.ly/CRA-PWA"
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// Is not localhost. Just register service worker
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function registerValidSW(swUrl: string, config?: Config) {
|
||||
navigator.serviceWorker
|
||||
.register(swUrl)
|
||||
.then((registration) => {
|
||||
registration.onupdatefound = () => {
|
||||
const installingWorker = registration.installing;
|
||||
if (installingWorker == null) {
|
||||
return;
|
||||
}
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state === "installed") {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
// At this point, the updated precached content has been fetched,
|
||||
// but the previous service worker will still serve the older
|
||||
// content until all client tabs are closed.
|
||||
console.log(
|
||||
"New content is available and will be used when all " +
|
||||
"tabs for this page are closed. See https://bit.ly/CRA-PWA."
|
||||
);
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onUpdate) {
|
||||
config.onUpdate(registration);
|
||||
}
|
||||
} else {
|
||||
// At this point, everything has been precached.
|
||||
// It's the perfect time to display a
|
||||
// "Content is cached for offline use." message.
|
||||
console.log("Content is cached for offline use.");
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onSuccess) {
|
||||
config.onSuccess(registration);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error during service worker registration:", error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl: string, config?: Config) {
|
||||
// Check if the service worker can be found. If it can't reload the page.
|
||||
fetch(swUrl, {
|
||||
headers: { "Service-Worker": "script" },
|
||||
})
|
||||
.then((response) => {
|
||||
// Ensure service worker exists, and that we really are getting a JS file.
|
||||
const contentType = response.headers.get("content-type");
|
||||
if (
|
||||
response.status === 404 ||
|
||||
(contentType != null && contentType.indexOf("javascript") === -1)
|
||||
) {
|
||||
// No service worker found. Probably a different app. Reload the page.
|
||||
navigator.serviceWorker.ready.then((registration) => {
|
||||
registration.unregister().then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// Service worker found. Proceed as normal.
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
"No internet connection found. App is running in offline mode."
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function unregister() {
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker.ready
|
||||
.then((registration) => {
|
||||
registration.unregister();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
37
data_migration_tools/client/src/types/index.d.ts
vendored
Normal file
37
data_migration_tools/client/src/types/index.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* bring from react-scripts/lib/react-app.d.ts
|
||||
*/
|
||||
declare namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
// local環境はdevelopment、staging環境は production になる
|
||||
readonly NODE_ENV: "development" | "develop" | "production" | "test";
|
||||
readonly PUBLIC_URL: string;
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
}
|
||||
}
|
||||
|
||||
declare module "*.gif" {
|
||||
const src: string;
|
||||
export default src;
|
||||
}
|
||||
|
||||
declare module "*.jpg" {
|
||||
const src: string;
|
||||
export default src;
|
||||
}
|
||||
|
||||
declare module "*.jpeg" {
|
||||
const src: string;
|
||||
export default src;
|
||||
}
|
||||
|
||||
declare module "*.png" {
|
||||
const src: string;
|
||||
export default src;
|
||||
}
|
||||
|
||||
declare module "*.svg" {
|
||||
const src: string;
|
||||
export default src;
|
||||
}
|
||||
11
data_migration_tools/client/src/vite-env.d.ts
vendored
Normal file
11
data_migration_tools/client/src/vite-env.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
// 環境変数のコード補完
|
||||
/// <reference types="vite/client" />
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_STAGE: string;
|
||||
readonly VITE_ODMS_CLOUD_BASE_PATH: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
22
data_migration_tools/client/tsconfig.json
Normal file
22
data_migration_tools/client/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2019",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": "src",
|
||||
"plugins": [{ "name": "typescript-styled-plugin" }]
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
18
data_migration_tools/client/vite.config.ts
Normal file
18
data_migration_tools/client/vite.config.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import env from "vite-plugin-env-compatible";
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
host: true,
|
||||
port: 3100,
|
||||
open: true,
|
||||
},
|
||||
build: {
|
||||
outDir: "build",
|
||||
sourcemap: true,
|
||||
minify: false,
|
||||
},
|
||||
plugins: [env(), tsconfigPaths(), react()],
|
||||
});
|
||||
63
data_migration_tools/package-lock.json
generated
Normal file
63
data_migration_tools/package-lock.json
generated
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "data_migration_tools",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"author": "",
|
||||
"description": "",
|
||||
"license": "UNLICENSED",
|
||||
"private": true,
|
||||
"packages": {},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/multer": "^1.4.7",
|
||||
"@types/node": "^20.2.3",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"jest": "28.0.3",
|
||||
"license-checker": "^25.0.1",
|
||||
"prettier": "^2.3.2",
|
||||
"source-map-support": "^0.5.20",
|
||||
"supertest": "^6.1.3",
|
||||
"swagger-ui-express": "^4.5.0",
|
||||
"ts-jest": "28.0.1",
|
||||
"ts-loader": "^9.2.3",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsconfig-paths": "4.0.0",
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverageFrom": [
|
||||
"**/*.(t|j)s"
|
||||
],
|
||||
"coverageDirectory": "../coverage",
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"json",
|
||||
"ts"
|
||||
],
|
||||
"rootDir": "src",
|
||||
"testEnvironment": "node",
|
||||
"testRegex": ".*\\.spec\\.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "nest build && cp -r build dist",
|
||||
"build:exe": "nest build && cp -r build dist && sh ./buildTool.sh",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\"",
|
||||
"lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"prebuild": "rimraf dist",
|
||||
"start": "nest start",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:dev": "nest start --watch",
|
||||
"start:prod": "node dist/main",
|
||||
"test": "jest",
|
||||
"test:cov": "jest --coverage",
|
||||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||
"test:watch": "jest --watch"
|
||||
}
|
||||
}
|
||||
31
data_migration_tools/server/.devcontainer/Dockerfile
Normal file
31
data_migration_tools/server/.devcontainer/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
FROM node:18.13.0-buster
|
||||
|
||||
RUN /bin/cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime && \
|
||||
echo "Asia/Tokyo" > /etc/timezone
|
||||
|
||||
# Options for setup script
|
||||
ARG INSTALL_ZSH="true"
|
||||
ARG UPGRADE_PACKAGES="false"
|
||||
ARG USERNAME=vscode
|
||||
# 1000 はnodeで使われているためずらす
|
||||
ARG USER_UID=1001
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
|
||||
COPY library-scripts/common-debian.sh /tmp/library-scripts/
|
||||
RUN bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" \
|
||||
&& apt-get install default-jre -y \
|
||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
|
||||
|
||||
# Install NestJS
|
||||
RUN npm i -g @nestjs/cli
|
||||
|
||||
# 以下 ユーザー権限で実施
|
||||
USER $USERNAME
|
||||
# copy init-script
|
||||
COPY --chown=$USERNAME:$USERNAME init.sh /home/${USERNAME}/
|
||||
RUN chmod +x /home/${USERNAME}/init.sh
|
||||
|
||||
# 初期化を行う
|
||||
# node imageのデフォルトENTRYPOINTが邪魔するため上書き
|
||||
ENTRYPOINT /home/vscode/init.sh
|
||||
56
data_migration_tools/server/.devcontainer/devcontainer.json
Normal file
56
data_migration_tools/server/.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,56 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/javascript-node
|
||||
{
|
||||
"name": "data_migration_tools server",
|
||||
"dockerComposeFile": [
|
||||
"./docker-compose.yml"
|
||||
],
|
||||
"service": "server",
|
||||
// コンテナを自動停止させない
|
||||
"shutdownAction": "none",
|
||||
"workspaceFolder": "/app/data_migration_tools/server",
|
||||
"runArgs": [
|
||||
"--cap-add=SYS_PTRACE",
|
||||
"--security-opt",
|
||||
"seccomp=unconfined"
|
||||
],
|
||||
// Set *default* container specific settings.json values on container create.
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
},
|
||||
"eslint.format.enable": false,
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
// formatter
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnType": true,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": false,
|
||||
"editor.renderLineHighlight": "all"
|
||||
},
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"salbert.comment-ts",
|
||||
"gruntfuggly.todo-tree",
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-vsliveshare.vsliveshare",
|
||||
"albymor.increment-selection",
|
||||
"eamodio.gitlens",
|
||||
"wmaurer.change-case"
|
||||
],
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "yarn install",
|
||||
"postCreateCommand": "sudo chown -R vscode:vscode /app/data_migration_tools/server",
|
||||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "vscode"
|
||||
}
|
||||
24
data_migration_tools/server/.devcontainer/docker-compose.yml
Normal file
24
data_migration_tools/server/.devcontainer/docker-compose.yml
Normal file
@ -0,0 +1,24 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
server:
|
||||
env_file: ../.env
|
||||
build: .
|
||||
working_dir: /app/data_migration_tools/server
|
||||
ports:
|
||||
- "127.0.0.1:8280:8280"
|
||||
volumes:
|
||||
- ../../../:/app
|
||||
- data_migration_tools_server_node_modules:/app/data_migration_tools/server/node_modules
|
||||
expose:
|
||||
- "8280"
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
networks:
|
||||
- external
|
||||
networks:
|
||||
external:
|
||||
name: omds_network
|
||||
external: true
|
||||
volumes:
|
||||
data_migration_tools_server_node_modules:
|
||||
20
data_migration_tools/server/.devcontainer/init.sh
Normal file
20
data_migration_tools/server/.devcontainer/init.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Init Script for server Container
|
||||
#
|
||||
|
||||
echo [init.sh] server initialize.
|
||||
|
||||
# /app の権限がデフォルトでは node ユーザーになっているため、
|
||||
# 権限確認し、vscode ユーザでない場合付け替える
|
||||
ls -ld /app | grep vscode
|
||||
if [ $? -ne 0 ]; then
|
||||
echo [init.sh] change /app owner to vscode.
|
||||
sudo chown -R vscode:vscode /app
|
||||
fi
|
||||
|
||||
cd /app/server
|
||||
|
||||
echo [init.sh] initialize completed!
|
||||
|
||||
sleep infinity
|
||||
@ -0,0 +1,190 @@
|
||||
#!/usr/bin/env bash
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag]
|
||||
|
||||
INSTALL_ZSH=${1:-"true"}
|
||||
USERNAME=${2:-"vscode"}
|
||||
USER_UID=${3:-1000}
|
||||
USER_GID=${4:-1000}
|
||||
UPGRADE_PACKAGES=${5:-"true"}
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo -e 'Script must be run a root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Treat a user name of "none" as root
|
||||
if [ "${USERNAME}" = "none" ] || [ "${USERNAME}" = "root" ]; then
|
||||
USERNAME=root
|
||||
USER_UID=0
|
||||
USER_GID=0
|
||||
fi
|
||||
|
||||
# Load markers to see which steps have already run
|
||||
MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
|
||||
if [ -f "${MARKER_FILE}" ]; then
|
||||
echo "Marker file found:"
|
||||
cat "${MARKER_FILE}"
|
||||
source "${MARKER_FILE}"
|
||||
fi
|
||||
|
||||
# Ensure apt is in non-interactive to avoid prompts
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Function to call apt-get if needed
|
||||
apt-get-update-if-needed()
|
||||
{
|
||||
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
|
||||
echo "Running apt-get update..."
|
||||
apt-get update
|
||||
else
|
||||
echo "Skipping apt-get update."
|
||||
fi
|
||||
}
|
||||
|
||||
# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies
|
||||
if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
|
||||
apt-get-update-if-needed
|
||||
|
||||
PACKAGE_LIST="apt-utils \
|
||||
git \
|
||||
openssh-client \
|
||||
less \
|
||||
iproute2 \
|
||||
procps \
|
||||
curl \
|
||||
wget \
|
||||
unzip \
|
||||
zip \
|
||||
nano \
|
||||
jq \
|
||||
lsb-release \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
dialog \
|
||||
gnupg2 \
|
||||
libc6 \
|
||||
libgcc1 \
|
||||
libgssapi-krb5-2 \
|
||||
libicu[0-9][0-9] \
|
||||
liblttng-ust0 \
|
||||
libstdc++6 \
|
||||
zlib1g \
|
||||
locales \
|
||||
sudo"
|
||||
|
||||
# Install libssl1.1 if available
|
||||
if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then
|
||||
PACKAGE_LIST="${PACKAGE_LIST} libssl1.1"
|
||||
fi
|
||||
|
||||
# Install appropriate version of libssl1.0.x if available
|
||||
LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '')
|
||||
if [ "$(echo "$LIBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then
|
||||
if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then
|
||||
# Debian 9
|
||||
PACKAGE_LIST="${PACKAGE_LIST} libssl1.0.2"
|
||||
elif [[ ! -z $(apt-cache --names-only search ^libssl1.0.0$) ]]; then
|
||||
# Ubuntu 18.04, 16.04, earlier
|
||||
PACKAGE_LIST="${PACKAGE_LIST} libssl1.0.0"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Packages to verify are installed: ${PACKAGE_LIST}"
|
||||
apt-get -y install --no-install-recommends ${PACKAGE_LIST} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 )
|
||||
|
||||
PACKAGES_ALREADY_INSTALLED="true"
|
||||
fi
|
||||
|
||||
# Get to latest versions of all packages
|
||||
if [ "${UPGRADE_PACKAGES}" = "true" ]; then
|
||||
apt-get-update-if-needed
|
||||
apt-get -y upgrade --no-install-recommends
|
||||
apt-get autoremove -y
|
||||
fi
|
||||
|
||||
# Ensure at least the en_US.UTF-8 UTF-8 locale is available.
|
||||
# Common need for both applications and things like the agnoster ZSH theme.
|
||||
if [ "${LOCALE_ALREADY_SET}" != "true" ]; then
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
locale-gen
|
||||
LOCALE_ALREADY_SET="true"
|
||||
fi
|
||||
|
||||
# Create or update a non-root user to match UID/GID - see https://aka.ms/vscode-remote/containers/non-root-user.
|
||||
if id -u $USERNAME > /dev/null 2>&1; then
|
||||
# User exists, update if needed
|
||||
if [ "$USER_GID" != "$(id -G $USERNAME)" ]; then
|
||||
groupmod --gid $USER_GID $USERNAME
|
||||
usermod --gid $USER_GID $USERNAME
|
||||
fi
|
||||
if [ "$USER_UID" != "$(id -u $USERNAME)" ]; then
|
||||
usermod --uid $USER_UID $USERNAME
|
||||
fi
|
||||
else
|
||||
# Create user
|
||||
groupadd --gid $USER_GID $USERNAME
|
||||
useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME
|
||||
fi
|
||||
|
||||
# Add add sudo support for non-root user
|
||||
if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" ]; then
|
||||
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
|
||||
chmod 0440 /etc/sudoers.d/$USERNAME
|
||||
EXISTING_NON_ROOT_USER="${USERNAME}"
|
||||
fi
|
||||
|
||||
# .bashrc/.zshrc snippet
|
||||
RC_SNIPPET="$(cat << EOF
|
||||
export USER=\$(whoami)
|
||||
|
||||
export PATH=\$PATH:\$HOME/.local/bin
|
||||
|
||||
if [[ \$(which code-insiders 2>&1) && ! \$(which code 2>&1) ]]; then
|
||||
alias code=code-insiders
|
||||
fi
|
||||
EOF
|
||||
)"
|
||||
|
||||
# Ensure ~/.local/bin is in the PATH for root and non-root users for bash. (zsh is later)
|
||||
if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then
|
||||
echo "${RC_SNIPPET}" | tee -a /root/.bashrc >> /etc/skel/.bashrc
|
||||
if [ "${USERNAME}" != "root" ]; then
|
||||
echo "${RC_SNIPPET}" >> /home/$USERNAME/.bashrc
|
||||
chown $USER_UID:$USER_GID /home/$USERNAME/.bashrc
|
||||
fi
|
||||
RC_SNIPPET_ALREADY_ADDED="true"
|
||||
fi
|
||||
|
||||
# Optionally install and configure zsh
|
||||
if [ "${INSTALL_ZSH}" = "true" ] && [ ! -d "/root/.oh-my-zsh" ] && [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
|
||||
apt-get-update-if-needed
|
||||
apt-get install -y zsh
|
||||
curl -fsSLo- https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh | bash 2>&1
|
||||
echo -e "${RC_SNIPPET}\nDEFAULT_USER=\$USER\nprompt_context(){}" >> /root/.zshrc
|
||||
cp -fR /root/.oh-my-zsh /etc/skel
|
||||
cp -f /root/.zshrc /etc/skel
|
||||
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/\$(whoami)\/.oh-my-zsh/g" /etc/skel/.zshrc
|
||||
if [ "${USERNAME}" != "root" ]; then
|
||||
cp -fR /etc/skel/.oh-my-zsh /etc/skel/.zshrc /home/$USERNAME
|
||||
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc
|
||||
fi
|
||||
ZSH_ALREADY_INSTALLED="true"
|
||||
fi
|
||||
|
||||
# Write marker file
|
||||
mkdir -p "$(dirname "${MARKER_FILE}")"
|
||||
echo -e "\
|
||||
PACKAGES_ALREADY_INSTALLED=${PACKAGES_ALREADY_INSTALLED}\n\
|
||||
LOCALE_ALREADY_SET=${LOCALE_ALREADY_SET}\n\
|
||||
EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}\n\
|
||||
RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
|
||||
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"
|
||||
|
||||
echo "Done!"
|
||||
5
data_migration_tools/server/.env
Normal file
5
data_migration_tools/server/.env
Normal file
@ -0,0 +1,5 @@
|
||||
DB_HOST=omds-mysql
|
||||
DB_PORT=3306
|
||||
DB_NAME=omds
|
||||
DB_USERNAME=omdsdbuser
|
||||
DB_PASSWORD=omdsdbpass
|
||||
36
data_migration_tools/server/.env.local.example
Normal file
36
data_migration_tools/server/.env.local.example
Normal file
@ -0,0 +1,36 @@
|
||||
STAGE=local
|
||||
NO_COLOR=TRUE
|
||||
CORS=TRUE
|
||||
PORT=8280
|
||||
# 開発環境ではADB2Cが別テナントになる都合上、環境変数を分けている
|
||||
TENANT_NAME=adb2codmsdev
|
||||
SIGNIN_FLOW_NAME=b2c_1_signin_dev
|
||||
ADB2C_TENANT_ID=xxxxxxxx
|
||||
ADB2C_CLIENT_ID=xxxxxxxx
|
||||
ADB2C_CLIENT_SECRET=xxxxxxxx
|
||||
ADB2C_ORIGIN=https://zzzzzzzzzz
|
||||
JWT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA5IZZNgDew9eGmuFTezwdHYLSaJvUPPIKYoiOeVLD1paWNI51\n7Vkaoh0ngprcKOdv6T1N07V4igK7mOim2zY3yCTR6wcWR3PfFJrl9vh5SOo79koZ\noJb27YiM4jtxfx2dezzp0T2GoNR5rRolPUbWFJXnDe0DVXYXpJLb4LAlF2XAyYX0\nSYKUVUsJnzm5k4xbXtnwPwVbpm0EdswBE6qSfiL9zWk9dvHoKzSnfSDzDFoFcEoV\nchawzYXf/MM1YR4wo5XyzECc6Q5Ah4z522//mBNNaDHv83Yuw3mGShT73iJ0JQdk\nTturshv2Ecma38r6ftrIwNYXw4VVatJM8+GOOQIDAQABAoIBADrwp7u097+dK/tw\nWD61n3DIGAqg/lmFt8X4IH8MKLSE/FKr16CS1bqwOEuIM3ZdUtDeXd9Xs7IsyEPE\n5ZwuXK7DSF0M4+Mj8Ip49Q0Aww9aUoLQU9HGfgN/r4599GTrt31clZXA/6Mlighq\ncOZgCcEfdItz8OMu5SQuOIW4CKkCuaWnPOP26UqZocaXNZfpZH0iFLATMMH/TT8x\nay9ToHTQYE17ijdQ/EOLSwoeDV1CU1CIE3P4YfLJjvpKptly5dTevriHEzBi70Jx\n/KEPUn9Jj2gZafrUxRVhmMbm1zkeYxL3gsqRuTzRjEeeILuZhSJyCkQZyUNARxsg\nQY4DZfECgYEA+YLKUtmYTx60FS6DJ4s31TAsXY8kwhq/lB9E3GBZKDd0DPayXEeK\n4UWRQDTT6MI6fedW69FOZJ5sFLp8HQpcssb4Weq9PCpDhNTx8MCbdH3Um5QR3vfW\naKq/1XM8MDUnx5XcNYd87Aw3azvJAvOPr69as8IPnj6sKaRR9uQjbYUCgYEA6nfV\n5j0qmn0EJXZJblk4mvvjLLoWSs17j9YlrZJlJxXMDFRYtgnelv73xMxOMvcGoxn5\nifs7dpaM2x5EmA6jVU5sYaB/beZGEPWqPYGyjIwXPvUGAAv8Gbnvpp+xlSco/Dum\nIq0w+43ry5/xWh6CjfrvKV0J2bDOiJwPEdu/8iUCgYEAnBBSvL+dpN9vhFAzeOh7\nY71eAqcmNsLEUcG9MJqTKbSFwhYMOewF0iHRWHeylEPokhfBJn8kqYrtz4lVWFTC\n5o/Nh3BsLNXCpbMMIapXkeWiti1HgE9ErPMgSkJpwz18RDpYIqM8X+jEQS6D7HSr\nyxfDg+w+GJza0rEVE3hfMIECgYBw+KZ2VfhmEWBjEHhXE+QjQMR3s320MwebCUqE\nNCpKx8TWF/naVC0MwfLtvqbbBY0MHyLN6d//xpA9r3rLbRojqzKrY2KiuDYAS+3n\nzssRzxoQOozWju+8EYu30/ADdqfXyIHG6X3VZs87AGiQzGyJLmP3oR1y5y7MQa09\nJI16hQKBgHK5uwJhGa281Oo5/FwQ3uYLymbNwSGrsOJXiEu2XwJEXwVi2ELOKh4/\n03pBk3Kva3fIwEK+vCzDNnxShIQqBE76/2I1K1whOfoUehhYvKHGaXl2j70Zz9Ks\nrkGW1cx7p+yDqATDrwHBHTHFh5bUTTn8dN40n0e0W/llurpbBkJM\n-----END RSA PRIVATE KEY-----\n"
|
||||
JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5IZZNgDew9eGmuFTezwd\nHYLSaJvUPPIKYoiOeVLD1paWNI517Vkaoh0ngprcKOdv6T1N07V4igK7mOim2zY3\nyCTR6wcWR3PfFJrl9vh5SOo79koZoJb27YiM4jtxfx2dezzp0T2GoNR5rRolPUbW\nFJXnDe0DVXYXpJLb4LAlF2XAyYX0SYKUVUsJnzm5k4xbXtnwPwVbpm0EdswBE6qS\nfiL9zWk9dvHoKzSnfSDzDFoFcEoVchawzYXf/MM1YR4wo5XyzECc6Q5Ah4z522//\nmBNNaDHv83Yuw3mGShT73iJ0JQdkTturshv2Ecma38r6ftrIwNYXw4VVatJM8+GO\nOQIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
SENDGRID_API_KEY=xxxxxxxxxxxxxxxx
|
||||
MAIL_FROM=xxxxx@xxxxx.xxxx
|
||||
NOTIFICATION_HUB_NAME=ntf-odms-dev
|
||||
NOTIFICATION_HUB_CONNECT_STRING=XXXXXXXXXXXXXXXXXX
|
||||
APP_DOMAIN=http://localhost:8081/
|
||||
STORAGE_TOKEN_EXPIRE_TIME=2
|
||||
STORAGE_ACCOUNT_NAME_US=saodmsusdev
|
||||
STORAGE_ACCOUNT_NAME_AU=saodmsaudev
|
||||
STORAGE_ACCOUNT_NAME_EU=saodmseudev
|
||||
STORAGE_ACCOUNT_KEY_US=XXXXXXXXXXXXXXXXXXXXXXX
|
||||
STORAGE_ACCOUNT_KEY_AU=XXXXXXXXXXXXXXXXXXXXXXX
|
||||
STORAGE_ACCOUNT_KEY_EU=XXXXXXXXXXXXXXXXXXXXXXX
|
||||
STORAGE_ACCOUNT_ENDPOINT_US=https://AAAAAAAAAAAAA
|
||||
STORAGE_ACCOUNT_ENDPOINT_AU=https://AAAAAAAAAAAAA
|
||||
STORAGE_ACCOUNT_ENDPOINT_EU=https://AAAAAAAAAAAAA
|
||||
ACCESS_TOKEN_LIFETIME_WEB=7200
|
||||
REFRESH_TOKEN_LIFETIME_WEB=86400
|
||||
REFRESH_TOKEN_LIFETIME_DEFAULT=2592000
|
||||
EMAIL_CONFIRM_LIFETIME=86400
|
||||
REDIS_HOST=redis-cache
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=omdsredispass
|
||||
ADB2C_CACHE_TTL=86400
|
||||
25
data_migration_tools/server/.eslintrc.js
Normal file
25
data_migration_tools/server/.eslintrc.js
Normal file
@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
tsconfigRootDir : __dirname,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['@typescript-eslint/eslint-plugin'],
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
jest: true,
|
||||
},
|
||||
ignorePatterns: ['.eslintrc.js'],
|
||||
rules: {
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
};
|
||||
8
data_migration_tools/server/.gitignore
vendored
Normal file
8
data_migration_tools/server/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/dist*
|
||||
/node_modules
|
||||
/dump.rdb
|
||||
/build
|
||||
/openapi/build
|
||||
|
||||
|
||||
.env.local
|
||||
14
data_migration_tools/server/.vscode/launch.json
vendored
Normal file
14
data_migration_tools/server/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run", "start:debug"],
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
21
data_migration_tools/server/.vscode/settings.json
vendored
Normal file
21
data_migration_tools/server/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"eslint.format.enable": false,
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnType": true,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": false,
|
||||
"editor.renderLineHighlight": "all"
|
||||
}
|
||||
12
data_migration_tools/server/buildTool.sh
Normal file
12
data_migration_tools/server/buildTool.sh
Normal file
@ -0,0 +1,12 @@
|
||||
if [ ! -d "../tool" ]; then
|
||||
mkdir "../tool"
|
||||
echo "フォルダが作成されました。"
|
||||
else
|
||||
rm -f ../tool/ODMS_DataTool.exe
|
||||
fi
|
||||
unzip ../baseNode.zip -d ../tool
|
||||
ncc build dist/main.js -o dist_single -a
|
||||
npx -y postject ../tool/ODMS_DataTool.exe NODE_JS_CODE dist_single/index.js --sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2 --overwrite
|
||||
cp -r build ../tool
|
||||
cp .env ../tool
|
||||
cp .env.local.example ../tool
|
||||
5
data_migration_tools/server/nest-cli.json
Normal file
5
data_migration_tools/server/nest-cli.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/nest-cli",
|
||||
"collection": "@nestjs/schematics",
|
||||
"sourceRoot": "src"
|
||||
}
|
||||
17477
data_migration_tools/server/package-lock.json
generated
Normal file
17477
data_migration_tools/server/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user