diff options
| author | Zachary Knight <zachk@knowbe4.com> | 2019-06-13 08:46:48 -0400 |
|---|---|---|
| committer | Zachary Knight <zachk@knowbe4.com> | 2019-06-13 08:46:48 -0400 |
| commit | cb6015d6be987be0996f09b3e41bacd1ddb7172f (patch) | |
| tree | 98e321613c86760164c109575cad89fa86ca9efd | |
| parent | a769a4732617997c836aa5a0726e59203e37ef2c (diff) | |
| parent | eed829997f7f60211e718f8e13844bec6820f42c (diff) | |
Merge branch 'master' into upgrade-docker-license-finder
| -rw-r--r-- | .gitlab-ci.yml | 12 | ||||
| -rwxr-xr-x | run.sh | 6 | ||||
| -rw-r--r-- | test/results/python3-pip.json | 212 | ||||
| -rw-r--r-- | test/results/ruby-bundler.json | 2 | ||||
| -rwxr-xr-x | test/test.sh | 5 |
5 files changed, 230 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88ad151..6353a64 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,12 +48,14 @@ container_scanning: .QA: image: docker:stable stage: test + variables: + LM_PYTHON_VERSION: 2 script: - docker info - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY - docker pull $TMP_IMAGE - mkdir results - - docker run --volume `pwd`/results:/results $TMP_IMAGE test $QA_PROJECT $QA_REF + - docker run --env LM_PYTHON_VERSION --volume `pwd`/results:/results $TMP_IMAGE test $QA_PROJECT ${QA_RESULTS:-$QA_PROJECT} $QA_REF artifacts: paths: - results/ @@ -71,6 +73,14 @@ QA:python-pip: QA_PROJECT: python-pip QA_REF: 04dce91b +QA:python3-pip: + extends: .QA + variables: + LM_PYTHON_VERSION: 3 + QA_RESULTS: python3-pip + QA_PROJECT: python-pip + QA_REF: 48e250a1 + QA:ruby-bundler: extends: .QA variables: @@ -7,7 +7,7 @@ $(basename "$0") [-h] $(basename "$0") analyze PROJECT_PATH -$(basename "$0") test PROJECT_NAME PROJECT_REF +$(basename "$0") test PROJECT_NAME RESULTS_NAME PROJECT_REF where: -h show this help text @@ -60,7 +60,7 @@ if [ "$COMMAND" = "analyze" -a $# -ne 1 ] ; then exit 1 fi -if [ "$COMMAND" = "test" -a $# -ne 2 ] ; then +if [ "$COMMAND" = "test" -a $# -ne 3 ] ; then echo "$usage" exit 1 fi @@ -89,7 +89,7 @@ esac case "$COMMAND" in test) # Run integration tests. - exec /test/test.sh $1 $2 + exec /test/test.sh $1 $2 $3 ;; analyze) diff --git a/test/results/python3-pip.json b/test/results/python3-pip.json new file mode 100644 index 0000000..d98669d --- /dev/null +++ b/test/results/python3-pip.json @@ -0,0 +1,212 @@ +{ + "licenses": [ + { + "count": 4, + "name": "BSD" + }, + { + "count": 4, + "name": "MIT" + }, + { + "count": 1, + "name": "Copyright (c) 2015, Julien Fache" + }, + { + "count": 1, + "name": "New BSD License" + }, + { + "count": 1, + "name": "Python Software Foundation License" + }, + { + "count": 1, + "name": "Standard PIL License" + }, + { + "count": 1, + "name": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "dependencies": [ + { + "license": { + "name": "BSD", + "url": "http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29" + }, + "dependency": { + "name": "Django", + "url": "https://www.djangoproject.com/", + "description": "A high-level Python Web framework that encourages rapid development and clean, pragmatic design.", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "Standard PIL License" + }, + "dependency": { + "name": "Pillow", + "url": "https://python-pillow.org", + "description": "Python Imaging Library (Fork)", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "beautifulsoup4", + "url": "http://www.crummy.com/software/BeautifulSoup/bs4/", + "description": "Screen-scraping library", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "BSD", + "url": "http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29" + }, + "dependency": { + "name": "django-contrib-comments", + "url": "https://github.com/django/django-contrib-comments", + "description": "The code formerly known as django.contrib.comments.", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "BSD", + "url": "http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29" + }, + "dependency": { + "name": "django-js-asset", + "url": "https://github.com/matthiask/django-js-asset/", + "description": "script tag with additional attributes for django.forms.Media", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "django-mptt", + "url": "http://github.com/django-mptt/django-mptt", + "description": "Utilities for implementing Modified Preorder Tree Traversal with your Django Models and working with trees of Model instances.", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "BSD", + "url": "http://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29" + }, + "dependency": { + "name": "django-tagging", + "url": "https://github.com/Fantomas42/django-tagging", + "description": "Generic tagging application for Django", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "New BSD License" + }, + "dependency": { + "name": "django-xmlrpc", + "url": "https://github.com/Fantomas42/django-xmlrpc", + "description": "XML-RPC Server App for the Django framework.", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "Copyright (c) 2015, Julien Fache" + }, + "dependency": { + "name": "mots-vides", + "url": "https://github.com/Fantomas42/mots-vides", + "description": "Python library for managing stop words in many languages.", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "pyparsing", + "url": "http://pyparsing.wikispaces.com/", + "description": "Python parsing module", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "MIT", + "url": "http://opensource.org/licenses/mit-license" + }, + "dependency": { + "name": "pytz", + "url": "http://pythonhosted.org/pytz", + "description": "World timezone definitions, modern and historical", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "Python Software Foundation License", + "url": "http://hg.python.org/cpython/raw-file/89ce323357db/LICENSE" + }, + "dependency": { + "name": "regex", + "url": "https://bitbucket.org/mrabarnett/mrab-regex", + "description": "Alternative regular expression module, to replace re.", + "pathes": [ + "." + ] + } + }, + { + "license": { + "name": "http://www.apache.org/licenses/LICENSE-2.0" + }, + "dependency": { + "name": "tornado", + "url": "http://www.tornadoweb.org/", + "description": "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.", + "pathes": [ + "." + ] + } + } + ] +} diff --git a/test/results/ruby-bundler.json b/test/results/ruby-bundler.json index 03b3505..c66a9a3 100644 --- a/test/results/ruby-bundler.json +++ b/test/results/ruby-bundler.json @@ -21,7 +21,7 @@ }, "dependency": { "name": "bundler", - "url": "http://bundler.io", + "url": "https://bundler.io", "description": "The best way to manage your application's dependencies", "pathes": [ "." diff --git a/test/test.sh b/test/test.sh index ed4d8e9..042adc3 100755 --- a/test/test.sh +++ b/test/test.sh @@ -3,7 +3,8 @@ set -e project=$1 -ref=$2 +results=$2 +ref=$3 url="https://gitlab.com/gitlab-org/security-products/tests/$project.git" # Clone the test repository. @@ -21,4 +22,4 @@ mkdir -p /results/ cp "/code/$project/gl-license-management-report.json" "/results/$project-gl-license-management-report.json" # Compare results with expected results. -diff -u "/code/$project/gl-license-management-report.json" "/test/results/$project.json" +diff -u "/code/$project/gl-license-management-report.json" "/test/results/$results.json" |
