1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Linda Siebert
8eb0c6aa48
Adjust sonarExecuteScan step (#3527)
* add check for instance parameter

* remove default from yaml

* adapt changes

* Update stashSettings.yml

* Unstash

* Add echo

* Stash changes

* Remove changes

* stash everything

* Change it up

* Change go

* Switch to new solution

* Try new stash

* Remove compliance

* Move Artifacts

* Change stashing

* Match others

* Remove space

* Test if warning goes away

Co-authored-by: Jesse Awan <jesse.awan@sap.com>
2022-02-25 13:09:50 +01:00
Christopher Fenner
835be3c333
feat(sonar): use go-based certificate loading (#3307)
* do not load sap certificates with groovy

* add toggle
2021-11-25 07:42:54 +01:00
Philipp Stehle
f9f0cbfd33
enforce that step metadata yaml file is called <step>.yaml (#3226)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2021-11-15 14:20:20 +01:00
Kevin Stiehl
173e887064
[CPE] Missing pipeline environment in sonar docker container (#2909)
* execute writepipeline env in sonar

* non exisitng dir is no error

* add log message
2021-06-16 11:46:55 +02:00
Kevin Stiehl
d1c8abc6b3
refactor: move common pipeline environment handling to golang (#2823)
* make use of new read,writePipelineEnv Steps in groovy

* remove unused cat

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-15 14:34:56 +02:00
Marc Bormeth
911d4bc770
feat(sonar): make step orchestrator-agnostic (#2874)
* Make sonarExecuteScan orchestrator-agnostic

* Increase coverage + support empty or false env vars

* Use cleared env for unit tests

* Refactor to standalone package

* Fix review findings

* Fix review findings

* Fix unit test

* Add logging

* Refactor

* Add to codeowners 😎

* Apply suggestions from code review

* Remove unreachable code

* no message

* fix typos

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-09 09:38:52 +02:00
Christopher Fenner
0fcbfa8da7
feat(sonar): create report for issue count (#2691)
* create json report

* archive report

* add test case

* generate report

* correct report name
2021-03-12 15:05:07 +01:00
Marcus Holl
75a35fb35a
Improve logging wrt the docker image used for launching piper-go (#1578)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-10-01 16:27:50 +02:00
Stephan Aßmus
eb09f2d902
Extend sonarExecuteScan parameters (#1982)
* Add projectKey and coverageExclusions params
* Also add binary, coverage exclusions and jacoco related options to sonar execution.

Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
Co-authored-by: Kevin Hudemann <kevin.hudemann@sap.com>
2020-09-11 13:39:17 +02:00
Stephan Aßmus
dc9a6d7b2b
SonarQube: Remove check for non-productive branch (#1998) 2020-09-10 10:09:17 +02:00
Stephan Aßmus
c95f2d10ca
Check env.BRANCH_NAME before using (#1992) 2020-09-09 12:38:38 +02:00
Stephan Aßmus
e6534d0400
Run SonarQube scan in Compliance stage (#1974) 2020-09-08 17:28:29 +02:00
Christopher Fenner
896519a77f
refactor(sonar): reuse piperExecuteBin code (#1880)
* reuse piperExecuteBin code

* add correlation id

* reuse credential loading

* reuse dockerWrapper

* rearrange code

* add influx wrapper

* correct writeToDisk position
2020-08-06 14:22:40 +02:00
Christopher Fenner
27c6320474
feat(sonar): write flag for sonar execution to influx (#1534)
* write flag for sonar execution to influx

* add missing step metadata file

* first attempt to read influx from disk

* add missing import

* correct glob pattern

* use file path

* correct type names

* cleanup

* fix code climate issue

* fix typo

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* add test case

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-05-14 13:46:40 +02:00
Christopher Fenner
04da130dbd
fix(sonar): handle piper-bin error result (#1524) 2020-05-11 12:46:16 +02:00
Christopher Fenner
aab3c5989f
fix(sonar): remove .sonar-scanner and .certificates folder after scan (#1481) 2020-04-29 11:11:23 +02:00
Christopher Fenner
c190deee44
refactor(sonar): switch to Sonar scan in GO (#1320)
* use sonar go in groovy

* use SONAR_TOKEN

* only use owner/repo if both are set

* trim version to major version digit

* fix code climate issues

* remove Sonar defaults

* use sonar go step

* use SONAR_TOKEN

* use certs from parameters

* use docker workspace & options

* add instance parameter

* implement branchName

* implement branchName

* remove duplicate default

* update docs

* fix TODOs

* remove merge mess

* fix code climate issue

* address comments

* respect custom defaults and custom config file name

* fix typo

* remove obsolete test cases

* disable CommonStepChecks

* check step config instead of context config

* remove TODOs

* respect jenkins PR envvars

* use value from stepConfig

* Update vars/sonarExecuteScan.groovy

* rename options to config

* correct type for options

* add test cases

* log sonar.options in debug message

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-08 12:55:46 +02:00
HenrikB
0a29ff2c57
feat(sonar): report to custom branch name (#1341)
* feat(sonar): report to custom branch name

* fix typo

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-01 12:38:36 +02:00
Christopher Fenner
a970507619
refactor(sonar): provide trust store via JVM parameter (#1270)
* provide trust store via JVM parameter

* adjust test cases

* Update vars/sonarExecuteScan.groovy

* Update vars/sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy
2020-03-16 10:34:07 +01:00
Sven Merk
6edaaecf15
Support workspace paths containing whitespaces (#1241)
* Support workspace paths containing whitespaces

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Switch to export

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy
2020-03-09 15:40:59 +01:00
Christopher Fenner
686235613c
fix(sonar): run sonar scan in NodeJS container (#1078)
* fix(sonar): run sonar scan in NodeJS container

* fix typo

* adapt tests
2019-12-20 10:51:33 +01:00
Christopher Fenner
d57e506217
docs(sonar): update sonar docs (#1015)
as SonarQube LTS has now moved to v7.9
2019-11-27 08:41:02 +01:00
Christopher Fenner
14e7ef23b4
fix: sonarExecuteScan: safeguard unstash of git metadata (#976)
* unstash .git folder only if not present, ignore missing stashes

* fix: negate condition

* Update sonarExecuteScan.groovy
2019-11-13 12:55:02 +01:00
Christopher Fenner
7466ae43af
fix: sonar PR voting (#971)
* unstash git files into container

* use CHANGE_BRANCH

* adapt env variables
2019-11-12 17:17:44 +01:00
Sven Merk
0f3436d1a5 sonarExecuteScan: avoid working directory being deleted before scan detection ends (#882) 2019-10-28 13:01:51 +01:00
Sven Merk
bb59e68df3 sonarExecuteScan: Fix links in documentation (#883)
* Update sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy

* Update vars/sonarExecuteScan.groovy

* Update vars/sonarExecuteScan.groovy
2019-10-28 12:55:27 +01:00
Sven Merk
46fb4ad5e8 Exchange NonSerializable template engine with GStringTemplateEngine 2019-10-23 13:38:31 +02:00
Christopher Fenner
f3f4c741be
sonarExecuteScan: add custom certificate support (#819)
* feat(sonar): load TLS certificates

* allow verbose property

* handle whitespaces

* cleanup

* disable default verbosity on wget

* correct test file name

* add test case for custom certificates

* import StandardCharsets

* change cleanup

* correct pull-request provider name

* correct pull-request provider name

* correct pull-request provider name
2019-08-11 22:42:34 +02:00
Alejandra Ferreiro Vidal
c21a4a6a3e remove semikolons 2019-05-23 14:28:32 +02:00
Christopher Fenner
c8f9db71eb
add step for Sonar scan (#183)
* add new step sonarExecute

* simplify list

* add general credentials for SonarQube

* Update default_pipeline_environment.yml

* Update sonarExecute.groovy

* correct worker invocation

* switch step/stage config order

* add tests

* add webhook handling

* Update default_pipeline_environment.yml

* use withMandatoryProperty with condition

* Update ConfigurationHelper.groovy

* Update sonarExecute.groovy

* Update ConfigurationHelper.groovy

* rename step to sonarExecuteScan

* rename step to sonarExecuteScan

* rename step to sonarExecuteScan

* Update sonarExecuteScan.groovy

* change return type

* Update sonarExecuteScan.groovy

* stash

* update defaults

* update install path

* use quiet unzip

* use long option names

* optimize filename retrival

* rework PR voting

* fix path

* remove accitentially checked-in file

* add documentation, optimise coding

* correct test case

* add documentation

* remove option prefix

* rename config variable

* update docs

* update docs

* rename download url

* fix typo

* adjust test cases

* add test cases

* update docs
2019-05-13 12:29:07 +02:00