From c5d2847683b6351ad864c01efa0f36151aaae32e Mon Sep 17 00:00:00 2001 From: edward-codecov <55003665+edward-codecov@users.noreply.github.com> Date: Thu, 23 Apr 2020 11:44:14 -0400 Subject: [PATCH 01/26] Add .circleci/config.yml --- .circleci/config.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..12a49189b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,21 @@ +version: 2.1 + +orbs: + python: circleci/python@0.2.1 + +jobs: + build-and-test: + executor: python/default + steps: + - checkout + - python/load-cache + - python/install-deps + - python/save-cache + - run: + command: ./manage.py test + name: Test + +workflows: + main: + jobs: + - build-and-test From 80a1d9841caece7a1fb9ba281130ff60c96b5030 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Thu, 23 Apr 2020 11:49:19 -0400 Subject: [PATCH 02/26] try sonar orb --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 12a49189b..1260c6e91 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,7 @@ version: 2.1 orbs: python: circleci/python@0.2.1 + sonarcloud: sonarsource/sonarcloud@1.0.1 jobs: build-and-test: From a1425dc2531d4438b21081f07aa98d8967f0b4ee Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Thu, 23 Apr 2020 12:00:08 -0400 Subject: [PATCH 03/26] try sonar orb post permissions --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1260c6e91..aab7149f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,8 @@ jobs: - run: command: ./manage.py test name: Test + - run: + command: date workflows: main: From 3a203e32b8491b029732bafba8764efd3ad7a69d Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Thu, 23 Apr 2020 12:08:22 -0400 Subject: [PATCH 04/26] add test cmds to ci --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aab7149f4..4f2363868 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,10 +13,9 @@ jobs: - python/install-deps - python/save-cache - run: - command: ./manage.py test - name: Test - - run: - command: date + command: | + pip install pytest-cov + pytest --cov=./ --cov-report=xml workflows: main: From 370bff18e487da7382ee2899d0672addc0e15b90 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Thu, 23 Apr 2020 12:10:34 -0400 Subject: [PATCH 05/26] remove deps installation --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f2363868..26fcac21a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,9 +9,9 @@ jobs: executor: python/default steps: - checkout - - python/load-cache - - python/install-deps - - python/save-cache + # - python/load-cache + # - python/install-deps + # - python/save-cache - run: command: | pip install pytest-cov From d9b2ede9b45c6bfb4f5a67e8316f1e3ffd5f3d9a Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 27 Apr 2020 11:50:42 -0400 Subject: [PATCH 06/26] add sonar props file --- .circleci/config.yml | 1 + sonar-project.properties | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 sonar-project.properties diff --git a/.circleci/config.yml b/.circleci/config.yml index 26fcac21a..b3a9c3b94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,7 @@ jobs: command: | pip install pytest-cov pytest --cov=./ --cov-report=xml + sonarcloud/scan workflows: main: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..d597d1efd --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.host.url=https://sonarqube.codecov.dev +sonar.projectKey=sq-orb-test +sonar.python.coverage.reportPaths=./coverage.xml +sonar.login=${env.SONAR_TOKEN} From a6f70ab1b1e26d76c7e5f8a7745d48d43e9a4780 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 27 Apr 2020 12:14:23 -0400 Subject: [PATCH 07/26] add ci context --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3a9c3b94..b2855e7d2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,4 +21,5 @@ jobs: workflows: main: jobs: - - build-and-test + - build-and-test: + context: sonarcloud From 6f12ae100b1156ffaf79d20825050ab92c8ac957 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 27 Apr 2020 12:19:12 -0400 Subject: [PATCH 08/26] enable pipelines --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2855e7d2..92d55dff8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,8 @@ version: 2.1 +experimental: + pipelines: true + orbs: python: circleci/python@0.2.1 sonarcloud: sonarsource/sonarcloud@1.0.1 From bfa9c84159c2e7468d15e965d46ea786e14519be Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 27 Apr 2020 12:22:24 -0400 Subject: [PATCH 09/26] update ci --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 92d55dff8..43587482a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,5 @@ version: 2.1 -experimental: - pipelines: true - orbs: python: circleci/python@0.2.1 sonarcloud: sonarsource/sonarcloud@1.0.1 @@ -19,7 +16,7 @@ jobs: command: | pip install pytest-cov pytest --cov=./ --cov-report=xml - sonarcloud/scan + - sonarcloud/scan workflows: main: From 4704ddcaef7b9e037921504416e4bc350222a9b2 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 27 Apr 2020 12:23:18 -0400 Subject: [PATCH 10/26] remove context --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 43587482a..16d145e6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,5 +21,4 @@ jobs: workflows: main: jobs: - - build-and-test: - context: sonarcloud + - build-and-test From abee2838a5c0053db4044613d3f6962f358dfc47 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 10:39:10 -0400 Subject: [PATCH 11/26] tweak sonar env --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index d597d1efd..2aaa92994 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ sonar.host.url=https://sonarqube.codecov.dev sonar.projectKey=sq-orb-test sonar.python.coverage.reportPaths=./coverage.xml -sonar.login=${env.SONAR_TOKEN} +sonar.login=${SONAR_TOKEN} From 0a10ad869a235c9d6030b91c44fa34d6b39c638f Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 10:55:40 -0400 Subject: [PATCH 12/26] try sq directly --- .circleci/config.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 16d145e6a..865276b93 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,6 @@ version: 2.1 orbs: python: circleci/python@0.2.1 - sonarcloud: sonarsource/sonarcloud@1.0.1 jobs: build-and-test: @@ -12,11 +11,19 @@ jobs: # - python/load-cache # - python/install-deps # - python/save-cache + - run: + name: Install Sonarqube scanner + command: | + wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip + unzip sonar-scanner-cli-4.3.0.2102.zip + ls -sla + - run: command: | + ls -sla pip install pytest-cov pytest --cov=./ --cov-report=xml - - sonarcloud/scan + workflows: main: From f333ecc7eba30ff42fd40058db8dd596d245d7ba Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 10:56:59 -0400 Subject: [PATCH 13/26] try sq directly --- .circleci/config.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 865276b93..704a89e61 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,18 +12,17 @@ jobs: # - python/install-deps # - python/save-cache - run: - name: Install Sonarqube scanner - command: | - wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip - unzip sonar-scanner-cli-4.3.0.2102.zip - ls -sla + name: Install Sonarqube scanner + command: | + wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip + unzip sonar-scanner-cli-4.3.0.2102.zip + ls -sla - run: command: | ls -sla pip install pytest-cov pytest --cov=./ --cov-report=xml - workflows: main: From 544b2c12e2a62283ea378dbd171c7a5cff30e612 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 11:54:12 -0400 Subject: [PATCH 14/26] update ci --- .circleci/config.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 704a89e61..cfb620c0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,8 @@ orbs: jobs: build-and-test: executor: python/default + environment: + SONARSCANNER_VERSION: "4.3.0.2102" steps: - checkout # - python/load-cache @@ -14,16 +16,21 @@ jobs: - run: name: Install Sonarqube scanner command: | - wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip - unzip sonar-scanner-cli-4.3.0.2102.zip + wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONARSCANNER_VERSION.zip + unzip sonar-scanner-cli-$SONARSCANNER_VERSION.zip ls -sla - run: + name: Test command: | ls -sla pip install pytest-cov pytest --cov=./ --cov-report=xml + - run: + name: Run SonarScanner + command: ./sonar-scanner-$SONARSCANNER_VERSION + workflows: main: jobs: From a61dceba4c3bb2419c9b0fb4c983c929060fc044 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 11:57:22 -0400 Subject: [PATCH 15/26] update ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cfb620c0b..da36ebc00 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,7 @@ jobs: - run: name: Run SonarScanner - command: ./sonar-scanner-$SONARSCANNER_VERSION + command: ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner workflows: main: From 7a1befc3bcbc9e0a17a9e1eec1f49d012fff830e Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 12:07:38 -0400 Subject: [PATCH 16/26] update ci --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da36ebc00..3b73030c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,5 @@ version: 2.1 -orbs: - python: circleci/python@0.2.1 - jobs: build-and-test: executor: python/default @@ -13,6 +10,9 @@ jobs: # - python/load-cache # - python/install-deps # - python/save-cache + - run: + name: Install OpenJDK 11 + command: sudo apt install openjdk-11-jdk - run: name: Install Sonarqube scanner command: | From 83710e6e56cafb3445a1caef090c31c0ce4b316e Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 12:10:15 -0400 Subject: [PATCH 17/26] update ci --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b73030c2..d3b89a745 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,6 @@ version: 2.1 jobs: build-and-test: - executor: python/default environment: SONARSCANNER_VERSION: "4.3.0.2102" steps: From cfe03c869f855138ed0ed5c521e2ed30972e9260 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 12:11:32 -0400 Subject: [PATCH 18/26] update ci --- .circleci/config.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d3b89a745..f31ae279e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,11 @@ version: 2.1 +orbs: + python: circleci/python@0.2.1 + jobs: build-and-test: + executor: python/default environment: SONARSCANNER_VERSION: "4.3.0.2102" steps: @@ -12,17 +16,16 @@ jobs: - run: name: Install OpenJDK 11 command: sudo apt install openjdk-11-jdk + - run: - name: Install Sonarqube scanner + name: Install SonarScanner command: | wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONARSCANNER_VERSION.zip unzip sonar-scanner-cli-$SONARSCANNER_VERSION.zip - ls -sla - run: name: Test command: | - ls -sla pip install pytest-cov pytest --cov=./ --cov-report=xml From b085121cdef0aa61415adc771ccc12de45366716 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 12:15:50 -0400 Subject: [PATCH 19/26] update ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f31ae279e..df4b9bc15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: - run: name: Run SonarScanner - command: ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner + command: ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X workflows: main: From ee230dce01094611b8e0fab1d1c5d28442d5c0fb Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 12:27:10 -0400 Subject: [PATCH 20/26] update ci --- sonar-project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 2aaa92994..e4e0e92c5 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,4 @@ sonar.host.url=https://sonarqube.codecov.dev -sonar.projectKey=sq-orb-test +sonar.projectKey=python-standard sonar.python.coverage.reportPaths=./coverage.xml -sonar.login=${SONAR_TOKEN} +sonar.login=d74a4463c0075eecded31e989b275b1d7725fa45 From 19a35c9cc7356f8f63ee409cb71df4ffcf0da49b Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 12:37:16 -0400 Subject: [PATCH 21/26] update ci --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index e4e0e92c5..691dbbce2 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,5 @@ sonar.host.url=https://sonarqube.codecov.dev sonar.projectKey=python-standard +sonar.sources=. sonar.python.coverage.reportPaths=./coverage.xml sonar.login=d74a4463c0075eecded31e989b275b1d7725fa45 From 6b5251415df529b79a20ce40ee39c7b379daa2d9 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 13:21:44 -0400 Subject: [PATCH 22/26] update ci --- sonar-project.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 691dbbce2..e4e0e92c5 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,4 @@ sonar.host.url=https://sonarqube.codecov.dev sonar.projectKey=python-standard -sonar.sources=. sonar.python.coverage.reportPaths=./coverage.xml sonar.login=d74a4463c0075eecded31e989b275b1d7725fa45 From 9f311a5197e509d64a66280b4d86928cf18536ee Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 14:00:14 -0400 Subject: [PATCH 23/26] update ci --- .circleci/config.yml | 4 +++- asdf.txt | 1 + sonar-project.properties | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 asdf.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index df4b9bc15..7c3947d9d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,9 @@ jobs: - run: name: Run SonarScanner - command: ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X + command: | + echo "sonar.login="$SONAR_TOKEN > ./sonar-project.properties + ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X workflows: main: diff --git a/asdf.txt b/asdf.txt new file mode 100644 index 000000000..1dd45d2d0 --- /dev/null +++ b/asdf.txt @@ -0,0 +1 @@ +sonar.login=asdfasdf diff --git a/sonar-project.properties b/sonar-project.properties index e4e0e92c5..9ee2e1a74 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,3 @@ sonar.host.url=https://sonarqube.codecov.dev sonar.projectKey=python-standard sonar.python.coverage.reportPaths=./coverage.xml -sonar.login=d74a4463c0075eecded31e989b275b1d7725fa45 From c99ecc0ca3f1e61c8c09fe546071323e612dc695 Mon Sep 17 00:00:00 2001 From: Edward Izzo Date: Mon, 4 May 2020 14:03:13 -0400 Subject: [PATCH 24/26] update ci --- .circleci/config.yml | 2 +- asdf.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c3947d9d..1c475a665 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: - run: name: Run SonarScanner command: | - echo "sonar.login="$SONAR_TOKEN > ./sonar-project.properties + echo "sonar.login="$SONAR_TOKEN >> ./sonar-project.properties ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X workflows: diff --git a/asdf.txt b/asdf.txt index 1dd45d2d0..f0fa719d9 100644 --- a/asdf.txt +++ b/asdf.txt @@ -1 +1,2 @@ sonar.login=asdfasdf +sonar.login=asdfasdf From e3c7b1ca71b00857c53f874b76690ebc056b2be7 Mon Sep 17 00:00:00 2001 From: edward-codecov <55003665+edward-codecov@users.noreply.github.com> Date: Tue, 5 May 2020 11:45:51 -0400 Subject: [PATCH 25/26] Update config.yml --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c475a665..1b4301c56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,10 @@ jobs: name: Run SonarScanner command: | echo "sonar.login="$SONAR_TOKEN >> ./sonar-project.properties - ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X + echo "sonar.pullrequest.key=6" >> ./sonar-project.properties + echo "sonar.pullrequest.branch=circleci-project-setup" >> ./sonar-project.properties + echo "sonar.pullrequest.base=master" >> ./sonar-project.properties + ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X workflows: main: From 17fea11449a27b3701824cbbd814a55a0f294918 Mon Sep 17 00:00:00 2001 From: edward-codecov <55003665+edward-codecov@users.noreply.github.com> Date: Tue, 5 May 2020 16:22:58 -0400 Subject: [PATCH 26/26] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b4301c56..9c1f90bd8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ jobs: name: Run SonarScanner command: | echo "sonar.login="$SONAR_TOKEN >> ./sonar-project.properties - echo "sonar.pullrequest.key=6" >> ./sonar-project.properties + echo "sonar.pullrequest.key=7" >> ./sonar-project.properties echo "sonar.pullrequest.branch=circleci-project-setup" >> ./sonar-project.properties echo "sonar.pullrequest.base=master" >> ./sonar-project.properties ./sonar-scanner-$SONARSCANNER_VERSION/bin/sonar-scanner -X