1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-05 13:25:19 +02:00

1390 Commits

Author SHA1 Message Date
Googlom
4fd896e28c
fix(naming): Rename Trust Engine to System Trust (#5217)
* rename package

* make unexported

* rename all occurrences

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2025-01-07 16:44:59 +02:00
Tilo Körner
f06e29f913
abapEnvironmentAssemblePackages Check for Build Errors (#5214)
* Check for Build Errors
2025-01-07 10:51:32 +01:00
phgermanov
04e5df1277
docs: fix npmExuceteTests documentation formatting issues (#5218) 2025-01-03 13:28:34 +02:00
phgermanov
531a0b8cfe
feat: Introduce new npmExecuteTests step (#5124) 2025-01-03 12:42:59 +02:00
Ivan Nikiforov
85dfe3e18d
fix(cloudFoundryDeploy): argument list too long (#5216)
* Increate command line limits

* Increase new limits only to cf-cli image

* Increase execution environment limits with static values

* Remove unsupported operation

* Increase docker container limits

* Show current environment limits on container start

* Clean up

* Display environment limits only in verbose mode

---------

Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
2024-12-27 15:09:00 +01:00
Valentin
93c4ea61aa
Revert "Fix deployment failure with CF if password contains special char (#5197)" (#5215)
This reverts commit 8205624a22920f2ebe1e7999bf1b384aeae04e5d.

Co-authored-by: Valentin Uchkunev <valentin.uchkunev@sap.com>
2024-12-23 12:33:12 +01:00
Manjunath
8205624a22
Fix deployment failure with CF if password contains special char (#5197)
* Fix deployment failure with CF if password contains special char
* cf service test

* combined darwin and linux test, remove duplicate test

* escape username special characters

* fix build errors

* added missing build tags

* refactor abaputils
2024-12-18 11:21:56 +02:00
Valentin
dfd947b7e1
Update go version to 1.23 and removed some helper methods in favor of STD library (#5200)
* update go version

* fix go vet errors

* replaces stringutils with slices std package

* added slices package

* 1.22.4 to 1.23.4

---------

Co-authored-by: Valentin <valentin.uchkunev@sap.com>
2024-12-12 17:32:12 +02:00
Akramdzhon Azamov
e927605254
Added validation for buildTool and buildDescriptorFile (#5193)
* Added validation for buildTool and buildDescriptorFile on whitesourceExecuteScan step

* fix pull request's comment

---------

Co-authored-by: Dmitrii Pavlukhin <dmitrii.pavlukhin@sap.com>
2024-12-12 16:24:03 +03:00
Ivan Nikiforov
6d22b09ab3
Use mavenBuild.projectSettingsFile from config (#5194)
Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
Co-authored-by: phgermanov <phgermanov@gmail.com>
2024-12-02 13:20:41 +02:00
Christopher Fenner
57e4f1130a
fix(docs): correct anchor (#5191)
* Update cnbBuild.yaml

* Update cnbBuild_generated.go
2024-12-02 09:06:17 +01:00
Simon Dold
eeaeb1e40b
Adding general scope to logOutput (#5189)
* adding general scope

* change generated files

---------

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2024-11-28 09:38:25 +00:00
thtri
cd20114ca4
CxONE: search project name by exact match (#5187)
* 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

* adding scan-summary bug workaround, reportgen fail

* enforceThresholds fix when no results passed in

* fixed gap when preset empty in yaml & project conf

* fixed another gap in preset selection

* fix 0-result panic

* fail when no preset is set anywhere

* removed comment

* initial project-under-app support

* fixing sarif reportgen

* some cleanup of error messages

* post-merge test fixes

* revert previous upstream merge

* adding "incremental" to "full" triggers

* wrong boolean

* project-in-application api change prep

* Fixing SARIF report without preset access

* fix sarif deeplink

* removing comments

* fix(cxone):formatting

* fix(cxone):formatting

* small sarif fixes

* fixed merge

* attempt at pulling git source repo branch

* fix(cxone):new endpoint for project creation

* fix(cxOne): taxa is an array

* fix(cxOne): get Git branch from commonPipelineEnvironment

* fix(cxOne): add params to tag a scan and a project

* fix(cxOne): unit test - update project

* fix(cxOne): unit test - update project tags

* fix(cxOne): improve logs

* fix(cxOne): improve logs

* adding RequestNewPDFReport function using v2 api

* added version check

* fix(cxone): JSON report using v2 API

* update to set reportType in v2 reportgen

* fix(checkmarxOneExecuteScan): remove absolute patch for code preview

* fix(checkmarxOneExecuteScan): remove SCA confusion from driver name

* fix(checkmarxOneExecuteScan): search project name by exact match

* fix(checkmarxOneExecuteScan): escape branch name in deeplink

* fix(checkmarxOneExecuteScan): fix format

---------

Co-authored-by: michael kubiaczyk <michael.kubiaczyk@checkmarx.com>
Co-authored-by: michaelkubiaczyk <48311127+michaelkubiaczyk@users.noreply.github.com>
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
Co-authored-by: Adrien <99400874+hubadr@users.noreply.github.com>
2024-11-27 15:54:19 +01:00
Christopher Fenner
e462d324e4
fix(docs): fix doc anchor (#5177)
* Update fortifyExecuteScan.yaml

* Update whitesourceExecuteScan.yaml

* Update protecodeExecuteScan.yaml

* Update sonarExecuteScan.yaml

* Update detectExecuteScan.yaml

* Update fortifyExecuteScan_generated.go
2024-11-27 08:16:27 +01:00
Manjunath
cd548193a0
Renamed maven simple bom to skip uploading to cumulus (#5180) 2024-11-22 14:04:12 +01:00
christian
1edf8299f3
Update URL to current SapMachine (#5126)
* Update URL to recent SapMachine

11.0.2 in from Jan2019 := 5 years old
use the recent version => 11.0.24

* 11.0.24 to 25

meanwhile 11.0.25 is the latest version

* update from 11.0.25 to stable 21 link

now to use https://sap.github.io/SapMachine/latest/21/linux-x64/jre/

* applied generated go code

* Update whitesourceExecuteScan.yaml

* from 21-latest to 17.0.13

to speed this up

* revert description

* generate for new url

---------

Co-authored-by: Harald Aamot <harald.aamot@sap.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-11-08 09:40:51 +01:00
Manjunath
364238f154
handle error while fetching working directory (#5168) 2024-11-04 14:20:37 +01:00
phgermanov
6988f43f7f
feat: add build artifacts metadata for mtaBuild (#5166) 2024-11-04 12:30:39 +02:00
Manjunath
183004a80d
Add identifier data to create uuid in events (#5165) 2024-10-29 08:39:34 +01:00
Vyacheslav Starostin
d6aaf43fae
Update version of org.cyclonedx:cyclonedx-maven-plugin (#5156)
* Update version of org.cyclonedx:cyclonedx-maven-plugin

* Update version of org.cyclonedx:cyclonedx-maven-plugin

---------

Co-authored-by: Googlom <36107508+Googlom@users.noreply.github.com>
2024-10-25 14:07:28 +05:00
Akramdzhon Azamov
7b08d47bcb
Detect script version 9 (#5154)
* detect script v9 as default and detect script v8 as optional for blackduck

* unit test fix

---------

Co-authored-by: Dmitrii Pavlukhin <dmitrii.pavlukhin@sap.com>
2024-10-23 12:09:15 +03:00
Googlom
5c47be3f8f
refactor(vault): Refactor vault package (#5148)
* move to old package

* go mod

* remove old

* refactor done

* Update pkg/vault/oidc.go

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

* commit suggestions

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

* commit suggestions

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

* commit suggestions

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2024-10-22 13:29:34 +05:00
Dmitrii Pavlukhin
769067e996
added-option-to-use-global-config-file (#5145) 2024-10-18 17:06:41 +03:00
Adrien
b317b1d1eb
Add debug log for zip file content (#5152)
Co-authored-by: thtri <thanh.hai.trinh@sap.com>
2024-10-17 17:16:14 +02:00
Ivan Nikiforov
34a60daad1
Update documentation for scriptArguments param (#5128)
* Update documentation for scriptArguments param

* Update resources/metadata/shellExecute.yaml

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

* Update doc with new examples

* Fix typo

---------

Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2024-10-16 16:09:51 +02:00
Ivan Nikiforov
36c555ea61
fix: too long string written to cpe git.commitMessage (#5147)
* fix too long CPE string written to git/commitMessage

* Add debug log

* Fix debug log

* Truncate long git commit message title

* Add tests for truncateString

* Fix test

* Fix tests

* Fix tests

---------

Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
2024-10-16 13:45:23 +02:00
Anil Keshav
bc8225cffb
feat(build): add buildSettingsInfo for gradleExecuteBuild (#5043)
* creating build settings info from gradle build

* fix linting issue and typo

* fixing step description

* Apply suggestions from code review

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

* Address code review comments

* Fix tests

* Fix tests

* Fix tests

* Fix test

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Tilo Körner <70266685+tiloKo@users.noreply.github.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
2024-10-15 12:14:23 +05:00
Googlom
af05acad58
feat(events): Publish events to GCP PubSub by each step (#5122)
* test

* test

* draft

* generator

* some polishing

* go mod tidy

* fix unit

* fix unit

* fix unit

* fix unit

* fix unit

* resolve review comments

* resolve review comments

* add debug message on successful publish

* refactor to use global vault client

* cleanup

* rename

* clenup

* refactor

* remove token revocation

* handle nil vaultClient and add comments

* feat(events): Publish events (generated part) (#5131)

* add generated

* add generated

* refactor vaultClient usage

* fix unit tests

* fix unit tests

* fix
2024-10-11 14:55:39 +05:00
Manjunath
430bb9b719
Simply mvn build command (#5143) 2024-10-10 14:30:48 +02:00
Simon Dold
3225a7ddc0
Adding log download as zip archive (#5121)
* adding LogOutput to clone step

* delete comments

* adding stepName

* change step name

* adding multiple log archive outputs files

* changing file name

* change filename

* change time format

* adding second file for testing

* adding second file

* change structure for PersistReportsAndLinks

* change to pointer

* change pointer

* cleanup

* changing file name

* adding logArchive for pull action

* adding logArchive for checkoutBranch

* refactor zip archive log

* change structure

* adding PersistArchiveLogsForPiperStep function

* adding persist structure to checkout

* adding FileNameStep

* adding unit tests

* correct name

* change whitespace in yaml

* fixing unit tests

* fixing createTag unit test

* fixing unit test

* fixing unit test

* rename ArchiveOutputLogs to LogOutputManager

* refactor pointer structure

* adopt tests to pointer structure

* fixing / error in repo name

* adding log overview also after archive log

* change log output structure

* adding always execution log

* update unit tests

---------

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2024-10-10 13:42:09 +02:00
Manjunath
b9050b53a5
Handle options properly (#5142) 2024-10-09 12:13:43 +02:00
Manjunath
41536720c1
Flatten the simple bom (#5141) 2024-10-09 10:17:39 +02:00
Manjunath
20b7eff911
Run makeBOM after aggregateBOM (#5140)
* Run makeBOM after aggregateBOM

* Fix tests
2024-10-08 12:58:48 +02:00
Sarat Krishnan
033a429c49
Fix gcts deploy field anonymize (#5129)
* adding anonymisation for object field

* Further fixes to gcts deploy step

* syntax changes
2024-10-08 10:15:58 +02:00
Manjunath
c991c5b16d
Fix maven build failures due to makeBom goal (#5134) 2024-10-08 09:56:32 +02:00
Rinita Asani
f6231de55b
gctsExecuteABAPQualityCheck type mismatch (#5132)
* Adapting unit test to run for packages with namespace

* Correct type mismatch for object count
2024-10-07 16:08:27 +02:00
Vyacheslav Starostin
60cbddbd47
npm config doesn't fail when workspaces enabled (#5120)
* Add -ws=false -iwr to npm config get registry

* Add -ws=false -iwr to npm config set registry

* Fix test

* Fix test

---------

Co-authored-by: Manjunath <manjunath.mandya.surendrakumar@sap.com>
2024-10-07 11:55:20 +05:00
Oliver Nocon
ef25e31acb
fix(vault): properly consider vault parameters & flags (#5118) 2024-10-04 09:33:53 +02:00
Manjunath
5230c3d454
Include purl info in the event (#5092) 2024-10-02 09:34:34 +02:00
Srinikitha Kondreddy
90be7e43ad
feat: fail if script is not found in package.json file (#5029)
* feat: fail if script is not found

* fix tests

* Fix integration tests

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2024-09-16 12:32:15 +02:00
Jordi van Liempt
a2bafe2d7f
feat(sonar): Enable trustengine for token retrieval (#5046)
Co-authored-by: jliempt <>
2024-09-16 10:20:40 +02:00
Daria Kuznetsova
085a8c003b
fix(codeqlExecuteScan): handle spaces in path to maven settings file (#5037)
* added quotes for mvn settings path

* added logs

* removed logs, added excape symbol for spaces

* set quotes

* removed replacing

* changed quotes

* fixed tests

* removed extra log

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2024-09-12 10:15:11 +03:00
Jordi van Liempt
af5b738982
feat(trustengine): Integrate Trust Engine into step config resolver (#5032)
* trust engine config and handelling for vault

* add function for resolving trust engine reference

* refactor

* add basic test

* adapt to new trust engine response format

* remove accidental cyclic dependency

* move trust engine hook config

* refactor by separating code from vault

* move trust engine files to own pkg

* adapt to changes of previous commit

* log full error response of trust engine API

* enable getting multiple tokens from trustengine

* remove comment

* incorporate review comments

* go generate

* update unit tests

* apply suggested changes from code review

* fix unit tests

* add unit tests for config pkg

* make changes based on review comments

* make trust engine token available in GeneralConfig and minor fixes

* fix error logic when reading trust engine hook

* make getResponse more flexible and update logging

* update resource reference format

* improve URL handling

* improve logging

* use errors.Wrap() instead of errors.Join()

* update log messages based on suggestions

* remove trustengine resource ref from Sonar step

---------

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: jliempt <>
2024-09-11 15:20:28 +02:00
Johannes Dillmann
34f1057bfa
Copy full project (#5033) 2024-09-06 14:27:17 +02:00
Akramdzhon Azamov
91ae39c9d4
Added pagination logic for retrieving projects from Black Duck server (#5031)
* Added pagination logic for retrieving projects from Black Duck server

* fixed unit tests for getProject in blackduck

* fixed unit tests for getProject in blackduck

* fixed unit tests for getProject in blackduck
2024-09-05 09:36:14 +02:00
Daniel Mieg
cb45ad1b44
Add possible values and default (#5030) 2024-08-29 10:55:43 +02:00
Anil Keshav
238339c87e
Exposing build artifact metadata from maven and npm (#5008) 2024-08-27 08:24:38 +02:00
Tilo Körner
b5561aa8c1
add OriginHash to aakaas check (#5015) 2024-08-23 17:37:58 +03:00
Vyacheslav Starostin
8637f894f2
Add possibility to fetch jsonCredentialsAzure from Vault (#5011) 2024-08-19 16:21:44 +05:00
Googlom
773332fe1e
fix(artifactPrepareVersion): add missing error handling (#5005)
* add error handling

* add retries
2024-08-19 11:50:40 +05:00