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

4712 Commits

Author SHA1 Message Date
Vyacheslav Starostin
a50fad3b1a
feat(Splunk): Use repository and organization from pipelineEnv variable git/* (#4619) 2023-10-10 11:44:24 +02:00
Vyacheslav Starostin
7ab2386337
feat(mavenBuild): add the possibility to define stash groups need to be stashed/unstashed (#4573)
* Add stash param to mavenBuild

* go generate

* Delete default stash group

---------

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-10-09 15:52:13 +06:00
Anil Keshav
40e13f1635
feat (npmExecuteScripts) enhance multi package publish from npm builds (#4579)
* enabling publish to only publish sub packages

* changing directory and then coming back to original after the publish runs

* searching the glob tar and npmrc in the current directory

* excluding build descriptor check and addtional target tool check

* changing the npm pack before publish to run only in sub packages

* removing commented code clean up

* adding the correct npm pack

* improve logging

* fix error handling and a bit style fix

* fix unit tests

* remove commented lines

* respecting build descriptor list when provided

* improve docu for the step param

* fixing linting issues

* improve docu

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-10-09 09:21:09 +02:00
Akramdzhon Azamov
9e64744339
added logic of fetching golang private packages for whitesource step (#4595)
* added logic of fetching golang private packages for whitesource step and detectExecuteScan step

* changed logic of checking by config.PrivateModulesGitToken

* moved func prepareGolangPrivatePackages to golangBuild.go

* fix (gitOpsUpdateDeployment) add CA bundle options to plain clone and commit to trust enterprise github instances (#4602)

* downloading ca cert bundle when added as config

* adding logging statements

* allowing bats test to handle ca cert

* adding info message

* hard coding file names

* including correct http client util bundle

* removing logging message not needed

* adding cert bundle to commit and push

* improving the condition to add ca cert in commit and push

* fixing unit test

* fixing unit test

* fixing unit test

* fixing unit test

* fixing unit test

* feat(kanikoExecute): add dockerfilePath param to multipleImages (#4569)

* add containerDockerfilePath param to multipleImages

* rename ContainerDockerfilePath param to DockerfilePath

* Fix trailing spaces

---------

Co-authored-by: Egor Balakin <egor.balakin@sap.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>

* fix(helm): forward sourceRepositoryCredentialsId from groovy to go layer (#4604)

forward sourceRepositoryCredentialsId from groovy to go layer in the same way how this is done for the targetRepositoryCredentialsId

* feat(config): exporting generateConfig function and applying minor changes (#4605)

* exporting generateConfig function and applying minor changes

* Added setConfigOptions to set configOptions variable.
Added possibility to set format output, json or yaml for now.

* Correcting mistake on cmd/getDefaults.go

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>

---------

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>

* moved func prepareGolangPrivatePackages to pkg/golang

---------

Co-authored-by: Akramdzhon Azamov <MY_NAME@example.com>
Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
Co-authored-by: Anil Keshav <anil.keshav@sap.com>
Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>
Co-authored-by: Egor Balakin <egor.balakin@sap.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
Co-authored-by: Jk1484 <35270240+Jk1484@users.noreply.github.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-10-06 16:22:26 +02:00
Jordi van Liempt
5a56726bde
Revert "chore(vault): custom retry check function (#4475)" (#4616)
This reverts commit 2ab1e2a1bc.
2023-10-06 10:22:45 +02:00
Jk1484
010aea0edb
feat(config): exporting generateConfig function and applying minor changes (#4605)
* exporting generateConfig function and applying minor changes

* Added setConfigOptions to set configOptions variable.
Added possibility to set format output, json or yaml for now.

* Correcting mistake on cmd/getDefaults.go

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>

---------

Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-10-04 12:44:48 +02:00
Marcus Holl
c81e322986
fix(helm): forward sourceRepositoryCredentialsId from groovy to go layer (#4604)
forward sourceRepositoryCredentialsId from groovy to go layer in the same way how this is done for the targetRepositoryCredentialsId
2023-09-29 13:59:56 +02:00
Egor Balakin
4dec3c3c60
feat(kanikoExecute): add dockerfilePath param to multipleImages (#4569)
* add containerDockerfilePath param to multipleImages

* rename ContainerDockerfilePath param to DockerfilePath

* Fix trailing spaces

---------

Co-authored-by: Egor Balakin <egor.balakin@sap.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
2023-09-28 14:14:35 +02:00
Anil Keshav
b34ea9e335
fix (gitOpsUpdateDeployment) add CA bundle options to plain clone and commit to trust enterprise github instances (#4602)
* downloading ca cert bundle when added as config

* adding logging statements

* allowing bats test to handle ca cert

* adding info message

* hard coding file names

* including correct http client util bundle

* removing logging message not needed

* adding cert bundle to commit and push

* improving the condition to add ca cert in commit and push

* fixing unit test

* fixing unit test

* fixing unit test

* fixing unit test

* fixing unit test
2023-09-28 11:31:51 +02:00
Daria Kuznetsova
ccd2acfbb2
fix(codeqlExecuteScan): logging when use both Vault and Jenkins Credentials config (#4600)
* added logging if unauthorized for github

* refactored

* fixed log message & added logging github response

* deleted extra log

* refactored log message
2023-09-27 14:59:35 +03:00
Jk1484
2ab1e2a1bc
chore(vault): custom retry check function (#4475)
* vault retry check function

---------

Co-authored-by: I557621 <jordi.van.liempt@sap.com>
2023-09-26 11:57:36 +05:00
Dmitrii Pavlukhin
4c9dd41cbc
detect-removed-temporary-unmap-enforcement (#4594) 2023-09-25 16:12:19 +03:00
sumeet patil
33067a5cb4
fix(codeqlExecuteScan): Fix working directory (#4597) 2023-09-25 16:52:54 +05:30
renovate[bot]
9b6a465111
fix(deps): update module golang.org/x/oauth2 to v0.12.0 (#4584)
* fix(deps): update module golang.org/x/oauth2 to v0.12.0

* run go mod tidy

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jliempt <>
2023-09-22 09:15:13 +02:00
renovate[bot]
882dcc7b41
chore(deps): update styfle/cancel-workflow-action action to v0.11.0 (#4447)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-21 16:29:13 +02:00
renovate[bot]
09e855b73c
chore(deps): update actions/checkout action to v4 (#4585)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-09-21 14:11:11 +00:00
renovate[bot]
040cb4b6b9
fix(deps): update github.com/bndr/gojenkins digest to 45fe314 (#4445)
* fix(deps): update github.com/bndr/gojenkins digest to 45fe314

* run go mod tidy

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jliempt <>
2023-09-21 16:00:57 +02:00
larsbrueckner
a946034f74
toolrecord/whitesource: improve URL generation (#4581)
toolrecord file:
- drop the hardcoded default url
- use the more user-friendly project ID instead of the project token
2023-09-20 20:43:41 +05:30
Googlom
3744787348
chore(refactor): Switch GitHub actions provider to use github sdk (#4563)
* refactor github package and use builder pattern for client

* switch to github package

* some renamings

* fix panic on uninitialized provider

* fix according to review comments

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-09-20 09:38:45 +00:00
Dmitrii Pavlukhin
1e993263e6
removed enforcement (#4576)
Co-authored-by: Andrei Kireev <andrei.kireev@sap.com>
2023-09-19 12:20:55 +03:00
tiloKo
fc6c4d8276
Update abapEnvironmentPipelineDefaults.yml (#4578)
HCUs from 4 to 2
2023-09-19 09:00:40 +02:00
Dmitrii Pavlukhin
971d5d1461
Making detect8 default script (#4568)
* made detect8 default

* amended tests to reflect detect 8

* amended

* amend

* amend

* amend tests

* 1

* 1

* tests-with-temp-changes-for-transition

* removed auto unmapping for detect7

* added-old-parameters-as-deprecated
2023-09-18 16:33:09 +03:00
Pavel Busko
caee8db407
feat(dockerExecute): Infer Kubernetes securityContext from dockerOptions (#4557)
* 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>
2023-09-18 13:05:01 +02:00
Christopher Fenner
e38ee67748
fix(docs): add Karma deprecation notice (#4567) 2023-09-18 09:45:07 +02:00
Artem Bannikov
c1bb7f86bc
[tmsUpload] Use Golang implementation of the step by default (#4535)
* Use new Golang implementation of tmsUpload step by default
2023-09-14 09:02:10 +00:00
Dmitrii Pavlukhin
b3dc339058
Removed quotation for several detect8 parameters to fix double quotation issue (#4565)
* removed quotation for detect8

* changed order of args

* chagned order
2023-09-14 10:07:53 +03:00
Aaron Schweig
20b3c0d728
chore: ⬆️ upgrade to golang.org/x/mod/modfile v0.12.0 to enable the usage of go >1.21 (#4558)
* chore: ⬆️ upgrade to golang.org/x/mod/modfile v0.12.0 to enable the usage of go >1.21

* chore: run

---------

Co-authored-by: Jk1484 <35270240+Jk1484@users.noreply.github.com>
2023-09-13 15:38:19 +05:00
larsbrueckner
ef11a8a726
toolrecord files: remove the timestamp from the filename (#4540)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-09-12 22:03:49 +05:30
sumeet patil
4de0e3e0f3
fix(cxone): fix test cases (#4564)
Co-authored-by: thtri <thanh.hai.trinh@sap.com>
2023-09-12 19:33:44 +05:30
Daria Kuznetsova
1704758563
fixed setting git ref for branch with slashes in name (#4554)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-09-12 13:45:05 +03:00
Oliver Feldmann
1aac091497
Enable wdi5 autologin (#4522)
* 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
2023-09-12 10:11:28 +02:00
Egor Balakin
3eb4f165b2
feat(commonPipelineEnvironment): encrypt CPE (#4504)
* encrypt CPE - init

* fix

* disable encrypt on Jenkins

* get PIPER_pipelineEnv_SECRET from vault

* reuse artifactPrepareVersionOptions

* encrypt only with orchestrator.GitHubActions

* Workaround: orchestrators expect json

* add encryptedCPE flag

* remove JSON workaround

* throw error if stepConfigPassword is empty

* fix log messages

---------

Co-authored-by: Egor Balakin <egor.balakin@sap.com>
2023-09-11 12:58:57 +04:00
Jk1484
bbf9122764
fix(docs): fixing documentation for violating markdownlint rules. (#4559)
* fix(docs): fixing documentation for violating markdownlint rules.

* correct indent

* Apply suggestions from code review

* correct list

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-09-08 12:07:46 +02:00
Marcus Holl
e80adc5ab9
helmExecute: opt out from template parsing (#4511)
Add option to opt out from helm template parsing

Co-authored-by: Linda Siebert <linda.siebert@sap.com>
Co-authored-by: Alexander Link <33052602+alxsap@users.noreply.github.com>
2023-09-08 10:30:30 +02:00
Linda Siebert
b58bb87114
Set chartPath to general for kubernetesDeploy (#4537) 2023-09-07 11:36:59 +02:00
Marcus Holl
9d27e0e7b2
cnbBuild triggered by buildExecute (#4498)
* 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>
2023-09-07 11:14:04 +02:00
Jk1484
9ba76d7479
docs(dockerExecuteOnKubernetes): fixing broken example 3 (#4549) 2023-09-06 11:24:04 +02:00
renovate[bot]
67bcada96a
fix(deps): update module github.com/hashicorp/vault to v1.14.0 [security] (#4427)
* fix(deps): update module github.com/hashicorp/vault to v1.13.5 [security]

* fix(deps): update module github.com/Azure/azure-sdk-for-go/tree/sdk/storage/azblob to v0.4.1

* fix(deps): update module github.com/hashicorp/vault/sdk to v0.9.2
fix(deps): update module oras.land/oras-go to v1.2.3

* fix(deps): update module github.com/hashicorp/vault/sdk to v0.9.2-0.20230530190758-08ee474850e0
fix(deps): update module github.com/hashicorp/vault/sdk to v0.9.2-0.20230530190758-08ee474850e0

* replacing deprecated function

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-09-06 13:12:51 +05:00
michaelkubiaczyk
bc8d5efe46
Cxone release supporting applications (#4548)
* 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

* fix:formatting

* fix(checkmarxOne):yamllint too many blank lines

* fix(checkmarxOne):unit test

* fix(checkmarxOne):generated code

---------

Co-authored-by: thtri <trinhthanhhai@gmail.com>
Co-authored-by: Thanh-Hai Trinh <thanh.hai.trinh@sap.com>
2023-09-05 21:49:27 +02:00
Dmitrii Pavlukhin
0f04b5f6e1
added detect8 support (#4545) 2023-09-01 15:25:37 +03:00
sumeet patil
f6e6d04408
feat(fortifyExecuteScan): Fortify proxy parameter (#4543) 2023-08-31 17:18:18 +05:30
Christopher Fenner
8507ca2c17
feat(logging): print out commit sha of code used to build the binary (#4541)
* feat(logging): print out commit sha of code used to build the binary

* Update piper.go
2023-08-30 17:28:03 +02:00
renovate[bot]
4cdab6e5fb
fix(deps): update module github.com/google/uuid to v1.3.1 (#4532)
* fix(deps): update module github.com/google/uuid to v1.3.1

* run go mod tidy

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-08-29 16:37:00 +02:00
Googlom
e805beda70
feat(orchestrator): add implementation for GitHub (#4525)
* add comments with examples to methods

* a bit refactoring and cleanup

* actionsURL

* GetBuildStatus

* GetBuildID, GetChangeSet, GetPipelineStartTime

* GetStageName and GetBuildReason

* refactor fetching jobs

* GetJobName and GetJobURL

* chnage GetBuildURL

* refactor actionsURL

* fix guessCurrentJob bug

* unit tests for all

* refactor GetLog

* refactor and fix tests

* change GetBuildURL to use env vars

* fix issues

* leftover

* add comment

* fix according to review comments

---------

Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-08-29 09:32:35 +02:00
Jordi van Liempt
b7663466f3
chore(docs): Document selenium step being Jenkins-only (#4510)
Co-authored-by: jliempt <>
2023-08-28 16:42:07 +02:00
Jordi van Liempt
c77920946d
chore(integration): Skip failing Karma integration test for now (#4538)
Co-authored-by: jliempt <>
2023-08-28 15:50:35 +02:00
Christopher Fenner
0c1a52acd8
fix(malwareExecuteScan): add missing error handling (#4536) 2023-08-28 15:06:35 +02:00
Jk1484
e54d603898
chore(deps): update golang version to 1.19 (#4533)
Co-authored-by: I557621 <jordi.van.liempt@sap.com>
2023-08-23 16:29:02 +02:00
renovate[bot]
73de970d81
chore(deps): update nosborn/github-action-markdown-cli action to v3 (#4526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 13:03:09 +02:00
renovate[bot]
31c76be81c
chore(deps): update paambaati/codeclimate-action action to v5 (#4527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-23 13:02:45 +02:00