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



commit 8df9cd0efe78d2ee6a400b5068007ddb5242fc50
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 1556e5cd..7f310303 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -258,16 +258,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]