* added check if git branch name starts with refs/
* added check if branch name from jenkins starts with refs/
* added tests
* hardcoded refs/tags to test
* removed hardcode
---------
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
* fix: make quoting null safe
* fix: apply quoting in artifact set version
* fix: add quoting to more shell step
* refactor: use import alias
* fix: further quoting
---------
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
due to missing quoting, command injection was possible via
pipeline configuration.
This is now fixed using a quoting and escaping utility.
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
* Fix NPE in utils unstash
* fix test
---------
Co-authored-by: Vijayan T <vijayanjay@gmail.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
* chore: switch to new parameter name
Since warnings-ng plugin version 11 the blameDisabled parameter
has been replaced by skipBlames.
To be compatible with Jenkinsfile Runner we put the recordIssues step
into a try/catch, so no exception is thrown and the build fails.
* docs: improve wording
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
---------
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
* new Piper step abapEnvironmentUpdateAddOnProduct
* modified entity json format and some minor function changes
* modified groovy file for pipelineStageIntTests and addonDescriptor to be mandatory in yaml file
* sync with fork branch ranliii/abap-environment-update-addon-product
* added generated file
* fail the step as long as addon update not successful and unit tests
* added docu for the new step
* tried to fix groovy unit test
* tried to fix groovy unit test 2
* for test
* fixed error
* fixed error 2
* tried to fix groovy unit test error
* added groovy unit test for new Piper step
* tried to fix groovy unit test error
* tried to fix groovy unit test error 2
* changes after first review
* remove .DS_Store
* for test
* revert test relevant changes
* try to fix groovy test error
* try to fix groovy error
* 3rd try to fix groovy test error
* rewrite the failed groovy test
* small changes and try with timeout as well as poll interval
* changes for test
* revert test-related changes
* try to fix errors
* Revert "Merge branch 'master' into abap-environment-update-addon-product"
This reverts commit 1ee0bcd80dd8ec58102ece31cacbe08bfd669ba1, reversing
changes made to 3c4a99dfb027ad561f0a52e888acaffb7be0053f.
* try to fix error
* try to fix error 2
* try to fix error 3
* align go.mod with master branch
* revert go.mod to commit 3c4a99d
* for test
* revert test changes
* new unit test
* Revert "Revert "Merge branch 'master' into abap-environment-update-addon-product""
This reverts commit 363c0380011e148231273d3f180dcec4d5cba88f.
* go generate after merging master
---------
Co-authored-by: Jk1484 <35270240+Jk1484@users.noreply.github.com>
Co-authored-by: Ran Li <ran.li01@sap.com>
Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
* Allow cALM service keys
* Fix typo
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
* fix typo
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
* Hardcode tms endpoint in calm test case
* Add new serviceKey parameter
* Use new serviceKey parameter
With deprecation warning if old tmsServiceKey parameter is used
* Add unit tests and optimise
* Remove tms from service key log message
* Apply suggestions from code review
Co-authored-by: Artem Bannikov <62880541+artembannikov@users.noreply.github.com>
* Remove unused json fields mapping
* Apply review suggestion
* Apply further review suggestions
* Use new parameter name in groovy
* Generate again
* Fix groovy test
---------
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
Co-authored-by: Artem Bannikov <62880541+artembannikov@users.noreply.github.com>
* Allow running as different user on Kubernetes
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
* infer securityContext from dockerOptions
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
* verify --user flag value
---------
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
* Enable wdi5 autologin
By also providing the basic auth credential on the env vars wdi5_username and wdi5_password we enable the wdi5 autologin feature, where the user does not have to remap the credentials in their wdi5 configuration. See https://ui5-community.github.io/wdi5/#/authentication?id=credentials
* Add documentation
* Add wdi5 parameter
* Add tests
* Add cnbBuild to buildExecute
* Error message change
* Make if check simpler
Co-authored-by: Alexander Link <33052602+alxsap@users.noreply.github.com>
* Switch order of check
---------
Co-authored-by: Linda Siebert <linda.siebert@sap.com>
Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>
Co-authored-by: Alexander Link <33052602+alxsap@users.noreply.github.com>
We should use Utils.stash instead of native steps.stash calls (Jenkins)
since important logging is missing.
The default Jenkins stash step does not log any metadata like
stash name, patterns, etc.
* 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>
* Don't unstash the piper binary if it is already present.
* Fixed method name.
* Removed changes to unit test.
* Updated unit tests to account for the check whether the piper binary exists.
* Updated the Maven test to account for the piper binary existance check.
* Updated tests to account for the piper binary existance check.
* Set the shell return value for a test.
* See if it will output the real failure reason.
* Removed code that triggered a different error message if sh(Map) is encountered.
* Added missing constructor parameter.
* Pass the script to the constructor of PiperGoUtils.
* Reverted change to code that is now removed from the master branch.
* Re-instated deleted function.
* Re-add fix to use the correct constructor for PiperGoUtils.
* Add method to remove values from commonPipelineEnvironment
* Add test to validate remove value from map
Co-authored-by: i850487 <thilaknath.ashok.kumar@sap.com>
* 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>
Sets git reference and gitRemoteCommitId.
Jenkins has 2 strategies - 'Merging the pull request with the current target branch revision' and 'The current pull request revision'. When 'Merging the pull request with the current target branch revision' is run, Jenkins creates a local merge commit and runs a job for that particular merge commitId. This commitId is then used for codeql to upload sarif, on upload it throws an error as the merge commit does not exist in github. To resolve this we have introduces a new variable 'gitRemoteCommitId' in commonPipelineEnvironment which gives the remote merge commit id.