From f700065788580be70f5dbac7d4770e170798357a Mon Sep 17 00:00:00 2001 From: curben Date: Sat, 11 May 2019 20:27:14 +0930 Subject: [PATCH] chore(ci): move script.sh to CI config to stop the build as soon as current script fails, especially if wget fails in prerequisites.sh --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++-- utils/script.sh | 15 --------------- 2 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 utils/script.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f1ad485..a6d30d10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,8 +33,32 @@ deploy: # Change to the downloaded repo directory - cd build/ - # Execute script.sh - - sh utils/script.sh + # Create a temporary working folder + - mkdir tmp/ && cd tmp/ + + # Download URLhaus database and Umbrella Top 1M + - sh ../utils/prerequisites.sh + + # Process the Umbrella Top 1M + - sh ../utils/umbrella-top-1m.sh + + # Parse domains from URLhaus excluding popular domains + - sh ../utils/malware-domains.sh + + # Parse popular domains that also appear in URLhaus + - sh ../utils/urlhaus-top-domains.sh + + # Parse malware URLs from popular domains + - sh ../utils/malware-url-top-domains.sh + + # Merge malware domains and URLs + - sh ../utils/urlhaus-filter.sh + + # Commit the changes + - sh ../utils/commit.sh + + # Clean up the working folder + - cd ../ && rm -r tmp/ # Push the commit - git push diff --git a/utils/script.sh b/utils/script.sh deleted file mode 100644 index d571d5ab..00000000 --- a/utils/script.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -mkdir tmp/ -cd tmp/ - -sh ../utils/prerequisites.sh -sh ../utils/umbrella-top-1m.sh -sh ../utils/malware-domains.sh -sh ../utils/urlhaus-top-domains.sh -sh ../utils/malware-url-top-domains.sh -sh ../utils/urlhaus-filter.sh -sh ../utils/commit.sh - -cd ../ -rm -r tmp/