[gnome-build-meta/abderrahim/ci-improvements: 3/5] .gitlab-ci.yml: simplify the cve report job



commit 296d3967ce3c84bb6cf306c44dd9d8909aeeb323
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Fri Apr 19 17:28:20 2019 +0100

    .gitlab-ci.yml: simplify the cve report job

 .gitlab-ci.yml                     | 14 +++++++-------
 utils/generate-cve-report.py       |  1 +
 utils/update-local-cve-database.py |  1 +
 3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 59ab3e27..97306df7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -277,16 +277,16 @@ cve_report:
     - ${BST} checkout platform-manifest.bst platform-manifest/
     - ${BST} checkout sdk-manifest.bst sdk-manifest/
 
-    - mkdir -p "${XDG_CACHE_HOME}/cve"
-    - cd "${XDG_CACHE_HOME}/cve"
-    - python3 "${CI_PROJECT_DIR}/utils/update-local-cve-database.py"
+    - mkdir -p cve
+    - cd cve
+    - ../utils/update-local-cve-database.py
 
-    - mkdir -p "${CI_PROJECT_DIR}/cve-reports"
-    - python3 "${CI_PROJECT_DIR}/utils/generate-cve-report.py" 
"${CI_PROJECT_DIR}/sdk-manifest/usr/manifest.json" "${CI_PROJECT_DIR}/cve-reports/sdk.html"
-    - python3 "${CI_PROJECT_DIR}/utils/generate-cve-report.py" 
"${CI_PROJECT_DIR}/platform-manifest/usr/manifest.json" "${CI_PROJECT_DIR}/cve-reports/platform.html"
+    - mkdir -p ../cve-reports
+    - ../utils/generate-cve-report.py ../sdk-manifest/usr/manifest.json ../cve-reports/sdk.html
+    - ../utils/generate-cve-report.py ../platform-manifest/usr/manifest.json ../cve-reports/platform.html
   artifacts:
     paths:
-      - "${CI_PROJECT_DIR}/cve-reports"
+      - cve-reports
   only:
     - master
     - /^gnome-\d-\d\d$/
diff --git a/utils/generate-cve-report.py b/utils/generate-cve-report.py
old mode 100644
new mode 100755
index 70c1b21e..0c498ed6
--- a/utils/generate-cve-report.py
+++ b/utils/generate-cve-report.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
 """Generate and HTML output with all current CVEs for a given manifest.
 
 Usage:
diff --git a/utils/update-local-cve-database.py b/utils/update-local-cve-database.py
old mode 100644
new mode 100755
index 5af766a8..ab3d293c
--- a/utils/update-local-cve-database.py
+++ b/utils/update-local-cve-database.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
 """Downloads CVE database and store it as sqlite3 database.
 
 This tool does not take parameter. It will create files in the current


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]