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

1058 Commits

Author SHA1 Message Date
sumeet patil
416cb1d327
fix(codeqlExecuteScan): added report file to output resources (#4388) 2023-06-02 18:31:52 +05:30
Leonard Heilos
c15448b4e0
feat(whitesourceExecuteScan): allow to specify InstallCommand (#4376)
* feat(whitesourceExecuteScan) allow to specify InstallCommand

* reorder imports

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2023-05-30 16:00:02 +02:00
thtri
5ab432b804
fix(whitesource):add stash for checkmarxOne (#4383) 2023-05-30 11:06:14 +02:00
sumeet patil
1c018dbff7
feat(codeqlExecuteScan) : auto fill api url (#4369) 2023-05-22 19:59:43 +05:30
Srinikitha Kondreddy
a76b20f09f
Upgrade sonar scanner cli image version to 4.8 (#4362)
* Uprade sonar scanner cli version to 4.8

* Update download url
2023-05-17 09:24:27 +02:00
Srinikitha Kondreddy
1d78ef35d4
Add proxy config to sonar scan step (#4333)
* Add proxy config for sonar scan step

Update sonar.go

Import fmt

Update sonar.go

Use serverUrl from config

Update sonarExecuteScan.go

Add proxy param

Add proxy check

Update sonarExecuteScan.go

Update sonarExecuteScan.go

Update http.go

Update sonarExecuteScan.go

Update sonarExecuteScan.go

Add env variable

Fix typo

Fix string

Split host port

Typo

Remove echoes

* Code review change

* Refactor

* Update cmd/sonarExecuteScan.go

Co-authored-by: dimitrij-afonitschkin <131276293+dimitrij-afonitschkin@users.noreply.github.com>

* Add proxy config for sonar scan step

Update sonar.go

Import fmt

Update sonar.go

Use serverUrl from config

Update sonarExecuteScan.go

Add proxy param

Add proxy check

Update sonarExecuteScan.go

Update sonarExecuteScan.go

Update http.go

Update sonarExecuteScan.go

Update sonarExecuteScan.go

Add env variable

Fix typo

Fix string

Split host port

Typo

Remove echoes

* Code review change

* Refactor

* Update cmd/sonarExecuteScan.go

Co-authored-by: dimitrij-afonitschkin <131276293+dimitrij-afonitschkin@users.noreply.github.com>

* Add compatability to other usecases

---------

Co-authored-by: dimitrij-afonitschkin <131276293+dimitrij-afonitschkin@users.noreply.github.com>
2023-05-16 09:31:33 +02:00
thtri
659cf9f988
Checkmarx/CheckmarxOne: update include/exclude stash file patterns (#4358)
* feat(checkmarxOne): add default file patterns for stash

* fix(checkmarx): add missing stash file patterns

* fix(checkmarx-checmarxOne): support TypeScript (issue #3073)
2023-05-15 10:42:11 +02:00
Ralf Pannemans
019ef17fd7
feat(helmExecute): Allow custom delimiter (#4312)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Jan von Loewenstein <jan.von.loewenstein@sap.com>
2023-05-08 16:24:24 +02:00
Pavel Busko
35a55044b4
Add renderSubchartNotes property to helmExecute and kubernetesDeploy (#4238)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-05-05 14:23:11 +02:00
michaelkubiaczyk
d12f01d90f
Adding support for CheckmarxOne platform (#4317)
* Initial in progress

* compiling but not yet functional

* Missed file

* updated checkmarxone step

* Working up to fetching a project then breaks

* Missed file

* Breaks when retrieving projects+proxy set

* Create project & run scan working, now polling

* Fixed polling

* added back the zipfile remove command

* Fixed polling again

* Generates and downloads PDF report

* Updated and working, prep for refactor

* Added compliance steps

* Cleanup, reporting, added groovy connector

* fixed groovy file

* checkmarxone to checkmarxOne

* checkmarxone to checkmarxOne

* split credentials (id+secret, apikey), renamed pullrequestname to branch, groovy fix

* Fixed filenames & yaml

* missed the metadata_generated.go

* added json to sarif conversion

* fix:type in new checkmarxone package

* fix:type in new checkmarxone package

* removed test logs, added temp error log for creds

* extra debugging to fix crash

* improved auth logging, fixed query parse issue

* fixed bug with group fetch when using oauth user

* CWE can be -1 if not defined, can't be uint

* Query also had CweID

* Disabled predicates-fetch in sarif generation

* Removing leftover info log message

* Better error handling

* fixed default preset configuration

* removing .bat files - sorry

* Cleanup per initial review

* refactoring per Gist, fixed project find, add apps

* small fix - sorry for commit noise while testing

* Fixing issues with incremental scans.

* removing maxretries

* Updated per PR feedback, further changes todo toda

* JSON Report changes and reporting cleanup

* removing .bat (again?)

* adding docs, groovy unit test, linter fixes

* Started adding tests maybe 15% covered

* fix(checkmarxOne): test cases for pkg and reporting

* fix(checkmarxOne):fix formatting

* feat(checkmarxone): update interface with missing method

* feat(checkmarxone):change runStep signature to be able to inject dependency

* feat(checkmarxone): add tests for step (wip)

* Adding a bit more coverage

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix code review

* feat(checkmarxOne): fix integration test PR

---------

Co-authored-by: thtri <trinhthanhhai@gmail.com>
Co-authored-by: Thanh-Hai Trinh <thanh.hai.trinh@sap.com>
2023-05-05 14:05:58 +02:00
Jk1484
ffc931aad1
feat(golangBuild): use 'unit' build tag to include tests during test execution (#4345)
* Added unit tag as argument. Added description to runTests command. Changed code generator to have unit build tag in generated unit test files.

* Added unit build tag to all unit test files.

* added to new unit test unit build tag

* Update verify-go.yml

* small fix

---------

Co-authored-by: Muhammadali Nazarov <Muhammadali.Nazarov@acronis.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-05-03 21:02:11 +05:00
sumeet patil
6dad124367
feat(codeqlExecuteScan): CodeQL compliance report and check (#4335)
* CodeQL compliance report and check

* fix test cases

---------

Co-authored-by: Daria Kuznetsova <d.kuznetsova@sap.com>
2023-04-28 15:47:05 +02:00
Ashly Mathew
58e9344eb0
Add description to long description for gradle step (#4336) 2023-04-27 09:09:52 +02:00
Anil Keshav
17c9f5ca65
feat (kuberenetesDeploy) allow adding a timeout to the helm test commands (#4310)
* adding a timeout for helm test

* extending test cases

* Upadate the helmTestWaitSeconds parameter

* Add timeout parameter for helm test command

* Update tests

---------

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2023-04-24 18:58:24 +06:00
Ashly Mathew
01cfb07d15
feat(gradle): Support for more than one task/flags (#4329)
* feat(gradle) support task list

* Change parameter name to buildFlags to align with other piper steps'
2023-04-24 09:09:31 +02:00
Maurice Breit
4f4e667797
add ascAppUpload step (#4286)
* add ascAppUpload step

add step that uploads an app binary to Application Support Center (ASC)

* re-run go generate

* fix typo in CODEOWNERS

* Update CODEOWNERS
2023-04-18 08:56:32 +02:00
Jordi van Liempt
e3935ca088
feat(vault): Vault secret rotation for GH Actions (#4280)
* rotate Vault secret on GH Actions

* test alternative sodium package

* try doing it without libsodium

* disable validity check for testing purposes

* basic unit test

* re-enable secret validity check

* tidy

* tidy parameters

* forgot to update param names in code

* apply review feedback

* improve error logging

* update step metadata

* apply metadata suggestion from review

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

* align githubToken param

* Fix secretStore

* Add alias for githubToken

* Move logic to separate file

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2023-04-17 08:35:13 +02:00
Akramdzhon Azamov
f9617f5315
feat(blackduck): Npm extra parameters (#4327)
* added two new parameters for npm

---------

Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2023-04-13 12:10:26 +02:00
Marco Rosa
6b18448124
Add credentialdiggerScan step (#4141)
* Add credentialdiggerScan metadata

* Integrate new step into piper process

* Add credentialdiggerScan implementation and tests

* Remove duplicated code

* Add doc file for credentialdiggerScan step

* Regenerate metadata

* Fix return type in tests

* Add credentialdiggerScan to CommonStepsTest

* Fix typo

* Improve code style

* Add support for custom rules file in stash

* Regenerate metadata for credentialdiggerScan

---------

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-04-04 16:57:15 +02:00
Pavel Busko
81d9a0ac8c
feat(cnbBuild): support Vault general purpose secrets as a binding content source (#4281)
* feat(cnbBuild): support Vault general purpose secrets as a binding content source

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* fix npm project integration test

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

---------

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
2023-03-31 09:36:59 +02:00
Anke Ravalitera
ba58d72022
Update texts of gCTS steps and scenario for SSL and queryP (#4282)
* Update texts of gCTS steps and scenario for SSL and queryP

* delete a trailing space
2023-03-29 12:31:27 +02:00
gerstneralex
f5c33d51bb
Tms export (#4160)
* Change parameter type of nodeExtDescriptorMapping

(cherry picked from commit ca7ce0485a)

* Remove usage of the depricated ioutil package

(cherry picked from commit 9821915b33)

* Fix cmd failure if neither git/commitId nor customDescription are
provided

(cherry picked from commit c362681e45)

* Fix unit test

(cherry picked from commit 53a90aabb5)

* Step metadata, step code generation

* change type of nodeExtDescriptorMapping for export

* Refactoring and export implementation

* integration test

* Add export step

* Integration test

* format

* discard piper.go

* Review related changes

* restore piper.go

* remove unused method

* Extend documentation

* Add parameter useGoStep to tmsUpload.groovy

* Regenerate steps

* Rename function

* refactor constants

* Add error path tests

* Move some code to tms package

* Move more code to tms

* Combine tmsUpload, tmsUtils

* Add groovy wrapper

* add parameters to groovy step

* add import

* jenkinsUtils instance

* comment namedUser logic in groovy

* namedUser param

* remove logic for namedUser param

* Remove TMS integration tests

* discard changes in tmsUpload.groovy

* Remove parameters

* Restore parameters

* Change type of NodeExtDescriptorMapping to map[string]interface{}

* tmsUpload: Change type of NodeExtDescriptorMapping to map

* Resolve ioutil deprecation

* Review related changes

* Formatting

* Review related improvements

* Add tmsUtils test

* Formatting tmsUtils_test

* Remove parameters from groovy wrapper

* Remove tmsUtils_test

* Add TMS steps to fieldRelatedWhitelist

* Add integration test

* Add test to github_actions_integration_test_list.yml

* Move test helper method

* Step documentation placeholder

* Remove parameter StashContent

* Restore cmd/integrationArtifactTransport.go

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2023-03-27 16:55:29 +02:00
Oliver Feldmann
92a782a6c3
[Integration Suite] Store response in CPE (#4277)
* Store response body in CPE

* Also store response headers in CPE
2023-03-27 14:34:59 +00:00
Andrei Kireev
e55c2f857c
feat(detectExecuteScan) enabling possibility to scan MTA projects (#4300)
* feat(detectExecuteScan) enabling possibility to scan MTA projects
2023-03-27 10:42:39 +02:00
sumeet patil
d5d486ae3f
docs(codeqlExecuteScan): Improve codeqlExecuteScan githubToken docs (#4292) 2023-03-22 18:14:04 +05:30
Ashly Mathew
60f9d55bda
Add Step scope for mavenBuild (#4291) 2023-03-21 14:17:07 +01:00
Oliver Nocon
7c4262b0c6
chore (containerExecuteStructureTests): switch default container (#4288) 2023-03-21 08:06:22 +01:00
Vyacheslav Starostin
eeea501bc6
golangBuild: Update golangci-lint version (#4279)
* Update golangci-lint version

* go generate
2023-03-16 18:53:24 +06:00
Daria Kuznetsova
9774eaab86
fix(codeqlExecuteScan): added parameters threads and ram (#4269) 2023-03-13 19:17:16 +05:30
Daniel Mieg
8084ce1a94
Change to default cf create-service implementation (#4224)
* Change to default cf create-service

* Adapt test

* Adapt tests

* Remove comment

---------

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2023-03-08 09:44:00 +01:00
Andrei Kireev
22f61be2c4
Removed downloading of detect script version 6 (#4261)
Co-authored-by: ffeldmann <f.feldmann@sap.com>
2023-03-07 14:43:14 +01:00
Philipp Stehle
cc3bc76943
Use floating tag for helm images (#4236)
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2023-03-01 09:26:26 +01:00
Daria Kuznetsova
cea2a6e290
feat(codeql): added generating file toolrun_codeql.json (#4240)
* added generating toolrun file for codeql
2023-02-22 22:30:53 +05:30
Ralf Pannemans
906512a162
feat(cnbbuild): allow bindings to have multiple keys (#4231)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2023-02-16 15:29:08 +01:00
Rinita Asani
eecddf689c
New Configuration Parameters for gCTS steps (#4214)
* Adding new query configuration parameter for gCTS Piper steps

* Add skipSSLVerification parameter to gCTSExecuteQualityChecks

* Add skipSSLVerification to gCTSDeploy

* Add SkipSSLVerification for pull by commit

* Add SkipSSLVerification to rollback

* Add SkipSSLVerification parameter to rollback

* Handling maximum number of charachter for the queryParameter

* Remove extra new lines in yaml files

* Add new line yaml files
2023-02-14 11:38:46 +01:00
Vyacheslav Starostin
d7e0bfe4f9
Revert "artifactPrepareVersion: Add usage of gradle docker image if buildTool is gradle (#4226)" (#4230)
This reverts commit 7c7dcbf910.
2023-02-13 17:55:25 +01:00
Vyacheslav Starostin
7c7dcbf910
artifactPrepareVersion: Add usage of gradle docker image if buildTool is gradle (#4226) 2023-02-13 19:49:26 +06:00
Daniel Mieg
54d0c68feb
Add parameter for async execution (cfCreateServiceKey) (#4209)
* Add parameter for async execution

* Add default

* Adapt tests

* Add defaults for ABAP

---------

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2023-02-08 14:51:52 +00:00
Christopher Fenner
0626c7d861
feat(sonar): add parameter to wait for Quality Gate (#4047) 2023-01-27 16:14:34 +01:00
Daria Kuznetsova
4a1cf4fd45
feat(codeql): added stashes (#4196)
* added stashes for codeql metadata
2023-01-23 14:09:08 +05:30
tiloKo
a5ce01e1bd
increase cf-cli from 7 to v12 (#4186) 2023-01-12 17:17:50 +01:00
Daniel Mieg
74b5527f1c
Increase cf cli to v8 for ABAP steps (#4183)
* Increase docker image version

* Add --wait

* Test

* Adapt to new cf cli

* Parse both for cf cli v8 and v7

* Remove input

* Adapt to feedback

* Check for nil error
2023-01-12 08:39:14 +00:00
Vyacheslav Starostin
a0698adc33
Update jnlp image (#4184) 2023-01-12 14:24:11 +06:00
Oliver Feldmann
b639c98890
[newmanExecute] Allow env vars in the runOptions (#3966)
* Allow env vars in the runOptions

* Add documentation

* Regenerate for documentation

* Fix documentation
2023-01-11 11:59:09 +01:00
Vyacheslav Starostin
c467f002b1
Update whitesource risk-report pattern (#4166)
* Update whitesource pattern

* Update filePattern

* go generate
2023-01-05 18:37:03 +06:00
Pavel Busko
6201e9bd96
docs(cnbBuild): fix containerImageAlias examples (#4171) 2022-12-21 16:47:22 +01:00
Daniel Mieg
6f9e3dbb04
Revert "Increase docker image version (#4159)" (#4169)
This reverts commit 380689e5c4.
2022-12-21 10:12:13 +01:00
Daniel Mieg
380689e5c4
Increase docker image version (#4159) 2022-12-21 09:48:49 +01:00
Mayur Belur Mohan
a65df9ced6
integrationArtifactTransport Command (#4131)
* integrationArtifactTransport Command

* CodeReview Fix

* CodeReview Fix

* codereview fix

* Update documentation/docs/steps/integrationArtifactTransport.md

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>

* Update documentation/docs/steps/integrationArtifactTransport.md

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>

* CodeReview Fixes

* CodeReview FIxes

* CodeReview Fix

* Doc Fixes

* Update documentation/docs/steps/integrationArtifactTransport.md

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>

* Doc fixes

* Doc Fixes

* CodeReview Fixes

* Doc Fixes

Co-authored-by: Linda Siebert <linda.siebert@sap.com>
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>
2022-12-20 12:15:36 +01:00
raman-susla-epam
d7cf8654f9
githubCreateIssue_fix (#4151)
* extend githubCreateIssue to handle long body

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2022-12-15 18:20:01 +03:00
Pavel Busko
63a79c9e41
feat(cnbBuild) generate SBOM files with syft (#4150)
* feat(cnbBuild) generate SBOM files with syft

Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: Sumit Kulhadia <sumit.kulhadia@sap.com>
2022-12-13 10:51:14 +01:00
Adrien
15d91ce659
fix(checkmarx) Fix logic for engineConfigurationID (#4154)
* Fix logic for engineConfigurationID
Use the project-level value if no value is defined in the piper config.
Remove the default value of 1 for engineConfigurationID.
2022-12-12 20:01:21 +05:30
Philipp Stehle
f5b6580e4c
feat(cnbBuild): allow setting the default process type (#4140) 2022-12-12 09:33:54 +01:00
Vyacheslav Starostin
6a9ade78ff
golangBuild: update the way of installing golangci-lint (#4145)
* Add the OS agnostic way of installing golangci-lint

* Fix

* Clean up

* Modify unit tests

* Rename downloaded archive

* Refactor

* Expose golangci-lint url as a parameter

* Clean up

* Rename parameter

* Update mock

* Fix golangci-lint version
2022-12-07 22:13:44 +06:00
Adrien
84ebea25b3
fix(checkmarxExecuteScan) rename sourceEncoding parameter to engineConfigurationID (#4142) 2022-12-03 11:13:32 +05:30
Jakob Marius Kjaer
452b2a1ef5
refactor: rebranding from scp to btp (#4049)
* refactor: rebranding 

rebranding from SAP Cloud Platform to SAP BTP

* refactor: rebranding from SCP to BTP

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2022-11-29 09:52:23 +01:00
Ashly Mathew
d5562f2fb5
Expose syft url as a parameter for kanikoExecute (#4135) 2022-11-28 10:21:06 +01:00
Sven Merk
a055b905f9
Fix cumulus uploads for WhiteSource and BlackDuck (#4128)
* Refurbish upload to compliance store

* Fix BD IP json path
2022-11-17 11:05:27 +01:00
Srinikitha Kondreddy
486914b203
Correct description for deployType parameter (#4127)
* Correct description for deployType parameter

* Add space

* Update generated file
2022-11-15 14:44:52 +01:00
raman-susla-epam
fe4af3af7b
Update gradleExecuteBuild.go (#4079)
* Update gradleExecuteBuild to apply publish and cyclonedx for all projects

Co-authored-by: “Raman <“raman_susla@epam.com”>
2022-11-15 16:17:31 +03:00
Matthias Kuhr
4d45724a26
fix(detectExecuteScan): Update links to Synopsys docs (#4038)
* Update links to Synopsys docs

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2022-11-15 12:45:11 +05:30
Raghunath Deshpande
ad36fe5a30
Whitesource to Mend name change (only for step description docu and not step name) (#4114)
* Whitesource to Mend name change

* name change from whitesource to mend
2022-11-09 12:04:10 +01:00
Johannes Dillmann
5f643826f5
Add source repo for helmExecute (#4082)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>

Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-11-07 15:35:00 +00:00
Vyacheslav Starostin
c802aa512d
artifactPrepareVersion: update documentation (#4107) 2022-11-07 20:55:03 +06:00
Ashly Mathew
e2c710c035
Introducing syft to generate SBOMS for kaniko builds (#4093)
* Update kanikoExecute.go
* Syft function

* Change installation directory to ease cleanup

* Add createBOM option

* Unit tests

* Refactor code

Co-authored-by: raman-susla-epam <104915202+raman-susla-epam@users.noreply.github.com>
2022-11-07 14:27:05 +01:00
Frank Cheng
7f6fbe4bac
chore: let fortify support maven self Define parameters (#4091)
* let fortify support maven self Define parameters
2022-11-07 16:47:11 +05:30
Jordan Levin
2866ef5592
feat (protecodeExecuteScan) support custom data headers in upload request (#3836)
* support custom data headers in Protecode upload API

* parse custom data properly

* better debugging

* pre-pend META- to custom data header

* prepend to key, not value

* fix debug output

* Fix debug log level

* Make custom header meta upper case key

* fix

* Update http.go

* Update protecode.go

* Update http.go

* address PR review

* Fix merge conflicts

* Update fortifyExecuteScan.yaml

* Update protecodeExecuteScan_generated.go

* Generate step

* fix generated code

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-11-03 17:53:23 +01:00
charly-lemee
885a5e73e3
fix: typo in checkmarx scan (#4072)
* fix: typo with checkmarx report
2022-11-03 13:18:17 +05:30
Christian Volk
6702e146b1
fix(githubPublishRelease): allow repo and owner to be configured globally (#4090) 2022-11-02 13:41:15 +00:00
Vyacheslav Starostin
a84b9d65ac
sonarExecuteScan: run sonar image as root (#4097) 2022-11-01 20:51:25 +06:00
Vyacheslav Starostin
e9c366392e
Update sonar image version (#4094)
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2022-10-31 16:33:24 +01:00
Johannes Dillmann
cfacde97be
Allow run-image to be specified (#4088)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2022-10-27 15:18:32 +02:00
Vyacheslav Starostin
a7dd0bac50
gradleExecuteBuild: get published artifacts names and write those to CPE (#4076)
* Add new output to CPE && go generate

* Add published artifacts names to CPE

* Add tests

* Change name

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
Co-authored-by: Ashly Mathew <ashly.mathew@sap.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2022-10-25 13:17:42 +02:00
Anil Keshav
f270aa4a17
including sarif files when running implicit report upload from the step itself (#4068)
Co-authored-by: anilkeshav27 <you@example.com>
2022-10-18 09:48:07 +02:00
thtri
8d1e1bac96
fix(fortify,checkmarx): enable SARIF generation as baseline (#4053)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2022-10-17 14:09:02 +02:00
Daniel Mieg
37a3504152
Adapt default (#4066) 2022-10-12 13:46:19 +02:00
Daniel Mieg
ebac0da332
Add create tag to abapEnvironmentPipeline (#3870)
* Add alias

* Add step and defaults

* Add closing }

* Add test

* Remove alias

* initial copy

* Change step activation

* Change test

* Read foreign config

* Fix Syntax

* Test

* Test

* Only consider stage config

* Test config

* Test

* Test

* Change echo

* Fix

* Test

* Default test

* Uncomment

* Test different outputs

* Adapt Config

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2022-10-12 10:20:13 +02:00
Umidjon Urunov
e9707e7638
Added user API key authentication method (#3748)
* 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

* protecodeExecuteScan -> Added authentication with user API key

* protecodeExecuteScan -> updating .yml file

* protecodeExecuteScan -> go generate fixed

* protecodeExecuteScan -> naming convention applied for UserAPIKey parameter

* protecodeExecuteScan -> extending groovy code for mapping jenkins credentials

Co-authored-by: D072410 <giridhar.shenoy@sap.com>
Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-10-10 10:55:21 +02:00
Christopher Fenner
07eeb2f33e
feat: update node image for various steps to new LTS (#3913)
* update node image for steps

* update defaults

* update generated sources

* update tests

Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2022-09-26 18:40:55 +06:00
Giridhar Shenoy
d31c0584ff
detectExecuteScan : Add minScanInterval parameter through Piper (#4006)
* add minscaninterval parameter

* update detectExec

* removed a single trailing space which caused a lint failure

* Add test case

* Ensure unmap is false

* fix test case

* update format of param value
2022-09-26 14:08:12 +02:00
Vyacheslav Starostin
6cadb15a11
kubernetesDeploy: add additional unstashing (#4017)
Co-authored-by: Alexey Matvievsky <72048991+matvievsky@users.noreply.github.com>
2022-09-23 17:46:05 +06:00
Srinikitha Kondreddy
e610bda779
Set script 'ci-e2e' as default for acceptance stage (#4000)
* Set script 'ci-e2e' as default for acceptance stage

* Refactor test case

* Clean up

* Adjust parameter comment
2022-09-05 09:38:45 +00:00
Vyacheslav Starostin
72e257e83e
helmExecute: rename remoteHelmChartPath to helmChartUrl (#3999) 2022-09-02 15:55:30 +06:00
Daniel Bernd
721994fac5
Feature ATC Run Step - fail on severity (#3986)
* new Parameter - for ATC step "Fail on Severity"

* .yml - add description

* fail on Severity & Unit Test

* Update abapEnvironmentRunATCCheck_test.go

Unit Test correction

* Fail Message

* Fail Step - at last (after persisting files)

* Parameter description change

* yaml trailing spaces removal

* correct Parameter typo and description adjust

* Unit Test correct

* Update cmd/abapEnvironmentRunATCCheck.go

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>

* Update abapEnvironmentRunATCCheck.go

* Update abapEnvironmentRunATCCheck_test.go

typo

Co-authored-by: Daniel Bernd <93763187+danManSAP@users.noreply.github.com>
Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2022-08-31 16:57:20 +02:00
Artem Bannikov
4b257377ec
[TMS] Reimplement tmsUpload step in Go (#3399)
* Initially generated tmsUpload<...> files

* First provisioning of parameters supported by tmsUpload step

* Refer to Go step from tmsUpload.groovy

* Initial client implementation

* Reverting line delimiters in tmsUpoad.groovy back to Unix ones

* Temporarily remove when-condition for Release stage

* Define useGoStep parameter in tmsUpload.groovy

* Unstash buildResult if useGoStep is true

* No unstashing and empty credentials, when using go step

* Register TmsUploadCommand in piper.go

* Cleanup groovy-related changes - they will be temporarily implemented in a different repo

* Make getting OAuth token success

* Look through the code and cleanup it a bit

* Read service key from Jenkins credentials store

* Provide initial set of unit tests for methods in /pkg/tms/tms.go file

* Minor improvements on logging response on http call error

* Check, if positive HTTP status code is as expected

* Cleanup tms.yaml file, provide additional unit test for tms.go

* Provide unit test for the case, when request body contains spaces

* Specify nodeExtDescriptorMapping parameter as of type map in tms.yaml

* Implement client method for getting nodes

* Write tests for GetNodes method

* Add GetMtaExtDescriptor client method and cover it with unit tests

* Provide first implementation for Update- and UploadMtaExtDescriptor
client methods

* Provide first implementation for Update- and UploadMtaExtDescriptor
client methods

* Provide UploadFile and UploadFileToNode client methods

* Provide tests for Update- and UploadMtaExtDescriptor client methods

* Write tests for FileUpload and FileUploadToNode client methods

* Minor corrections

* Remove some TODO comments

* Rename some of response structures

* Revert change for line delimiters in cmd/piper.go

* Add uploadType string parameter to UploadFile and UploadRequest methods
of uploader mock to reflect the changed Uploader implementation

* Start to implement execution logic in tmsUpload.go

* Changes in tms.yaml file

- remove resources from inputs in tms.yaml and implement mtaPath
parameter settings in the yaml file the same way, as it is done in
cloudFoundryDeploy.yaml
- rename tms.yaml to tmsUpload.yaml, since some generation policy
changed meanwhile

* Rename tms.yaml to tmsUpload.yaml and do go generate

* Use provided proxy on communication with UAA and TMS

* Set proxy even before getting OAuth token

* Further implementation of tmsUpload.go

* Continuation on implementing the tmsUpload.go executor

* Get mtarFilePath and git commitId from commonPipelineEnvironment, if
they are missing in configuration file + minor changes

* Implement a happy path test for tmsUpload logic

* Cover with unit tests main happy and error paths of tmsUpload.go logic

* Extend set of unit tests for tmsUpload.go

* Eliminate some TODOs, extend unit tests for tmsUpload.go

* Delete some TODOs

* Remove a couple of more TODOs from tms_test.go file

* Provide additional unit test for error due unexpected positive http
status code on upload

* Revert back line delimiters in cmd/piper.go

* Comment out file uploading calls in tmsUpload.go

* Run go generate to update generated files

* Convert line delimiters in tmsUpload.yaml to Unix ones, as well as
provide new line character in the end of the file, plus minor fix for
logging in tmsUpload.go file (pipeline complained)

* Correct description of a parameter in tmsUpload.yaml, extend unit tests
to check for trimming a slash in the end of TMS url for client methods
that do upload

* [minor] Add a comment in the test code

* Add stashContent parameter to do unstashing in tmsUpload.groovy, remove
some of the clarified TODOs

* Uncomment uploading file calls in tmsUpload.go, declare buildResult
stash in tmsUpload.yaml

* Remove clarified TODOs from the tmsUpload.go file

* Run go fmt for jenkins-library/pkg/tms

* Do not get explicitly values from common pipeline environment - all
configurations are provided in yaml file

* Remove unused struct from tmsUpload_test.go

* Run go fmt jenkins-library\pkg\tms

* Revise descriptions of parameters provided in tmsUpload.yaml file

* Specify STAGES scope for tmsUpload parameters

* Provide STAGES scope for the tmsUpload parameters, provide default value
for stashContent parameter

* Remove trailing space from tmsUpload.yaml

* Provide unit tests for proxy-related changes in http.go file

* Improve proxy implementation in tmsUpload.go file

* Make tmsServiceKey again a mandatory parameter

* Run go generate command to make the generated files correspond the yaml
state

* Change line delimiters back to Unix ones (were switched while resolving
the conflicts)

* Remove trailing spaces from tmsUpload.yaml

* Minor change in a comment to trigger pipelines with commit

* Improve checks for zero-structs and for empty maps, as well as use
different package to read files in the tests

* Revert line endings in http.go

* Revert comments formatting changes in files that do not belong to the tmsUpload step
2022-08-30 10:16:09 +02:00
Ashly Mathew
b75d6cf9ed
Enable Jenkins to use checkIfStepActive go step (#3931)
* Extend checkIfStepActive

* adapt default format in abap Tests
Co-authored-by: dominiklendle <d.lendle@sap.com>
Co-authored-by: “Raman <“raman_susla@epam.com”>
2022-08-29 11:39:08 +02:00
Vyacheslav Starostin
5e305eca40
kubernetesDeploy: add resourceRef (custom/localHelmChartPath) (#3977) 2022-08-25 17:12:13 +06:00
Pavel Busko
14ce92b4fb
cnbBuild: create CycloneDX SBOM file (#3959)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2022-08-18 10:03:24 +02:00
Oliver Feldmann
3da753930c
Allow transport request id from config (#3969) 2022-08-16 11:33:04 +02:00
Vyacheslav Starostin
b31549cf7f
helmExecute: add remoteHelmChartPath CPE value (#3965)
* Add remoteHelmChartPath CPE value

* Fix tests

* Add empty line at the end of yaml file

* Fix yaml file
2022-08-16 01:41:24 +06:00
Oliver Nocon
74cc828221
chore!: improve performance on Kubernetes (#3932)
* chore: test stashBack excludes

* improve logging

* chore!: improve performance on Kubernetes

* update stash pattern

* update test

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2022-08-15 12:55:51 +02:00
Daniel Bernd
11e7b5e137
Feature usage com scen901 (#3917)
* Usage of Communication Scenario 901 (instead 510)

* Stage Defaults ATC - Com.Scen 901

* added missing step in Introduction docu

* Correct Link

* Link adapt 2 - generated

* remove Push ATC system configuration again (as only substep)

* feat: allow uploading multiple boms (#3900)

* WIP: Adapt bom names

* + WIP: Adapt bom filenames

* Upgrade cyclonedx gradle plugin and use cyclonedxBom config parameters

* Fix unit tests - use correct name in bom creation

* Fix pythonBuild bom name

* introduce and use npmBomFilename const

* Introduce and use mvnBomFilename const

* Introduce and use gradleBomFilename const

* Use build-tool names for bom suffix

* + Adapt tests (build tool suffix)

* Use BOM schema version 1.2 in gradleExecuteBuild

* Pin version of cyclonedx-maven-plugin to 2.7.1

* Adapt generated files

* Fix integration tests

* Fix integration tests

* Fix gradle build integration tests

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

* fix(cnbBuild): Create separate temp folder for each creator call (#3910)

Co-authored-by: Pavel Busko <pavel.busko@sap.com>

* feat(fortifyExecuteScan): new spotcheck flags (#3923)

* feat: improve vulnerability reporting via GitHub issues (#3924)

* feat: improve vulnerability reporting via GitHub issues

* feat: update reports

* chore: add tls cert links

* only write log on error

* chore: update formatting

* chore: update handling of direct dependencies

* chore: fix linting issue

* chore: minor updates

* correct typo

Co-authored-by: Daniel Bernd <93763187+danManSAP@users.noreply.github.com>
Co-authored-by: R. Kloe <55529941+rkloe@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2022-08-15 10:56:08 +02:00
Ashly Mathew
62f47e2d1f
Changes to point release commitish to head commit (#3776)
* Changes to point release commitish to head commit

Signed-off-by: Ashly Mathew <ashly.mathew@sap.com>
2022-08-15 09:48:28 +02:00
Oliver Nocon
05319abfa3
fix(kanikoExecute): enforce image name for multi image build (#3909)
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2022-08-15 09:05:20 +02:00
sumeet patil
be565f1543
feat(fortifyExecuteScan): set python version (#3960)
* set python version
2022-08-12 15:17:11 +02:00
sumeet patil
bb85aa1d7a
fix(fortify): minor fixes (#3946)
* fix(fortify): minor fixes
2022-08-09 15:26:07 +02:00
Sven Merk
b3f37650a2
SBOM creation for Mend (#3934)
* Fix docs and format

* Assessment format added

* Added sample file

* Added parsing

* Added packageurl implementation

* Slight refinement

* Refactored assessment options

* Adapted sample file

* First attempt of ws sbom gen

* Reworked SBOM generation

* Fix test code

* Add assessment handling

* Update dependencies

* Added golden test

* Small fix

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-08-09 13:56:01 +02:00
thtri
2536a9f598
feat(checkmarxExecuteScan): Support threshold for Low finding per Query name (#3938)
* feat(checkmarx): Support threshold for Low finding per Query name

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2022-08-05 00:17:07 +02:00
Mihai Herda
8061a5c0ab
Add cds generated code to Fortify scans by default. (#3940)
* Add cds generated source code to Fortify scans.

This generated source code is needed to avoid false negatives when scanning code that uses the CAP framework.

* Also change documentation.

* Forgot comma.

* Run go generate.

* Change test.

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2022-08-04 16:20:14 +02:00
Vyacheslav Starostin
a610e1df6a
Update dtzar/helm-kubectl image version for kuberntesDeploy (#3927) 2022-08-02 14:41:35 +06:00