From 7a4be7874c035c13bec2dc13e16690c7bf3ffbdb Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:08:23 +0000 Subject: [PATCH 01/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9265bd2..5a5ce0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,9 @@ # https://hub.docker.com/r/library/python/tags/ image: python:3.6 +include: + template: Dependency-Scanning.gitlab-ci.yml + # Change pip's cache directory to be inside the project directory since we can # only cache local items. variables: @@ -34,6 +37,11 @@ typing: script: - make type_check +dependency_scanning: + variables: + CI_DEBUG_TRACE: "true" + + # pages: # script: # - pip install sphinx sphinx-rtd-theme -- GitLab From 123b41aa9fd38abcfe92c6a9eb85470808c29089 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:17:34 +0000 Subject: [PATCH 02/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a5ce0b..1744a01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,9 +2,6 @@ # https://hub.docker.com/r/library/python/tags/ image: python:3.6 -include: - template: Dependency-Scanning.gitlab-ci.yml - # Change pip's cache directory to be inside the project directory since we can # only cache local items. variables: @@ -38,9 +35,34 @@ typing: - make type_check dependency_scanning: + image: docker:stable variables: - CI_DEBUG_TRACE: "true" - + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - find requirements.d -iname '*.txt' -exec cat '{}' \; > requirements.txt + - find frontends/* -iname requirements.txt -exec cat '{}' \; >> requirements.txt + - export DS_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')} + - | + docker run \ + --env DS_ANALYZER_IMAGES \ + --env DS_ANALYZER_IMAGE_PREFIX \ + --env DS_ANALYZER_IMAGE_TAG \ + --env DS_DEFAULT_ANALYZERS \ + --env DEP_SCAN_DISABLE_REMOTE_CHECKS \ + --env DS_DOCKER_CLIENT_NEGOTIATION_TIMEOUT \ + --env DS_PULL_ANALYZER_IMAGE_TIMEOUT \ + --env DS_RUN_ANALYZER_TIMEOUT \ + --volume "$PWD:/code" \ + --volume /var/run/docker.sock:/var/run/docker.sock \ + "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$DS_VERSION" /code + - rm -f requirements.txt + dependencies: [] + artifacts: + reports: + dependency_scanning: gl-dependency-scanning-report.json # pages: # script: -- GitLab From 1050d1a6672a5ee60b19c718b05021e3f1725a67 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:28:20 +0000 Subject: [PATCH 03/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1744a01..d028ea7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ typing: - make type_check dependency_scanning: - image: docker:stable + # image: docker:stable variables: DOCKER_DRIVER: overlay2 allow_failure: true -- GitLab From 5bf72c786f575e80b4a8821945d1aba8033cc796 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:30:51 +0000 Subject: [PATCH 04/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d028ea7..e8b39a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,8 @@ typing: - make type_check dependency_scanning: - # image: docker:stable + image: docker:stable + before_script: [] variables: DOCKER_DRIVER: overlay2 allow_failure: true -- GitLab From 187acb997859ffb49ab5f79c35f67949d56a2458 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:51:56 +0000 Subject: [PATCH 05/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8b39a2..3de0ba3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ cache: - venv/ before_script: - - python -V + - python3 -V - make virtualenv - . venv/bin/activate @@ -36,15 +36,22 @@ typing: dependency_scanning: image: docker:stable - before_script: [] + before_script: + - apk add -U python3 + - python3 -V + - make virtualenv + - venv/bin/pip freeze > requirements.txt + after_script: + - rm -f requirements.txt variables: DOCKER_DRIVER: overlay2 allow_failure: true services: - docker:stable-dind script: - - find requirements.d -iname '*.txt' -exec cat '{}' \; > requirements.txt - - find frontends/* -iname requirements.txt -exec cat '{}' \; >> requirements.txt + #- find requirements.d -iname '*.txt' -exec cat '{}' \; > requirements.txt + #- find frontends/* -iname requirements.txt -exec cat '{}' \; >> requirements.txt + #- echo "$(egrep -v '^#|^$' requirements.txt | sort -u)" > requirements.txt - export DS_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')} - | docker run \ @@ -59,7 +66,7 @@ dependency_scanning: --volume "$PWD:/code" \ --volume /var/run/docker.sock:/var/run/docker.sock \ "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$DS_VERSION" /code - - rm -f requirements.txt + #- rm -f requirements.txt dependencies: [] artifacts: reports: -- GitLab From dba12d52b7e2c96d4f5335ade8ae7be6a59f5956 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:52:53 +0000 Subject: [PATCH 06/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3de0ba3..25efccd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ typing: dependency_scanning: image: docker:stable before_script: - - apk add -U python3 + - apk add -U make python3 - python3 -V - make virtualenv - venv/bin/pip freeze > requirements.txt -- GitLab From 1271432dfbaf2eeea9261c1f3a84dc57650e04f9 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 18:57:24 +0000 Subject: [PATCH 07/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25efccd..c8a407f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ typing: dependency_scanning: image: docker:stable before_script: - - apk add -U make python3 + - apk add -U make postgresql-dev python3 - python3 -V - make virtualenv - venv/bin/pip freeze > requirements.txt -- GitLab From bfa30001ef7e8b8862d5f8bd38a1b14064c5e00f Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 19:02:10 +0000 Subject: [PATCH 08/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c8a407f..f15f099 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ typing: dependency_scanning: image: docker:stable before_script: - - apk add -U make postgresql-dev python3 + - apk add -U git make postgresql-dev python3 - python3 -V - make virtualenv - venv/bin/pip freeze > requirements.txt -- GitLab From 3db8b6b33a9705a16014b9e6caff88b0c1822a5c Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 19:03:36 +0000 Subject: [PATCH 09/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f15f099..d60fba8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ typing: dependency_scanning: image: docker:stable before_script: - - apk add -U git make postgresql-dev python3 + - apk add -U build-base git postgresql-dev python3 - python3 -V - make virtualenv - venv/bin/pip freeze > requirements.txt -- GitLab From 5249fe252045845e50635006b16511f671a4d3a8 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 19:10:12 +0000 Subject: [PATCH 10/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d60fba8..78d3593 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,7 +37,7 @@ typing: dependency_scanning: image: docker:stable before_script: - - apk add -U build-base git postgresql-dev python3 + - apk add -U build-base git postgresql-dev python3 python3-dev - python3 -V - make virtualenv - venv/bin/pip freeze > requirements.txt -- GitLab From b5144946e56c9be50e958882901c0972cadf1603 Mon Sep 17 00:00:00 2001 From: camerden Date: Fri, 5 Apr 2019 19:14:05 +0000 Subject: [PATCH 11/11] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 78d3593..3af09d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,8 @@ dependency_scanning: - apk add -U build-base git postgresql-dev python3 python3-dev - python3 -V - make virtualenv - - venv/bin/pip freeze > requirements.txt + - . venv/bin/activate + - pip freeze > requirements.txt after_script: - rm -f requirements.txt variables: -- GitLab