1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
Commit Graph

3540 Commits

Author SHA1 Message Date
Oliver Nocon
2df2771734
fix(whitesourceExecuteScan) correctly handle structured projects (#2597)
* fix(whitesourceExecuteScan) correctly handle structured projects

report file names of projects which had a structure in the name
like `@test/myProject ` were incorrectly handled

This now prevents that reports are targeted to a sub directory.
Structure is now part of the filename.

* fix CodeClimate finding
2021-02-11 19:39:59 +01:00
Oliver Feldmann
1b032b5c82
Skip checkout flag (#2594)
* Skip checkout flag

Defaults to null==false
We need the option to provide an scmInfo object by the user

* Check skipCheckout is Boolean

* Require scmInfo map in case checkout is skipped
2021-02-11 16:21:57 +01:00
Marcus Holl
7e73622968
fix typo in fatal message triggered in tests. (#2574) 2021-02-11 14:57:22 +01:00
Oliver Feldmann
92fe76b2aa
Add CNAME file (#2595) 2021-02-11 14:12:18 +01:00
Daniel Mieg
d610c96b63
Increase ppiper cf-cli version to v7 (#2590)
* Increase ppiper cf-cli version to v7

* Change v7 to 7
2021-02-11 12:54:11 +01:00
Marcus Holl
c53d5241cb
use v6 version of ppiper/cf-cli consistently for all go steps (#2569) 2021-02-11 09:31:25 +01:00
Mayur Belur Mohan
f030bc9861
IntegrationArtifactDownload Command (#2587)
* IntegrationArtifactDownload Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-02-10 17:08:23 +01:00
Oliver Nocon
d47a17c8fc
feat(whitesource): consolidated reporting and versioning alignment (#2571)
* update reporting and add todo comments

* enhance reporting, allow directory creation for reports

* properly pass reports

* update templating and increase verbosity of errors

* add todo

* add detail table

* update sorting

* add test and improve error message

* fix error message in test

* extend tests

* enhance tests

* enhance versioning behavior accoring to #1846

* create markdown overview report

* small fix

* fix small issue

* make sure that report directory exists

* align reporting directory with default directory from UA

* add missing comments

* add policy check incl. tests

* enhance logging and tests

* update versioning to allow custom version usage properly

* fix report paths and golang image

* update styling of md

* update test
2021-02-10 16:18:00 +01:00
Christian Luttenberger
e9a93ed384
Adding new step for abap Enviroment Assembly Confirm (#2586)
* Adding new abap Assembly Confirm

* Update abapEnvironmentAssembleConfirm.go

* Add generated objects

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2021-02-10 11:33:10 +01:00
Peter Persiel
8c030784e1
Change technical s-user to technical communication user (#2581)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-02-09 13:56:49 +01:00
Peter Persiel
b3b3dd7b5d
Software component name with maximum of 30 characters (#2588) 2021-02-09 13:35:32 +01:00
Christopher Fenner
5184a76453
chore(http): allow to send prepared requests (#2580)
* Update http.go

* fix c&p issue

* convert URL to string

* Apply suggestions from code review

fix code climate findings

* add test case
2021-02-08 14:26:15 +01:00
Oliver Nocon
f2f5dbecb8
feat(versioning): add re-use function for proper Scan versioning (#2544)
* feat(versioning): add re-use function for proper Scan versioning

addresses #1846

* add missing comment

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-02-08 12:18:36 +01:00
lndrschlz
5f053d1c32
fix(uiVeri5): update documentation for more explicit deprecation notes (#2568)
* use strings.Join() for string slice

* add explanaiton to script passing in extensions

* add note about groovy templating

* remove single quotes from seleniumAddress default

* updated documentation

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-02-05 16:04:52 +01:00
Marcus Holl
0b9dd80008
Provide getters for stdout, stderr on ShellRunner, ExecRunner (#1787)
* Provide getters for stdout, stderr on ShellRunner, ExecRunner

we need that in order to set the streams back in case we have to scan the command
output ourselvs during some function calls.
2021-02-05 10:54:38 +01:00
Mayur Belur Mohan
538256774a
IntegrationArtifactGetServiceEndpoint Command (#2582)
* GetIntegrationArtifactServiceEndpoint Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-02-05 10:35:55 +01:00
Marcus Holl
3a49bcafc9
print version of cf cli (#2577) 2021-02-05 08:24:41 +01:00
Daniel Mieg
d23e26f87f
Revert "Parallel test processing for abaputils (#2570)" (#2578)
This reverts commit e6086ad4a7.
2021-02-04 15:19:42 +01:00
Christopher Fenner
9ec282fd0c
test: allow usage of httpmock in tests (#2576)
* add test case

* add flag for default transport

* Update go.mod

* Update go.sum

* fix spaces

* fix format

* Update http_test.go

* Update http_test.go

* Update http_test.go

* Update http_test.go

* Update http_test.go
2021-02-04 14:58:35 +01:00
Mayur Belur Mohan
426c106765
IntegrationArtifactGetMplStatus Command (#2558)
* IntegrationArtifactGetMplStatus Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-02-04 10:50:15 +01:00
Marcus Holl
3ebc21b5cb
provide alias for transport request upload cts (#2551)
* provide alias for transportRequestUploadCTS

* re-generate after metadata update
2021-02-04 10:09:20 +01:00
Stephan Aßmus
d41d7bfbac
Force WS Project update for mvn plugin (#2575)
In case of policy violations, the scan is failed and default behavior is to not update the project in the WS system.
See docs at https://whitesource.atlassian.net/wiki/spaces/WD/pages/33914890/Maven+Plugin.
Since this is inconvenient and we also changed the behavior already for NPM, we force the update.
2021-02-04 09:17:48 +01:00
Srinikitha Kondreddy
1b16de0734
Remove handle pipeline step errors from groovy glue code (#2573) 2021-02-04 08:54:00 +01:00
Daniel Mieg
e6086ad4a7
Parallel test processing for abaputils (#2570)
* add parallel test processing

* Add more t.Parallel

* add parallel to run

* Remove obsolete parallel statements
2021-02-03 17:31:49 +01:00
Oliver Nocon
a104b2a06d
feat(whitesourceExecuteScan): UA for all build tools, e.g. maven & npm (#2501)
* feat(whitesource): add config helper

this helps to ease & enforce config settings

* fix accidential change of class

* add todos wrt java download

* use existing scanOptions, add option to download jre

* update generation

* fix generation

* allow running UA via go library

* correct image, improve logging

* add removal of downloaded JVM

* update java creation and deletion

* refactor and add log output

* remove obsolete ToDo

* increase test coverage

* increase test coverage

* adding aliases and tests

* make go modules as default

* maven: update behavior of projectNaming

* add Docker capabilities

* correct parameter name

* retrieve Docker coordinates

* docker coordinates only to provide artifact

* add ToDos

* add mta capability

* add aliases, mvn arguments for settings

* clean up groovy part

* update defaults

* add container for pip

* add defaults, add maven specifics, ...

* properly download settings

* maven: check existence of excluded files

* fix reporting

* Update CommonStepsTest.groovy

* update comment

* fix CodeClimate finding

* add tests for pip & fix minor issues

* fix order of pip build descriptors

* update pip container options

* fix pip virtualEnv parameter

* update report permissions

* fix test

* update container options

* add use fileUtils to load properties file

* update parameter description

* adding Docker scanning defaults

* clean up configHelper

* consider also npm tool cache

* add todos
2021-02-03 14:52:48 +01:00
Giridhar Shenoy
2b56e8594e
fix(detect): Scanonchanges : bug fix for escaping spaces in parameters (#2561)
* changes to detectExec before master merge

* changes for detectExecuteScan

* self generated code added

* fix syntax errors and update docu

* added unit tests for fail and Group

* fix failOn bug

* add Groups as string array

* add Groups as string array

* tests and validation for groups, failOn

* Updated docs and added more tests

* documentation md files should not be changed

* Handle merge conflicts from PR 1845

* fix merge errors

* remove duplicate groups, merge error

* adding buildCode and buildTool as params

* switching build options

* building maven modules

* parameter correction

* parameter correction

* gnerate with new build parameter

* adding comments

* removing piper lib master and modifying goUtils to download 1.5.7 release

* first cleaning then installing

* multi module maven built

* multi module maven built removing unwanted code

* multi module maven built moving inside switch

* testing

* modifying the default use case to also call maven build

* modifying the default use case to also call maven build wih --

* corrected maven build command

* corrected maven build command with %v

* skipping test runs

* testing for MTA project with single pom

* adding absolute path to m2 path

* clean up

* adding switch for mta and maven and removing env from containers

* commiting changes for new detect step

* correting log message

* code clean up

* unit tests changes to detectExecute

* basic tests for new change

* restoring piperGoUtils to download correct piper binary

* code clean up

* code clean up

* clean detect code

* add the the scanOnChanges parameter to detect

* fix codeclimate issue

* updated detect.yaml

* bug fix for parameters with quoting spaces

* add additional test case

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-02-02 15:43:12 +01:00
Oliver Nocon
b7754437b3
new step to create a scan summary report (#2559)
* new step to create a scan summary report

* add flag to collect only failed reports

* add stepName to report
2021-02-02 14:36:40 +01:00
Marcus Holl
f0828ad5e5
Find label in log range (#2461)
* LogRange provide git log ref1..ref2

This we need for checking inside the commit range
for transportRequestIds and changeDocumentIDs in the
body of the commit message.
2021-02-01 11:54:30 +01:00
Daniel Mieg
2ee4a47d05
Add commitID to Add-on Doku (#2565) 2021-02-01 11:27:06 +01:00
Marcus Holl
1f34b135da
LogRange provide git log ref1..ref2 (#2440)
* LogRange provide git log ref1..ref2

This we need for checking inside the commit range
for transportRequestIds and changeDocumentIDs in the
body of the commit message.
2021-01-29 12:36:15 +01:00
Daniel Mieg
05b51d3e82
use compatible cf-cli (#2556) 2021-01-29 12:11:25 +01:00
Marcus Holl
c74b99d2c7
Helper for removing duplicates from a string slice (#2455) 2021-01-29 10:52:58 +01:00
Giridhar Shenoy
d3f31acc9f
feat(detect): Scanonchanges : Parameter to reduce scan running time and load on BlackDuck server (#2538)
* changes to detectExec before master merge

* changes for detectExecuteScan

* self generated code added

* fix syntax errors and update docu

* added unit tests for fail and Group

* fix failOn bug

* add Groups as string array

* add Groups as string array

* tests and validation for groups, failOn

* Updated docs and added more tests

* documentation md files should not be changed

* Handle merge conflicts from PR 1845

* fix merge errors

* remove duplicate groups, merge error

* adding buildCode and buildTool as params

* switching build options

* building maven modules

* parameter correction

* parameter correction

* gnerate with new build parameter

* adding comments

* removing piper lib master and modifying goUtils to download 1.5.7 release

* first cleaning then installing

* multi module maven built

* multi module maven built removing unwanted code

* multi module maven built moving inside switch

* testing

* modifying the default use case to also call maven build

* modifying the default use case to also call maven build wih --

* corrected maven build command

* corrected maven build command with %v

* skipping test runs

* testing for MTA project with single pom

* adding absolute path to m2 path

* clean up

* adding switch for mta and maven and removing env from containers

* commiting changes for new detect step

* correting log message

* code clean up

* unit tests changes to detectExecute

* basic tests for new change

* restoring piperGoUtils to download correct piper binary

* code clean up

* code clean up

* clean detect code

* add the the scanOnChanges parameter to detect

* fix codeclimate issue

* updated detect.yaml

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-29 10:17:02 +01:00
Mayur Belur Mohan
0ed5cce53a
IntegrationArtifactUpdateConfiguration Command (#2542)
* IntegrationArtifactUpdateConfiguration Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-01-29 09:46:47 +01:00
Dominik Lendle
1c140e7cb4
extend ATC result structure & logs (#2548)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-01-28 13:06:13 +01:00
lndrschlz
e60bdb94a6
feat(uiVeri5): golang implmementation for uiVeri5ExecuteTests (#2394)
* added uiVeri5ExecuteTests step files

* added confPath an regenerated step

* added test for uiVeri5ExecuteTests

* config modified

* added groovy wrapper

* ambiguous method fixed

* uiveri5 wrapper

* removed install command

* fixed defaults

* added testOptions as confPath arg

* test set env

* test npm install local

* changed env settings

* tests regenerated

* go generate

* fix code climate

* overwrite groovy step

* remove groovy wrapper go

* unstash piper bin

* test older node version

* test piperExecuteBin

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* refactored params

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* set testServerUrl as os env for uiveri5

* Update config.yml

* fix naming of testServerUrl param

* wip

* refactored setEnv and fixed tests

* wip

* step param for NPM_CONFIG_PREFIX

* fix runCommand

* refactored step param, regenerate, docu, fix tests

* fix groovy wrapper test

* cleanup

* add to CommonStepsTest field whitelist

* fixed default pipeline environment vars

* fix []string default

* fix metadata.go bug

* added test for docu metadata gen

* fix metadata_test.go in doc gen

* Update metadata_generated.go

* Update metadata_generated.go

* remove npm config prefix param; doc fix

* remove tab

* changed npm config prefix

* removed groovy wrapper test

* removed groovy step defaults

* modify path variable

* modified npm config prefix

* fix error wrapper and tests

* doc update

* add testRepository support

* wip

* fix testRepository param

* wip

* add utils

* init stash content

* wip

* wip

* wip

* add comment for deprecated parameters

* fixed commonStepTest

* fixed commonStepTest

* added error category for testOptions failure

* Update vars/uiVeri5ExecuteTests.groovy

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* Update vars/uiVeri5ExecuteTests.groovy

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* fix condition

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-28 11:31:24 +01:00
Oliver Nocon
44788f1d3a
fix(config): properly read non-string parameters from environment (#2549) 2021-01-28 11:09:43 +01:00
Daniel Mieg
50ba60f078
Docu improvements (#2547)
* Add line breaks

* Introduce line breaks
2021-01-27 18:24:21 +01:00
Daniel Mieg
cf69206a58
Docu updates (#2545)
* Docu updates

* Remove empty lines

* Add quotes

* Change to list
2021-01-27 17:18:28 +01:00
Kevin Stiehl
9ad0dec224
add access_token alias to all gh secrets (#2543) 2021-01-27 12:58:47 +01:00
Thorsten Duda
35c2eeaa5b
Temporary fix ppiper/cf-cli version (#2541)
* Temporary fix ppiper/cf-cli version

* update unit tests
2021-01-27 10:52:40 +01:00
Dominik Lendle
52722c298a
Bug Fixes for abaputils class + unit tests (#2525)
* Bug Fixes

* remove command.Command

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-01-26 20:23:59 +01:00
Jesse Awan
ea203a2c69
fix(protecode): handle sha256 in upload artifacts (#2532)
* add sha256 check to protecodeExecuteScan

* remove trailing spaces

* add Unit-Test for getTarName

* Apply suggestions from code review

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-26 09:59:10 +01:00
Srinikitha Kondreddy
efe3ab36f8
Support for secretfile type neo credential for deployment (#2537)
* Use Oauth bearer token credentials to deploy to neo

* Add test case

* Add test file

* Fix code climate issues

* Add code review changes
2021-01-26 09:29:44 +01:00
Marcus Holl
ee7279c8fc
Add helper for finding uninitialized config (#2534)
Add helper for finding uninitialized config
2021-01-25 12:58:43 +01:00
Oliver Nocon
7bdbed3d65
feat: provide reporting re-use package (#2536)
* initial version of reporting

* added tests

* Update reporting.go
2021-01-25 11:09:03 +01:00
Mayur Belur Mohan
fe72b295d6
IntegrationArtifactDeploy Command (#2526)
* UpdateIntegrationArtifactConfiguration Command

* Fixes for codeclimate Check

* CommonStepsTest changes

* CodeReview Changes

* Git Patch

* Git Patch undo

* Code Review Comments

* code review fixes

* improve the error handling

* codeclimate fixes

* remove json parsing

* Error handling changes

* TestCase coverage fixes

* Refactoring Commands

* IntegrationArtifactDeploy Command

* Regenerate metadata_generated

* codereview fixes

* Code Review Fixes

* Code Review Fixes

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-01-22 15:55:50 +01:00
Sven Merk
3e0a2835fd
Improve HTTP test to cover more retry capabilities (#2528)
* FF disable fulltextsearch

# Conflicts:
#	pkg/fortify/fortify.go
#	pkg/fortify/fortify_test.go

* Improve test on HTTP retry capabilities

* Improve HTTP retry test
2021-01-22 09:56:56 +01:00
Sven Merk
f149292374
[fix]fortifyExecuteScan: disable fulltextsearch (#2527)
* FF disable fulltextsearch

# Conflicts:
#	pkg/fortify/fortify.go
#	pkg/fortify/fortify_test.go

* Completely avoid interacting with fulltextsearch

* Remove also from version lookup
2021-01-21 16:20:46 +01:00
Giridhar Shenoy
205bbc1bed
fix(detect): scan paths to better handle signature scan and dependency scan paths (#2508)
* changes to detectExec before master merge

* changes for detectExecuteScan

* self generated code added

* fix syntax errors and update docu

* added unit tests for fail and Group

* fix failOn bug

* add Groups as string array

* add Groups as string array

* tests and validation for groups, failOn

* Updated docs and added more tests

* documentation md files should not be changed

* Handle merge conflicts from PR 1845

* fix merge errors

* remove duplicate groups, merge error

* adding buildCode and buildTool as params

* switching build options

* building maven modules

* parameter correction

* parameter correction

* gnerate with new build parameter

* adding comments

* removing piper lib master and modifying goUtils to download 1.5.7 release

* first cleaning then installing

* multi module maven built

* multi module maven built removing unwanted code

* multi module maven built moving inside switch

* testing

* modifying the default use case to also call maven build

* modifying the default use case to also call maven build wih --

* corrected maven build command

* corrected maven build command with %v

* skipping test runs

* testing for MTA project with single pom

* adding absolute path to m2 path

* clean up

* adding switch for mta and maven and removing env from containers

* commiting changes for new detect step

* correting log message

* code clean up

* unit tests changes to detectExecute

* basic tests for new change

* restoring piperGoUtils to download correct piper binary

* code clean up

* code clean up

* revert to clean version

* add unmap parameter to detect

* Added Additional parameters for BlackDuck scan

* Added detect tools paramater

* fix detect.yaml to accept correct data type

* fix codeclimate issue in detect.yaml

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-21 14:57:00 +01:00