.gitlab-ci.yml updated v72
This commit is contained in:
parent
f131f48dfe
commit
4a90d75cb3
8 changed files with 27 additions and 10 deletions
|
|
@ -46,8 +46,8 @@ test:
|
|||
paths:
|
||||
- /builds/mfd/clearing/clr_test/result-files
|
||||
script:
|
||||
- apk update && apk add maven python3
|
||||
- echo "Installing maven and python" && apk update && apk add maven python3
|
||||
- cd clr_test
|
||||
- cp -r /builds/mfd/clearing/z-distr/target/clearing/bin ./clearing-all/bin
|
||||
- cp /builds/mfd/clearing/z-distr/target/clearing/db/DDL.sql ./db
|
||||
- echo "Copying jar files to clearing-all/bin" && cp -r /builds/mfd/clearing/z-distr/target/clearing/bin ./clearing-all/bin
|
||||
- echo "Copying DDL.sql to db directory" && cp /builds/mfd/clearing/z-distr/target/clearing/db/DDL.sql ./db
|
||||
- python3 run_test_docker_containers.py
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ sleep 180
|
|||
|
||||
echo Run test case
|
||||
sh ./clearing_testing_utils/run_test_env.sh
|
||||
sleep 30
|
||||
|
||||
echo Run clearing-tester
|
||||
sh ./clearing_testing_utils/clearing-tester/clearing-tester.sh
|
||||
|
|
|
|||
|
|
@ -34,7 +34,12 @@ services:
|
|||
- "7020:7020"
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- test-files:/opt/clearing/clearing_testing_utils/store/results
|
||||
- /root/clr_test/mnt:/opt/clearing/files
|
||||
- /root/clr_test/mnt/results:/opt/clearing/clearing_testing_utils/store/results
|
||||
- /root/clr_test/mnt/logs/tester:/opt/clearing/clearing_testing_utils/clearing-tester/logs
|
||||
- /root/clr_test/mnt/logs/converter:/opt/clearing/clearing_testing_utils/clearing-converter/logs
|
||||
- /root/clr_test/mnt/logs/clearing:/opt/clearing/bin/log
|
||||
- /root/clr_test/mnt/testFiles:/opt/clearing/clearing_testing_utils/store/results
|
||||
# restart: always
|
||||
|
||||
zookeeper:
|
||||
|
|
@ -81,12 +86,6 @@ services:
|
|||
volumes:
|
||||
db:
|
||||
driver: local
|
||||
test-files:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: /root/clr_test/mnt/testFiles
|
||||
zookeeper_data:
|
||||
driver: local
|
||||
kafka_data:
|
||||
|
|
|
|||
0
clr_test/mnt/logs/clearing/.gitkeep
Normal file
0
clr_test/mnt/logs/clearing/.gitkeep
Normal file
0
clr_test/mnt/logs/converter/.gitkeep
Normal file
0
clr_test/mnt/logs/converter/.gitkeep
Normal file
0
clr_test/mnt/logs/tester/.gitkeep
Normal file
0
clr_test/mnt/logs/tester/.gitkeep
Normal file
0
clr_test/mnt/results/.gitkeep
Normal file
0
clr_test/mnt/results/.gitkeep
Normal file
|
|
@ -3,6 +3,10 @@ import re
|
|||
import time
|
||||
import shutil
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s")
|
||||
|
||||
|
||||
DATA_ROOT_DIR = os.environ['CLEARING_TEST_DIR']
|
||||
|
|
@ -26,16 +30,29 @@ def remove_files_with_extensions(extension):
|
|||
for root, dirs, files in os.walk(CLR_TEST_DIR):
|
||||
for currentFile in files:
|
||||
if currentFile.lower().endswith(extension):
|
||||
logging.info(f"Removing file {os.path.join(root, currentFile)}, based on extension {extension}")
|
||||
os.remove(os.path.join(root, currentFile))
|
||||
|
||||
|
||||
def main():
|
||||
folders = [i for i in sorted(os.listdir(DATA_ROOT_DIR)) if re.search("\\d{1,}.\\d{1,}.*", i)]
|
||||
|
||||
logging.info(f"Removing folder {CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/expected")
|
||||
shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/expected")
|
||||
|
||||
logging.info(f"Removing folder {CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/input")
|
||||
shutil.rmtree(f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/store/input")
|
||||
|
||||
logging.info(f"Removing file {CLR_TEST_DIR}/db/export.sql")
|
||||
os.remove(f"{CLR_TEST_DIR}/db/export.sql")
|
||||
|
||||
logging.info(f"Removing file {CLR_TEST_DIR}/db/test-data.sql")
|
||||
os.remove(f"{CLR_TEST_DIR}/db/test-data.sql")
|
||||
|
||||
logging.info(f"Copying files from {DATA_ROOT_DIR}/{folders[0]}/db/ to {CLR_TEST_DIR}/db/")
|
||||
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[0]}/db/", f"{CLR_TEST_DIR}/db/", dirs_exist_ok=True)
|
||||
|
||||
logging.info(f"Copying files from {DATA_ROOT_DIR}/{folders[0]}/clearing_testing_utils/ to {CLR_TEST_DIR}/clearing-all/clearing_testing_utils/")
|
||||
shutil.copytree(f"{DATA_ROOT_DIR}/{folders[0]}/clearing_testing_utils/", f"{CLR_TEST_DIR}/clearing-all/clearing_testing_utils/", dirs_exist_ok=True)
|
||||
remove_files_with_extensions(".xml")
|
||||
run_docker(folders[0], read_date(folders[0]))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue