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

4704 Commits

Author SHA1 Message Date
Anil Keshav
8dc2a1bfb4
feat: Add imagePushToRegistry step (#4609)
* imagePushToRegistry new step

* adding copy and push functionality

* including only copy correctly

* groovy step for imagePushToRegistry

* create .docker folder

* imagePushToRegistry new step

* adding copy and push functionality

* including only copy correctly

* groovy step for imagePushToRegistry

* create .docker folder

* fix CopyImage

* test

* test

* Correct docker config path

* Update

* Update

* Update

* Update

* Update

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Test

* Comment some logic

* Test: move regexp logic

* Test

* Update

* Update

* Clean up

* Update

* Update

* Update interface

* Rename function

* imagePushToRegistry: small refactoring (#4688)

* imagePushToRegistry new step

* adding copy and push functionality

* including only copy correctly

* groovy step for imagePushToRegistry

* create .docker folder

* Correct docker config path

* Update

* Update

* Update

* Update

* Update

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Use creds from Vault

* Test

* Comment some logic

* Test: move regexp logic

* Test

* Update

* Update

* Clean up

* Update

* Update

---------

Co-authored-by: Keshav <anil.keshav@sap.com>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>

* Update step yaml file

* Update interface

* Rename func

* Update tests

* Update interface, create mock methods, update tests

* Update mock

* Add md file

* Fix groovy doc, unit test, go unit test

* Update

* Add unit tests

* Support tagLatest param

* Fetch source creds from Vault

* Update yaml file

* Support multiple images

* Update test

* Support copy images in parallel

* Update yaml

* Clean up

* Return err if no creds provided

* Fix tests

* Add err msg

* Add debug log

* Do not use CPE for targetImages

* Support platform

* Delete Jenkins specific creds

* Update groovy: do not handle Jenkins creds

* Delete unused code

* Fix: Support platform

* Fix: Support platform

* Apply suggestion from code review

Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>

* Apply suggestion from code review

Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>

* Add tests for parseDockerImageName

* Add comment that tagArtifactVersion is not supported yet

* Set limit of running goroutines

* Fix: Set limit of running goroutines

* The tagArtifactVersion is not supported yet

---------

Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
Co-authored-by: Egor Balakin <egor.balakin@sap.com>
Co-authored-by: Vyacheslav Starostin <vyacheslav.starostin@sap.com>
Co-authored-by: Vyacheslav Starostin <32613074+vstarostin@users.noreply.github.com>
Co-authored-by: Egor Balakin <14162703+m1ron0xFF@users.noreply.github.com>
2023-11-30 15:06:31 +06:00
Oliver Feldmann
cce7c0d384
Use new env var (#4698) 2023-11-29 12:29:29 +01:00
Silvestre Zabala
2738a91057
Fix logic of fetching golang private packages for `detectExecute step (#4695)
In #4595 a typo was committed that prevents Go private packages from
being correctly set up in the `detectExecute` step

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-11-29 10:23:38 +01:00
Daniel Mieg
0a738e882c
[ABAP] Refactor steps to allow API migration (#4687)
* Initial API Manager

* Intermediate part

* Intermediate step

* Fix utils tests

* Adapt pull

* Migrate Checkout

* Refactor createTags

* Refactoring

* Setup tests for SAP_COM_0510

* Add tests

* Refactor parsing

* Add retry to clone

* refactor

* Refactor and tests

* Fix function call

* Adapt create tag tests

* Adapt tests

* Add tests

* Fix tests

* Fix test

* Fix client mock

* Add unit test comments

* Add missing parameters

* Branch not mandatory for clone

* Improve switch branch trigger

---------

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2023-11-28 13:26:31 +01:00
Oliver Feldmann
17de9ed34c
Allow cALM service key for cTMS steps (#4661)
* 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>
2023-11-27 14:28:18 +01:00
Vyacheslav Starostin
c6c02fc31d
orchestrator(GHActions): align GetJobURL method with Piper's expectations (#4685)
* Align build and job urls with what is expected by piper

* Add comments, delete unused func

* Clean up

* Update tests

* Update GetJobURL

* Fix test

* Update

* Clean up
2023-11-27 17:04:49 +06:00
Pavel Busko
0baa6a6fcb
feat(cnbBuild): Use Paketo Jammy builder as default (#4694) 2023-11-23 13:37:19 +01:00
Googlom
0006f10918
fix log downloading in GH orchestrator (#4683)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-23 12:21:40 +01:00
Googlom
0d6fb16034
add deprecation warning (#4691)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-23 09:42:02 +01:00
Pavel Busko
9596f546c0
Bump CNB_PLATFORM_API to v0.12 (#4686)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2023-11-21 13:26:52 +01:00
Daria Kuznetsova
ca633186f9
refactor(codeqlExecuteScan): refactor codeql reporting (#4682)
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-11-20 18:51:04 +05:30
Googlom
a838f485d7
add alias to serverUrl (#4670)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-20 11:11:54 +01:00
renovate[bot]
69b35ff007
fix(deps): update module golang.org/x/crypto to v0.15.0 (#4664)
* fix(deps): update module golang.org/x/crypto to v0.15.0

* go mod tidy

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jliempt <>
2023-11-16 13:01:04 +01:00
Pavel Busko
63b7fd79bd
fix(cnbBuild): do not set supplementary groups for lifecycle (#4675)
Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
2023-11-14 14:01:23 +01:00
Daniel Mieg
6e2ecefc2f
Add scheduled status (#4668)
* Add scheduled status

* Add test

* Improve log output
2023-11-13 21:17:49 +01:00
tiloKo
2a98742f43
add semantic version, delete obsolete actual commit value (#4669) 2023-11-13 14:57:46 +01:00
renovate[bot]
f499e92bf1
fix(deps): update module golang.org/x/sync to v0.5.0 (#4589)
* fix(deps): update module golang.org/x/sync to v0.5.0

* go mod tidy

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jliempt <>
2023-11-13 12:38:18 +01:00
Jk1484
f2b236c537
feat(npmExecuteScripts): added option to skip installing dev. deps. (#4660)
* feat(npmExecuteScripts): added option to skip installing dev. deps.

* added unit tests

* setting of OpenFile function for local testing

---------

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-11-10 11:04:00 +01:00
Vyacheslav Starostin
54604fb52d
Remove logic related to Windows binary (#4659)
* Remove building and publishing Windows binary

* Remove logic related to Windows binary

---------

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-11-09 17:04:17 +06:00
trancy
428afbb635
feat(dockerExecute): print docker image (#4534)
* print docker image for dockerExecute

* Update dockerExecute.groovy

---------

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
Co-authored-by: Jesse Awan <jesse.awan@sap.com>
2023-11-08 00:50:07 +01:00
Anil Keshav
ef9b3d0dc9
feat (mavenBuild) allow flags to be modified during maven deploy (#4638)
* allow flags to be modified during maven deploy

* fix unit test

* fix unit test 2
2023-11-08 00:25:16 +01:00
Manjunath
ae7bfa5d92
Include createBOM flag in MTA build (#4629)
* Include createBOM flag in MTA build

* Uncomment bom creation

* Changed sbom path

* Changed source path

* Reverted source path and included folder path to bom

* Test docker image

* Test docker image

* sbom name change

* Removed the redundent log
2023-11-07 09:16:10 +01:00
Vyacheslav Starostin
59c2f75ce1
Splunk: Initialize Splunk client if dsn or prodCriblEndpoint provided (#4653)
* Initialize Splunk client if dsn or prodCriblEndpoint provided

* Fix tests

* Apply suggestions from code review

* go generate

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-11-06 14:25:13 +06:00
Googlom
68d034992f
replace plus sign (#4656)
Co-authored-by: Gulom Alimov <gulomjon.alimov@sap.com>
2023-11-03 13:37:23 +05:00
Pavel Busko
26bfec19b3
feat(cnbBuild): support builders with different CNB user ids (#4625)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
2023-11-02 16:03:11 +01:00
Daria Kuznetsova
df0c9c7b3f
fix(codeqlExecuteScan): exclude codeqlDB from uploaded sources to github (#4652)
* fixed unzipping db sources without db dir

* fixed tests
2023-10-31 14:03:57 +03:00
Srinikitha Kondreddy
5dea6237f2
Add warning message when cf native builds uses bg deployment (#4646)
* Add warning message when cf native builds uses bg deployment

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2023-10-30 12:40:01 +01:00
Srinikitha Kondreddy
daf159ae11
Add tmsExport to release step (#4648) 2023-10-27 14:14:19 +02:00
Artem Bannikov
e11896c5b2
[tmsUpload, tmsExport] Minor: remove confusing comments (#4640)
* Remove confusing comments in tmsClient.go
2023-10-24 11:43:37 +02:00
thtri
f0bd3950c8
fix(cxone):update Name field in reporting for policy as code (#4637) 2023-10-19 19:02:12 +00:00
Jordi van Liempt
d05b53cccd
fix(Vault): retry Vault request (EOF) errors (#4620)
* retry Vault request errors and add extensive logging

* fix sigsegv and change logging

* refining logs

* changing debug to info

---------

Co-authored-by: jliempt <>
Co-authored-by: Muhammadali Nazarov <muhammadalinazarov@gmail.com>
2023-10-19 14:34:03 +02:00
Daria Kuznetsova
6331d1b839
feat(codeqlExecuteScan): cloning project from non-github scm to github #4630
Co-authored-by: sumeet patil <sumeet.patil@sap.com>
2023-10-18 16:50:15 +05:30
Andrei Kireev
49f4c81344
Add new unified fields to Mend and Blackduck SARIF (#4611)
* Add new unified fields to Mend and Blackduck SARIF

* fmt project

---------

Co-authored-by: Dmitrii Pavlukhin <dmitrii.pavlukhin@sap.com>
2023-10-17 11:48:52 +02:00
Vyacheslav Starostin
3761a9f68a
artifactPrepareVersion: support conditions for customTLSCertificateLinks parameter (#4631)
* Add conditions for customTlsCertificateLinks

* go generate
2023-10-16 17:56:59 +06:00
thtri
646d17bcfe
CheckmarxOne: Fix 1st scan failed due to 403 forbiden (#4633)
* fix(cxone): 1st scan failed due to 403 forbiden

* fix(cxone): 1st scan failed due to 403 forbiden

* fix(cxone): 1st scan failed due to 403 forbiden
2023-10-16 13:06:30 +02:00
renovate[bot]
3a90ee3ca9
fix(deps): update module github.com/hashicorp/vault to v1.14.1 [security] (#4550)
* fix(deps): update module github.com/hashicorp/vault to v1.14.3 [security]

* update to v1.14.1 instead due to Go version

* github.com/hashicorp/vault@v1.14.1

* go mod tidy

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jliempt <>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-10-13 16:23:31 +02:00
Artem Bannikov
09940e8f0a
[tmsUpload, tmsExport] Provide additional log message on successful upload and export to node (#4624)
* Provide additional log message on successful upload and export to node

---------

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2023-10-13 15:51:21 +02:00
dependabot[bot]
d238a79ad1
build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0 (#4628)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-13 15:37:37 +02:00
Rinita Asani
4ff5271c26
gCTSExecuteABAPQualityCheck_namespace_objects (#4623)
* Adapting unit test to run for packages with namespace

* Handling classes with namespace

* support namespace obj for ATC
2023-10-11 11:24:56 +02:00
Thilaknath
e22671a9a0
Introduce filterRegex parameter for performance report publisher (#4555)
* Update default_pipeline_environment.yml

Add filterRegex parameter to jmeter configuration. Set it to an empty string as generated from pipelinesyntax reference in jenkins

* Update testsPublishResults.groovy

Add the filterRegex param to the publishJmeterReport plugin in testPublishResults

* Update documentation to include filterRegex

---------

Co-authored-by: Anil Keshav <anil.keshav@sap.com>
2023-10-11 10:59:15 +02:00
Christopher Fenner
20e1fb53aa
chore(vault): structure vault logs (#4627)
* structure vault logs

* Update client.go
2023-10-11 10:14:31 +02:00
Vyacheslav Starostin
14c7feba1c
feat(artifactPrepareVersion): Support custom certificates (#4617)
* Add CertificateDownload func to certutils package

* Add customTlsCertificateLinks param for artifactPrepareVersion

* Add the possibility to provide custom certs for artifactPrepareVersion

* Update tests

* Return back build flags

* Return back build flags

* Update pkg/certutils/certutils.go

Apply suggestion from code review

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

---------

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2023-10-11 13:58:38 +06:00
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