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

596 Commits

Author SHA1 Message Date
pkrasnousov
e9464b2594
feat(whitesourcescan): add param workDir to whitesourcescan (#2791)
* Add dir to whitesource scan

* Add default for "dir" option

* Change param name to workDir

* Change param name WorkDir to ScanPath

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-05-03 10:53:16 +02:00
Mayur Belur Mohan
05973a8fcd
Help document fixes (#2793)
* byte code Fix

* Help Url Fixes

* Yaml Changes

* Error Message changes

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-04-30 09:43:25 +02:00
Mikalai Dzemidzenka
b82ecb0ff7
convert batsExecuteTests to go implementation (#2737)
* convert batsExecuteTests to go implementation

* added additional test cases, added container definition to batsExecuteTests.yaml

* added influx, for junit added container definition

* added parameter envVars

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-04-29 16:50:23 +02:00
Dominik Lendle
b37f356eac
Docu changes for ATC step (#2792)
* Docu changes

* Linting changes

* Formatting changes

* Remove trailing spaces

* Add extensibility page to index
2021-04-29 15:47:11 +02:00
Roland Stengel
478a73f8f3
Add documentation for transportRequestUploadSOLMAN (#2754) 2021-04-22 09:40:26 +02:00
Dominik Lendle
9168757810
Add Html output to ATC step (#2761)
* Adding HTML Output

* testing

* testing

* change logging

* change logging

* change logging

* Refactoring

* Add metadata to HTML file

* Change parameter name from sendEmail to generateHTML

* Add sorting and test

* Increasing sorting performance
2021-04-21 20:13:02 +02:00
Andre
e5dcc21bad
feat(mta): update MBT build tool to latest release 1.1.1 (#2777) 2021-04-21 14:01:03 +02:00
Fabian Reh
44ca6db57c
Fix checkmarx execute scan (#2765)
* Remove error check on preset conversion

Signed-off-by: Fabian Reh <fabian.reh@sap.com>
2021-04-19 10:15:07 +02:00
Christopher Fenner
5b4b5518c8
fix(karma): provide env parameters for port and host name (#2763)
* add env vars for piper-karma-config

* update generated code
2021-04-16 15:18:34 +02:00
Andre
559bcd1ef2
fix(whitesource) use mta image without npm.sap.com (#2760)
* fix npm.sap.com issue

* use latest

* go generate

* use fixed version 1.0.16.1

* mbt version for tests also changed
2021-04-16 13:40:10 +02:00
Christopher Fenner
b531c2a017
docs(whitesource): correct description (#2762)
* Correct description

* update generated code
2021-04-15 19:15:59 +02:00
Mikalai Dzemidzenka
61f4c5245a
feat(karma): migrate karmaExecuteTests to go implementation (#2695)
* convert karmaExecuteTests to go implementation

* removed KarmaExecuteTestsTest.groovy

* added KarmaExecuteTests to fieldRelatedWhiteList

* Update vars/karmaExecuteTests.groovy

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

* Update resources/metadata/karmaExecuteTests.yaml

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

* Update resources/metadata/karmaExecuteTests.yaml

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

* added reference seleniumHubCredentialsId to yaml file, fixed modules code

* karmaExecuteTests.yaml renamed to karma.yaml

Co-authored-by: lndrschlz <leander.schulz01@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-04-15 13:58:23 +02:00
Oliver Nocon
d04a7c2eb3
feat(pipelineCreateScanSummary) Create groovy wrapper (#2743)
* feat(pipelineCreateScanSummary) Create groovy wrapper

* add command to binary

* stash step reports

* update stash

* fix typo

* unstash reports first

* update reporting

* update json reporting

* update tests & enhance logging

* update md report

* update md reporting

* fix rendering

* update tests
2021-04-15 07:45:06 +02:00
Daniel Mieg
3c9f993101
Fix step not showing error status (#2758)
* Expose error to step

* Adapt to codeclimate
2021-04-14 09:31:50 +02:00
lndrschlz
b8e9201df5
feat(vault): provide test credentials from vault in every piper go step (#2715)
* added support for test credentials
Co-authored-by: Kevin Stiehl <kevin.stiehl@numericas.de>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-04-09 10:04:35 +02:00
Giridhar Shenoy
eec0ebb235
fix(detect): bug fix for codelocation not picking the right location (#2745)
* 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 version

* Changes for detect codelocation

* remove unmap from scanProperties

* fix/add unit tests for remove unmap

* handle spaces in scanProperties

* update default scanproperties to remove deprecations

* Set default scanonchange to true

* handle multiple unmap true params

* add custom env variables

* fix codeclimate issues

* Update resources/metadata/detect.yaml

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

* Update resources/metadata/detect.yaml

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

* update generated files from yaml

* bug fix - revert code location changes

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-04-08 11:04:49 +02:00
Fabian Reh
9f55c4360d
Fix checkmarx execute scan (#2747)
* Fixes infinite recursion

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds test for infinite recursion

Signed-off-by: Fabian Reh <fabian.reh@sap.com>
2021-04-08 09:16:47 +02:00
Fabian Reh
bb62252600
Refactor(checkmarxExecuteScan): filterFileGlob (#2490)
* * Fixes filterFileGlob as it did not evaluate all patterns
* Adapts unit tests to cover all functionality

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* * Fixes comment

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* * Adds tests for error cases
* Adds mock utils to mock external calls for errors

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* * Adds test for os.Open

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Cleans code

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Makes test OS independent

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Makes TestFilterFileGlob run in parallel

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Marks all tests to run in parallel

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Add tests and error handling for string conversion and zip file

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Add tests and error handling for write file

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Add tests and error handling for write file

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Add tests and error handling for PathMatch

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Refactor zipFolder method to reduce complexity

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* simplify parameters

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Revert "simplify parameters"

This reverts commit 0bfc582808.

* Revert "Revert "simplify parameters""

This reverts commit 102633cf2d.

* Extract getWorkspace to reduce parameters

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adapts tests to new error handling of 0 files zip

Only logs error for 0 files zip if no other errors appeared

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Extract method to reduce complexity

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* rename method

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* remove method needing many parameters

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* remove strconv api

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* remove project variable as project is created in this method

Signed-off-by: Fabian Reh <fabian.reh@sap.com>
2021-04-08 07:05:37 +02:00
Sven Merk
8c6089cca9
checkmarxExecuteScan: Fix error message on empty ZIP (#2709)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-04-07 09:56:19 +02:00
Giridhar Shenoy
97b3a23336
HotFix detectExecuteScan: Use environment variables to get supported version of detect (#2738)
* 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 version

* Changes for detect codelocation

* remove unmap from scanProperties

* fix/add unit tests for remove unmap

* handle spaces in scanProperties

* update default scanproperties to remove deprecations

* Set default scanonchange to true

* handle multiple unmap true params

* add custom env variables

* fix codeclimate issues

* Update resources/metadata/detect.yaml

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

* Update resources/metadata/detect.yaml

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

* update generated files from yaml

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-04-01 11:24:25 +02:00
Oliver Nocon
d59864530a
feat(kaniko) allow Docker config to be passed via cpe (#2734)
* feat(kaniko) allow Docker config to be passed via cpe

* update generated files
2021-04-01 09:47:24 +02:00
Giridhar Shenoy
6805654cdb
detectExecuteScan : Default to scanOnChanges to true, reduce load on the server (#2733)
* 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 version

* Changes for detect codelocation

* remove unmap from scanProperties

* fix/add unit tests for remove unmap

* handle spaces in scanProperties

* update default scanproperties to remove deprecations

* Set default scanonchange to true

* handle multiple unmap true params

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-31 10:53:49 +02:00
lndrschlz
c303616fee
fix(newmanExecute): extend error categorization (#2705)
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-03-31 10:09:27 +02:00
Kevin Stiehl
fe6ea643fa
Add terraformExecuteStep (#2679)
* Add terraformExectueStep

* Update terraformExecute.go

* fmt

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-29 16:22:23 +02:00
Giridhar Shenoy
03f46ef90c
DetectExecuteScan : Codelocations autodetermined by detect script (#2704)
* 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 version

* Changes for detect codelocation

* remove unmap from scanProperties

* fix/add unit tests for remove unmap

* handle spaces in scanProperties

* update default scanproperties to remove deprecations

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-26 13:06:13 +01:00
Srinikitha Kondreddy
95ebfb3b2f
Make cert updates optional based on param value (#2722) 2021-03-25 15:32:10 +01:00
Srinikitha Kondreddy
24dd9b5cec
Set some params optional for deployTool: kubectl (#2708)
* Set some params optional for deployTool: kubectl

* Add test case

* Add test case for code coverrge

* Add code review changes

* Code review changes
2021-03-25 12:26:44 +01:00
Sven Merk
03b5a9aaec
Fix handling of undefined buildTool values (#2719)
* Fix handling of undefined buildTool values

* Fix fmt
2021-03-25 09:59:49 +01:00
Siarhei Pazdniakou
33699c7388
Convert containerExecuteStructureTests to go implementation (#2701)
* Converted containerExecuteStructureTests to go implementation

* Added tests

* Fixed issues

* Made fixes

Co-authored-by: lndrschlz <leander.schulz01@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-25 08:18:30 +01:00
Sven Merk
dfe9cb6149
Add capability for yarn scanning (#2716)
* Add capability for yarn scanning

* Update whitesource.yaml

* Update configHelper.go

* Add newly generated impl
2021-03-24 16:33:32 +01:00
Oliver Nocon
c038a3b08a
fix(whitesourceExecuteScan) properly pass verbose setting (#2713)
* fix(whitesourceExecuteScan) properly pass verbose setting

* check within piper binary

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-03-23 12:06:23 +01:00
Roland Stengel
101e8ec784
TransportRequest: add UploadSOLMAN groovy step (#2688)
* TransportRequest: add UploadSOLMAN groovy step
- groovy to go
- use docker image in go
- map credentials in go
- generated yaml
2021-03-22 11:53:37 +01:00
Oliver Nocon
2b11c09a8c
feat(githubCreateIssue): allow content via file (#2557) 2021-03-19 13:04:30 +01:00
Oliver Nocon
9b6a8cb3b6
feat(whitesource): create json report (#2699)
* feat(withesource): create json report

* proper constant value

* update generation
2021-03-19 11:10:08 +01:00
Oliver Nocon
2048c00d2c
whitesource: use only Unified Agent for scanning (#2707)
don't use native build-tool specific plugins any longer.
They have been deprecated by WhiteSource mid 2019 already.

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-03-19 09:58:24 +01:00
Roland Stengel
d79295a30f
add common pipeline environment persistency to solman upload (#2659)
* add common pipeline environment
- cpe/custom/ChangeDocumentId
- cpe/custom/TransportRequestId
- rename tests: prefix TestTrSolman allows to easily process
  subset.
2021-03-19 08:58:20 +01:00
Sven Merk
d52a1a3619
Influx step execution reporting (#2700)
* Influx step execution reporting

* influx for newmanExecute added

Co-authored-by: lndrschlz <leander.schulz01@sap.com>
2021-03-18 10:32:03 +01:00
lndrschlz
dea96a3ba0
feat(newmanExecute): golang implmementation for newmanExecute (#2513)
* Automates first parts of newmanExecute.groovy

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds newman installation

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Removes warning

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* makes tests robust for later shell calls

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds version logging

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds tests for version logging

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds newman shell execution

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Prepare cloud foundry apps with secrets handling

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds further process to CF Utils

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Fixes unit test

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds error category

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Add fix to execute step locally

Currently only tested on windows machine locally in powershell.

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adapt unit test to fix of runCommand

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* refactored golang step to newmanExecute

* wip

* added test config

* refactored newmanExecute groovy wrapper step

* exclude newmanExecute from common step test

* cleaups

* add credential support

* fix groovy credential providing

* add import

* add stageName

* define script

* remove unused vars

* add import

* fix iterator ref

* golang secret handling and cleanups

* wip

* wip

* wip

* update go step

* implement cf credential proposal

* testRepository functionality implemented

* register secrets to logger

* add missing dependecies

* test xsuaa credential handling

* wip

* wip

* cleanups

* add import

* remove mandatory params

* add container definition

* test runCommand

* test runCommand

* fix npm path

* fix npm path

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* added newmanEnvironment to templating

* wip

* use env and globals params in runCommand when no templating

* fix condition

* wip

* reverted config edit

* updated documentation

* install with shell

* wip

* wip

* fix tests

* refactor tests

* wip

* remove old test

* wip

* escape go tmpl

* escape go tmpl

* fix defaults

* add doc comment

* remove test case

* refactored newman commands

* add cli reporter

* refactor options

* mock os getenv and fix all tests

* refactoring and doc update

* go generate

* small refactor

* spelling

* fix newman doc

* remove MaskPasswords wrapper; fix stash bug;

* docu fix

Co-authored-by: Fabian Reh <fabian.reh@sap.com>
2021-03-17 08:08:33 +01:00
tiloKo
b04e3140de
SAP BTP ABAP Environment: addon build with supported Languages (#2689)
* first try

* fix unit test

* remove obsolete attributes
2021-03-15 20:24:43 +01:00
Daniel Mieg
0adca357da
remove warnings (#2698)
* remove warnings

* fix markdown
2021-03-15 10:49:42 +01: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
Christopher Fenner
4cabbca26e
docs(protecode): add description how to use fetch url for docker image (#2665)
* Update protecode.yaml

* update generated files

* update files

* fix typo
2021-03-12 09:58:21 +01:00
Mayur Belur Mohan
1b27805f64
IntegrationArtifact Cmd Fixes (#2628)
* IntegrationArtifact Cmd Fixes

* CodeClimate Fixes

* CodeClimate Fix

* integrationArtifactDownload Command Fix

* CodeClimate Fixes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview FIxes

* CodeReview Fixes

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-03-11 12:03:32 +01:00
tiloKo
b81b11ca9d
abapEnvironmentAssemblePackages new Features (#2661)
* Unit Test Assemble Package

* Remove obsolete lines

dust wiping

* climate change

* climate change #2

* climate change #3

* climate change #4

* climate change #5

* NSPC serial builds

* Actual Delivery Commit

* Download Delivery_logs.zip

* Publish Result

* Testing

* !Polling

* Provide Commit to BF only if set

* dust wiping

* More Dust to Wipe

* Publish more than on file

* Write Log for Publish

* fix unit test (now Dummy Entries)

* save one line of code for climate change

* Update cmd/abapEnvironmentAssemblePackages.go

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* More Detailed Log Messages

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-03-11 11:55:12 +01:00
Christopher Fenner
f999925788
fix(influx): correct data type of influx measurements (#2171)
* update data type of influx measurements

* Update checkmarx.yaml

* pick changes from #1885 for testing

* update generated code

* update to new datatype

* adjust to type changes

* change back to string type

* Update fortifyExecuteScan.go

* add typo to be backward compatible

* change type to int for files_scanned and lines_of_code_scanned

* add typo

* add measurements to whitesource

* update generated sources

* adjust test cases

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-10 16:00:53 +01:00
Louis Lecaroz
67ef1f21c7
nexusUpload parameters reading from commonPipelineEnvironment (#2658)
* nexusUpload parameters reading from commonPipelineEnvironment

* Cleaning code formatting

* Fixing go fmt issues

* Fixing go generate files

* Fixing codeclimate issue

* Fixing with PR feedback

* Fixing unit test failure due to changed error message

* Fixing codeclimate on punctuatin in error message

* Fixing typo error in error message

Co-authored-by: LECAROZ <louis.lecaroz@sap.com>
2021-03-10 15:06:42 +01:00
Kevin Stiehl
f2b0683880
add token revocation (#2686)
* add token revocation

* update mocks

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-10 08:36:50 +01:00
Sven Merk
e1ea56076f
Http improve retry on timeouts (#2681)
* Add sca cmd extensibility

* Fix formatting

* HTTP retry

* Improve handling of retry on timeout

* Go fmt

* Fix test

* Fix test

* Test stability

* Fix test

* Fix test

* Fix test

* Update fortifyExecuteScan.go
2021-03-09 13:41:07 +01:00
Sven Merk
afdc726a01
Fortify cmd parameters for scan (#2680)
* Add sca cmd extensibility

* Fix formatting
2021-03-09 13:16:21 +01:00
Oliver Nocon
c077cdd733
fix(whitesourceExecuteScan) get full list of projects (#2672)
* fix(whitesourceExecuteScan) get full list of projects

* update doc
2021-03-08 17:01:18 +01:00
Siarhei Pazdniakou
cc66b7cabd
Added createBOM parameter to the npmExecuteScripts step (#2642)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-04 10:16:59 +01:00
Sven Merk
84df77732c
fortifyExecuteScan: Pull request version not considered on upload (#2668) 2021-03-04 09:34:05 +01:00
Roland Stengel
cd8515acce
Go Unit Tests fail due to windows/linux file separator mismatch (#2662)
* Go Unit Tests fail due to windows/linux
file separator mismatch. See issue 2660.

* review results

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-03-03 22:58:29 +01:00
tiloKo
218a743fb1
abapEnvironmentAssemblePackages Unit Tests & Error Handling (#2654)
* Unit Test Assemble Package

* Remove obsolete lines

dust wiping

* climate change

* climate change #2

* climate change #3

* climate change #4

* climate change #5

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-03-01 13:51:44 +01:00
lndrschlz
4ca9186f39
fix(uiveri5ExecuteTests): add 'tests' stash to step yaml (#2641)
* add tests stash to uiveri5 step

* add stash to uiveri5

* extend step generator with input resources

* add step generator test
2021-03-01 13:03:42 +01:00
Sven Merk
d2eb2877e0
fortifyExecuteScan: Functional enhancements (#2647)
* Improvements

* Formatting

* Fix test

* Update resources/metadata/fortify.yaml

Enhance description

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>

* Unify version handling with ws step

* Part 2

* go fmt

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-02-26 13:43:03 +01:00
Daniel Mieg
3f8a1f141b
Update abapEnvironmentCloneGitRepo.go (#2656) 2021-02-26 09:27:22 +01:00
Nikolai Demidenko
eb87a2c976
Add createBOM parameter to the mavenBuild step (#2639)
* Add createBOM parameter to the mavenBuild step

* update generated files

* Update resources/metadata/mavenBuild.yaml

* Update resources/metadata/mavenBuild.yaml

* update generated mavenBuild

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-02-25 15:01:19 +01:00
Christopher Fenner
abc711299d
fix(sonar): disable measurements if no credentials are provided (#2653)
* disable if no credentials are provided

* exit early
2021-02-25 12:06:12 +01:00
Christopher Fenner
3875de8134
fix(sonar): use token provided by sonar-scanner-jenkins plugin (#2649) 2021-02-24 20:14:41 +01:00
Christopher Fenner
30baa31b90
fix(sonar): prevents step from contacting sonar API for legacy systems (#2648) 2021-02-24 18:05:04 +01:00
Christopher Fenner
cb3fa7c293
feat(sonar): add output of measurements (#2218)
* add sonarqube measurements

* fetch measurements from API

* add api for fetching issue counts

* add debug outputs

* add further severities

* log number of issues

* report failure

* expose method to send request

* Fixed what was broken.

* add debug output

* wip

* correct opaque property

* push client handling to apiClient.go

* use correct API URL

* correct log outputs

* remove logging

* remove option validation

* extend search options

* restructure

* rename api client file

* simplify client usage

* simplify issue client

* write sonar values to influx

* extract issue service

* reorder imports

* add sonar integration test

* allow unknown fields

* add test case

* add test case

* remove

* fix

* Update http.go

* Apply suggestions from code review

* Update cmd/sonarExecuteScan.go

* rework test cases

* use explicit returns

* add task service

* add waitfortask

* fix typo

* remove fixme

* expose poll interval

* rename test cases

* add test cases

* use newAPIClient method

* use waitForTask

* rename services

* finalize code

* handle error

* move defer

* move types

* add test case

* use http.status...

* add test case

* expose api endpoint names

* extract api client

* adjust test cases

* Update integration-tests-pr.yaml

* Update integration-tests.yaml

* improve require message

* Update integration-tests-pr.yaml

* Update integration-tests-pr.yaml
2021-02-24 15:44:23 +01:00
Christian Luttenberger
76c2a85c79
Adjustment assemblyConfirm Step - Check for package status (#2644)
* Add new pipeline step

* new pipeline stage

* Cleanup Test

* Adding new step to pipeline - stage publish

* Move from Publish to Build

* Adjusting documentation for move from publish to build

* Change Release with Confirm Step in Build Stage

* codeclimate

* Code Climate

* Code Climate spaces

* Adjusting for Check if package is released in AssemblyConfirm

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2021-02-24 12:45:10 +01:00
Christian Luttenberger
c8e9e44f23
New pipeline step assembly confirm (#2631)
* Add new pipeline step

* new pipeline stage

* Cleanup Test

* Adding new step to pipeline - stage publish

* Move from Publish to Build

* Adjusting documentation for move from publish to build

* Change Release with Confirm Step in Build Stage

* codeclimate

* Code Climate

* Code Climate spaces

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2021-02-23 11:11:52 +01:00
Marcus Holl
60feb3409f
solman upload go the step (#2522)
Upload content into a transport request via SOLMAN

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-02-19 13:07:18 +01:00
Mayur Belur Mohan
06afce3005
IntegrationArtifactUpload Command (#2610)
* IntegrationArtifactUpload Command
2021-02-17 09:59:56 +01:00
Daniel Mieg
484d9c2ec1
Increase cf-cli version for abap steps (#2613) 2021-02-16 18:03:29 +01:00
Marcus Holl
f74ebe0aa8
Fix alias for transport request upload cts (#2614)
* no duplicate alias key

* regenerate after metadata update
2021-02-16 15:31:15 +01:00
Roland Stengel
7cb4e30497
introduce plainOpen in pkg/git (#2602)
* move transportrequest plainOpen into pkg/git
* artifactPrepareVersion: use plainOpen from git utils
2021-02-15 12:34:19 +01:00
Daniel Mieg
cb3ad328f5
test (#2611) 2021-02-15 11:06:07 +01:00
Kevin Stiehl
ffffe8295e
(Vault) Improvements (#2439)
* vault improvements

* Update cloudFoundryDeploy.yaml

remove double PARAMETERS

* go generate

* fix type & resturcutre paragraph to a list

* remove non-existent secrets

* build trigger

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-02-15 09:48:51 +01:00
Marcus Holl
e90548d41d
Introduce checkChangeInDevelopment (#2504)
* Introduce checkChangeInDevelopment
2021-02-12 08:50:38 +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
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
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
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
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
Daniel Mieg
05b51d3e82
use compatible cf-cli (#2556) 2021-01-29 12:11:25 +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
Kevin Stiehl
9ad0dec224
add access_token alias to all gh secrets (#2543) 2021-01-27 12:58:47 +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
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
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
Marcus Holl
9e8e5da394
[refactoring] Make room for other upload action: move package (#2518)
* [refactoring] Make room for other upload action: move package

In the near future we will have more upload actions, like
SOLMAN, RFC. Here we prepare the package structure for that.

* don't use aliasing

* rename entities (no leading CTS)
2021-01-18 13:20:30 +01:00
Daniel Mieg
273012ddfc
Fix marshalling a boolean (#2521) 2021-01-18 11:14:55 +01:00
Marcus Holl
c8c1315d0c
transport request upload cts / the step (#2416)
fiori cts upload piper-go step
2021-01-13 16:14:56 +01:00
mayurmohan
f4469c3427
DeployIntegrationArtifact Command (#2474)
DeployIntegrationArtifact Command

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-01-12 12:17:42 +01:00
Marcus Holl
65d22eb42a
Mta extension credentials handling (#2430)
Mta extension credentials handling

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2021-01-12 09:39:04 +01:00
Oliver Nocon
ab3362849a
feat(kubernetesDeploy): allow disabling --force (#2495)
fixes #1731
2021-01-07 16:52:16 +01:00
Marcus Holl
6d5a30683b
[refactor] Relocate npmExecutorMock so that it can be used from pkg (#2472)
From the current location inside "cmd" the npmExecutorMock cannot
be used from any coding inside "pkg".

When we would like to re-use the npm functionality we have also to
provide tests and this requires having a mock.

In order to be able to use the mock from pkg we move the mock from
"cmd" to "pkg" into package "npm".

With the shift from package "cmd" to "npm" a lot of fields in the mock
has been made public.
2021-01-04 12:46:14 +01:00
Oliver Nocon
59f32cf042
feature(vault) retrieve github token from Vault (#2484) 2020-12-22 17:57:11 +01:00
Oliver Nocon
4bd155d1ed
feature(protecodeExecuteScan) proper Vault support (#2483) 2020-12-22 17:43:57 +01:00
Fabian Reh
d8d4f83fb4
Unit test enhancement (#2471)
* Fixes parallelization in generated code

* Fixes test_code_generated.golden

* generate go code

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-12-22 09:30:54 +01:00
Oliver Nocon
7de42230e0
add step to create a GitHub issue (#2481)
* add step to create a GirHub issue

* add groovy library step

* Update githubcreateissue.yaml

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-12-21 17:13:16 +01:00
Oliver Nocon
cf7ca8f791
add step to create a GitHub comment (#2479)
* add step to create a GitHub comment

* add docs

* mandatory parameters

* add command

* Update githubCommentIssue.go

* add groovy library step

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-12-21 16:21:07 +01:00
Stephan Aßmus
cb069148d2
WS: Provide missing aliases (#2485) 2020-12-21 13:16:38 +01:00
tiloKo
dbef910e83
Update abapAddonAssemblyKitCheckPV.go (#2468)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-12-16 11:19:48 +01:00
Daniel Mieg
a3ff90f632
Fix: Change URL creation for abapEnvironmentCloneGitRepo (#2452)
* Fix url creation

* Adapt url creation
2020-12-08 09:31:08 +01:00
Kevin Stiehl
7d275b3ec3
fix(cloudfoundry): fetch credentials from vault (#2444) 2020-12-03 18:30:32 +01:00
Daniel Mieg
518d2fe88d
Add parent_saas_appname (#2434) 2020-11-30 10:50:43 +01:00
Daniel Kurzynski
c09c5e1ef0
Fix workingDir for mta whitesource scan (#2431)
* Update whitesource.yaml

* Generate and format
2020-11-27 11:39:21 +01:00
tiloKo
080cb025a4
AAKaaS upload in chunks (#2422)
* Upload in Chunks

* fix unit tests for file upload in chunks

* upload in chunks review round 1

* Upload in Chunks - review round 2 - comments

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-26 13:45:51 +01:00
Daniel Kurzynski
d952cb89d6
Add docker image for whitesource and mta (#2374) 2020-11-26 10:45:47 +01:00
Sven Merk
5d1782aa01
checkmarxExecuteScan: adapt to 9.2 api (#2363)
* Update checkmarxExecuteScan.go

* api mods

* Switch default

* Fix decode

* mod marshalling

* Fix unmarshalling

* Code fmt and small fix

* Optimize preset handling

* Integer handling

* Fix test

* cleanup

* go fmt

* Improve test
2020-11-25 13:47:26 +01:00
Michael
fd0e8d4c9f
[typo] relese -> release (#2420) 2020-11-25 13:35:37 +01:00
lndrschlz
b9bab27833
feat: expose complete step metadata through generated function (#2329)
* exposing step metadata through generator

* add metadata_generated.go

* fix step go test generation

* metadata fields added to generated files

* added generated files

* removed image placeholder from fortify step

* refactored step meta generation

* go generate

* fixed metadata generator and tests

* added output resource fields/tags to metadata generator

* fix string in metadata_generated

* go generate

* fixed generator

* go generate

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-20 08:13:59 +01:00
Dominik Lendle
a7994515f6
remove excess logging in abapEnvironmentPullGitRepo step (#2392)
* remove excess logging

* correct logging behaviour
2020-11-18 11:18:06 +01:00
Kevin Stiehl
dfab156427
Feature/approle secret id rotation (#2311)
* add new step vault secret

* add debug log

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-17 13:49:31 +01:00
Dominik Lendle
948b90b35a
catch error in ATC step (#2380)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-17 11:18:16 +01:00
tiloKo
109f5cd1bf
Wait between posts (#2355)
* Update abapEnvironmentAssemblePackages.go

* Save 6 Seconds in Unit Tests

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-17 10:26:15 +01:00
Christopher Fenner
81c8553d6a
refactor(hadolint): implement step in GO (#1169)
* initial commit of yaml file

* initial commit for HaDoLint in GO

* add helper function to load file from url

* load config file

* write report information to disk

* comment the code

* refactor groovy code

* remove download function from FileUtils

* use http.Downloader

* rename step files

* update generated files

* update generated files

* remove duplicate commands

* add credentials for config url

* add generated test file

* reuse piperExecuteBin functions

* correct step name

* update go step

* deactivate test

* fix import

* use differing go step name

* rename step

* correct result publishing

* correct command name

* expose tls insecure flag

* hand through error

* disable tls verification

* fix tls disabling

* use credentials

* mow

* reformat

* add qgate only if set

* correct report name

* remove old defaults

* add qgate to defaults

* handle report name

* restore default

* remove unused step config

* use piperExecuteBin

* remove obsolete type

* add test cases

* remove groovy tests

* move client parameter handling to run function

* use custom interfaces and mockery

* remove commented code

* correct struct names

* rename parameter dockerfile

* add further asserts

* cleanup

* change file permission to read/write

* remove tokenize

* add further comments

* init http client only if necessary

* add todo

* Revert "rename parameter dockerfile"

This reverts commit 2a570685b8.

* add alias for dockerfile parameter

* correct test case

* Apply suggestions from code review

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

* add comment about mock assertions

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-16 15:14:54 +01:00
Christopher Fenner
e8c74a4867
chore(sonar): set proper error categories (#2358)
* expose GetExitCode

* set error category for user issues

* fix typo

* Update command.go

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-16 14:54:22 +01:00
tiloKo
2a5514c116
AAK endpoint default (#2356)
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2020-11-16 13:40:57 +01:00
Kevin Stiehl
9cb605ba60
[Documentation ]fix checkmarx docs (#2372)
* fix checkmarx docs

* go generate

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-16 13:03:31 +01:00
shellmann
61c190bb2b
Install artifacts before Fortify scan (#2351)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-11-16 10:29:21 +01:00
Kevin Hudemann
83daa33e65
Update defaults for npmExecuteScripts and mavenExecuteIntegration to run install (#2369)
This change updates the defaults for npmExecuteScripts to run npm install and mavenExecuteIntegration to install all artifacts by default.
2020-11-13 13:01:02 +01:00
Christopher Fenner
fe58c3fed2
refactor: remove duplicate function from interface (#2359)
* remove duplicate function from interface

* remove import to net/http
2020-11-12 15:24:10 +01:00
Daniel Mieg
712c568087
Create groovy step for abapEnvironmentCreateSystem (#2303)
* Create groovy step

* add to pipeline

* add includeAddon

* Adapt docu

* Adapt groovy test

* adapt stage addonBuild

* add comma

* Add to docu

* Upper case spelling

* Update docu

* adapt docu
2020-11-11 17:08:24 +01:00
Stephan Aßmus
115cfb5bae
Run nexusUpload in stage Promote (#2349) 2020-11-11 16:32:23 +01:00
Marcus Holl
56586cae1b
Remove assert.Error right before assert.EqualError (#2344)
Is there any benefit from having

```
assert.Error(./.)
assert.EqualError(./.)
```

?

assert.Error ensures that we have an error.
assert.EqualError ensures that we have an error and
moreover it checks for a specific error. Hence
assert.EqualError does all and more what assert.Error
does.

In case there is a benefit from that pattern this PR should not be merged.
In case there is not benefit from that pattern  we should abandong that pattern.
2020-11-11 14:14:55 +01:00
Sven Merk
3c7712f2ee
Retry capabilities for HTTP requests + enablement for Checkmarx step (#2346) 2020-11-11 13:35:53 +01:00
Oliver Nocon
a70933bbd4
fortifyExecuteScan: improve error categorization (#2295)
* fortifyExecuteScan: improve error categorization

* reset error category in success case
2020-11-11 13:04:45 +01:00
Daniel Kurzynski
9a18489cc4
Refactor maven utils and add tests for install artifacts (#2318)
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-11-10 17:14:55 +01:00
Kevin Stiehl
9df9ec8ca4
(kubernetesDeploy) allow to keep a failed deployment (#2338)
* new 'keepFailedDeployments' parameter which removes the --atomic flag

* Update resources/metadata/kubernetesdeploy.yaml

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>

* go generate

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-10 15:43:19 +01:00
Fabian Reh
12d61bc287
Marks tests as parallizable (#2343)
* Makes tests properly parallelized

* Makes tests properly parallelized
2020-11-10 15:22:03 +01:00
Stephan Aßmus
eff38f6c9d
whitesourcExecuteScan-go: Additional fixes (#2315)
* Make sure the UA scan is known to the scan object. Fixes downloading reports later on.
* Move polling into pkg/whitesource, add test for e2e scan
* Remove conditions from stash config resource
* Don't use version stored in CPE. This will prevent the versioningModel from being applied.
2020-11-10 09:09:51 +01:00
Fabian Reh
bf39d2aacc
Enable parallel execution with reused mocks (#2331)
* Enables parallel execution and prevent reuse of file mock

* Fixes warnings

* Makes tests proper parallelized

* Update cmd/mavenExecuteIntegration_test.go

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

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-11-10 08:44:52 +01:00
Kevin Stiehl
0f48a229d2
(Vault) add vaultSecretFile References (#2314)
* add vaultSecretFile References

* add vaultRef to protecode

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-06 18:06:19 +01:00
Dominik Lendle
4441e22c93
Hotfix ATC Check Variant (#2317)
* Changes for Pull request optimization

* added documentaion

* Adapted documentation

* Adapted documentation

* Adapted documentation

* Adapted documentation

* Adapted documentation

* Added CFDeleteServiceKeys

* Added ServiceKey deletion tests

* added cfServiceKeys flag explanation to documentation

* removed trailing spaces from documentation

* resolving conflicts

* Changed deletion message an variable naming

* Changed tests

* Changed tests

* Changed tests

* Changed tests

* Changed CloudFoundryDeleteServiceOptions to options

* Changed CloudFoundryDeleteServiceOptions to options

* Minor changes

* Minor changes

* Changed variable naming

* Changed error handling

* Changed error handling and logging

* Changed documentation

* Simplified code

* Fixed CodeClimate issues

* Changed from returning err to nil where no errur returned needed

* Add cloudFoundryCreateServiceKey Go Step

* Changed Groovy File

* Changed aliases

* Removed unneccessary parts

* Minor changes

* Minor changes

* Adapted documentation

* Adapted tests

* Adapted Groovy File

* Changed Groovy file

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Removed Groovy Tests for cfCreateServiceKey

* Minor changes

* Added ATC Check YAML

* Added ATC Check generated files

* Added test class

* Added abapEnvironmentRunATCCheck

* Minor changes

* Minor changes

* Changed groovy

* Minor changes

* Changed groovy

* Changed groovy

* Minor changes

* Adapted Groovy imports

* Adapted Groovy imports

* Adapted Groovy imports

* Adapted Groovy

* Getting ATC results

* Changed error message

* changed groovy

* removed trailing spaces

* Added login check

* Minor changes

* Added step to whitelistScriptReference

* Added ATC error message handling

* Added groovy file

* Added step to groovy tests

* corrected metadata file

* Debugging

* Debugging

* Added yaml config parameter for ATC run

* Adapted file location of ATC run config to jenkins specific location

* Implementing universal pipeline logic for finding yaml config regardless of pipeline

* Changed error handling for reading config yaml file

* Changed atcrunconfig alias

* minor changes

* Minor changes

* Minor changes

* Changed back to dynamic file reading

* Minor changes

* filepath changes

* Removing CF Login

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Removed whitespaces

* Added CF functions unit tests

* Added invalid parameter handling

* Removed package and SC flag

* Minor changes

* Changed tests

* Changed tests

* Changed tests

* Minor changes

* Changed tests

* removed unnecessary logout

* Added documentation

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Removed trailing spaces

* Added newline at end of file

* code climate fixes

* code climate fixes

* code climate fixes

* Minor changes

* Minor changes

* Minor changes

* Changed tests

* Test changes

* Splitted Cloud Foundry functions into two classes

* Removed two steps from whtielistScriptReference

* removed atcrunConfig alias

* issue fixes

* Changed docu

* Changed docu

* Changed docu

* Removed trailing spaced from docu

* Changed docu

* Go generator run

* Issue fixes

* Remove unnecessary imports

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

* Update whitelistScript

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

* Adding piperutils for writing xml file

* Persisting ATC Results with piperutils

* Set failonMissingReports to true

* Refactoring for CodeClimate

* Changed result file name

* Changed credentials aliases

* changing secret name

* Removing trailing spaces

* Added secret name and alias to docu

* Add cloneGitRepo & checkoutBranch steps

* Tests added

* Docu added

* docu changes

* remark changes

* Class name changed

* minor changes

* Test added for prepare system stage

* Review changes

* Tests

* Step order tests

* Step order tests

* Step order tests

* Step order tests

* strategy parameter tests

* configHelper import added

* Default value for strategy added and remove pull config check

* corrected stage default

* Tests added

* changes in TestConfig

* Tests adapted for no prepare system stage

* tests changed

* changed tests

* input added

* changed tests

* changed tests

* changed tests

* commonPipeline removed

* add input register

* remove step key

* remove return

* remove comment

* correct method usage

* CodeClimate Fixes

* PR fixes

* addonBuild rename

* removed trailing spaces

* Add default checkvariant

* fix CodeClimate issues

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-11-05 10:00:51 +01:00
Kevin Hudemann
a04e53df2a
npmExecuteScripts: allow passing a list of build descriptors to execute scripts for (#2312)
This change extends the npmExecuteScripts step to support execution of
npm scripts for specific modules. Previously, it was not possible to
execute npm scripts only for specific modules. Now, if the parameter
buildDesriptorList is set the scripts defined by the runScripts
parameter will be executed for the modules defined by
buildDescriptorList. Note, in this case the buildDescriptorExcludeList
will be ignored.
2020-11-04 16:20:26 +01:00
Daniel Mieg
6d783d5a38
ATC Checks hotfix (#2313) 2020-11-04 12:33:31 +01:00
Fabian Reh
04599e97da
feat(Gitops): Gitops update deployment with helm (#2247)
* makes containerImage not mandatory

* Adds kubectl container

* Adds log statement to debug

* adds general to container image

* removes GENERAL again
Removes condition from Kubectl container

* removes workDir

* marks logs as debug

* adds workingdir again

* Adds author to commits

* Adds commit time now

* remove deprecated and reorder

* adds deprecated again to containerRegistryUrl
Adds GENERAL scope to containerImage

* updates generated file

* Renames containerImageNameTag

* adds else case

* adds debug log

* code cleanup

* adds debug log

* revert

* adds debug logs

* revert

* makes root path not hidden

* revert

* Read container properties

* Removes debug message

* Removes debug message

* Removes general scope again

* Fixes unit test

* Adds helm capabilities to the gitopsUpdateDeployment step

* Adds helm capabilities to gitopsUpdateDeployment step

* Removes condition from input field

* Adds test for invalid deploy tool

* Fixes typo

* Adds tests for git errors and file errors
Simplifies test setup

* Adds test for error on image name extraction

* fixes URL variable name

* adds workind directory to paths

* Refactors too long method

* Reverts refactoring method

* Adds repository name as parameter

* Adds glob method

* Test glob method

* Revert "Test glob method"

This reverts commit ac11b54c14.

* Revert "Adds glob method"

This reverts commit ddf47ddebe.

* Revert "Adds repository name as parameter"

This reverts commit 8fc471c909.

* Removes getWd

* Adds stash deployDescriptor

* removes = from paramters

* Revert "removes = from paramters"

This reverts commit 3ecb3665e2.

* Adds " around parameters

* adds logging of all files

* Updates helm to version 3.3.4

* Clean up debug logs

* Raise error if no branch name provided.
Defaulting should be handled by step configuration.

* clean code

* Updates fields and adds checks for required field for certain deploy tools

* Fixes default commit message

* Update long description

* Removes default parameter

* Update resources/metadata/gitopsUpdateDeployment.yaml

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

* Updates yaml file

* Add error category and removes too much wrapping

* Update generated file

* Checks all parameters before returning the error

* Introduces constant

* Renames constant

* Fixes unit tests

* unexpose constants

* Makes tests thread safe and resilient to failed deletion

* Remove methods that did not work properly with hash containers rather than tags.

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-03 18:29:46 +01:00
Daniel Mieg
02a5131256
Adapt parameter names (#2304)
* Adapt parameter names

* add ignore addon option

* change ignore to include
2020-11-03 13:41:39 +01:00
Daniel Mieg
aa9dd3b199
Add step abapEnvironmentCreateSystem (#2273)
* Create initial step

* Add parameters for system creation

* Creating a tmp manifest.yml

* Add descriptions

* regenerate

* Create tests

* fix codeclimate issue

* Test

* Test2

* Test3

* Replace os.getTempDir

* Change to fileUtils

* Remove FileUtil
2020-11-03 12:02:13 +01:00
Daniel Kurzynski
7946265e21
Install maven artifacts before running Detect (#2292) 2020-11-03 11:08:23 +01:00
Stephan Aßmus
b070d2f4ed
fortifyExecuteScan: fix quoting of default values for "src" (#2297)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-11-02 17:21:14 +01:00
Daniel Mieg
7639175def
Add commit to clone and pull (#2258)
* commit ID for clone

* commit ID for clone

* Remove old default values

* Add commitID to Pull

* Print http response on debug level

* Fix tests

* Adapt tests

* Shorten sleep

* Fix clone tests

* Add ignore commit option

* Adapt tests

* Adapt docu

* Implement feedback

* fix codeclimate issue
2020-11-02 14:17:13 +01:00