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

561 Commits

Author SHA1 Message Date
Linda Siebert
b68f549923
CPI- Remove platform parameter (#2956)
* Remove platform from yaml and generated

* Remove from tests and md
2021-06-30 14:32:30 +02:00
Siarhei Pazdniakou
54f2a0d471
Added go-based influxWriteData step (#2890)
* Added go-based influxWriteData step

* Wrote tests & fixed issues

* Fixed issues

* Created go-based step tests. Fixed issues

* Fixed issues

* Integration test was added

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-06-30 11:18:49 +02:00
ffeldmann
3f6eb603c7
Error logging (#2947)
* (feat) adds error logging output for downloading reports from whitesource

* Extended error logging with errors.Wrapf()

* Adjusted whitesource tests
2021-06-30 11:11:41 +02:00
Thorsten Duda
7910df0e8c
new step integrationArtifactTriggerIntegrationTest (#2951)
* new step integrationArtifactTriggerIntegrationTest

* add new step into allow list

* add the new step to main command

* refer cpe

* remove unused unit tests

* Check methods and URLs of http request

* Add TriggerIntegration to mockingutils

* Format code

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Linda Siebert <linda.siebert@sap.com>
2021-06-29 14:50:19 +02:00
Oliver Feldmann
90d0baa56f
Put share cpi parameters in general scope (#2948)
Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2021-06-29 10:09:18 +02:00
Linda Siebert
49f4fcf43b
CPI- Change resourceRef of apiServiceKey (#2950)
* Change name and param in yaml

Change name and param in resourceRef of apiServiceKey param

* Generate go code
2021-06-28 16:57:37 +02:00
Linda Siebert
6426a2f792
CPI- Refactor Credential ID (#2946)
* Change credential name in yaml

Change cpiAPIServiceKeyCredentialId to cpiApiServiceKeyCredentialsId in cpi yaml files

* Refactor groovy files

Change cpiAPIServiceKeyCredentialId to cpiApiServiceKeyCredentialsId in cpi groovy files

* Change credential name in md

Change cpiAPIServiceKeyCredentialId to cpiApiServiceKeyCredentialsId in cpi md files
2021-06-28 14:54:03 +02:00
Sven Merk
7b553e1e9a
fix(fortifyExecuteScan): Address module interdependencies (#2938)
* Make sure artifacts go to local repo

* Just package

* Fix test

* Try out silent mode

* Try fail at end

* Bring resilience back

* Follow new strategy

* Fix test
2021-06-28 12:40:20 +02:00
Linda Siebert
78a29d782b
CPI - Introduce service key (#2901)
* Switch to service key for CPI GetMplStatus

Introduces read method for service key files, mock utils and tests.

* Use secret text instead of file

* Change serviceKey definition

* Update cpiUpload to use Service Key

retrieved the host and uaa information from service key

* Update cpiDeploy to use service key

retrieved the host and uaa information from service key

* Update cpiServiceEndpoint to use Service Key

retrieved the host and uaa information from service key

* Update cpiDownload to use Service Key

retrieved the host and uaa information from service key

* Update cpiUpdateConfig to use Service Key

retrieved the host and uaa information from service key

* Refactor serviceKey var name

* Fixed references to service key to follow the real format

they should be accessed through oauth instead of uaa because of the format of the json

* Rename ServiceKey to APIServiceKey

To support having a different service key(and for readability), we need to change the name to API.

* Add STAGES and STEPS yaml

add in to each yaml file of cpi integration

* Revert "Add STAGES and STEPS yaml"

This reverts commit aa2665d158.

* Change comments/formatting commonUtils

Make comments more understandable and follow code climate suggestions

* Change documentation files for steps

remove OAuth and host and change credentials to be servicekey

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2021-06-28 10:50:33 +02:00
Marc Bormeth
b5357f9437
feat: Add environment information to orchestrator package (#2942)
* Fix Orchestrator detection

* Add unit tests

* Add environment info to orchestrator package
2021-06-25 10:50:56 +02:00
Kevin Stiehl
a48b8afc31
fix(commonPipelineEnvironment): keep json numbers untouched (#2908)
* keep numbers untouched

* rebase master
2021-06-23 20:20:43 +02:00
Sven Merk
e94cbb0840
Revert "fix(fortifyExecuteScan): Support MTA interdepedencies (#2916)" (#2937)
This reverts commit f7bc956058.
2021-06-23 17:20:15 +02:00
larsbrueckner
61fe88e199
Add "toolrecord" files to Fortify, Checkmarx, Protecode and Whitesource results (#2929)
* Toolrecord framework -
provide a common entry point for post processing code scan results

Changes to be committed:
	new file:   pkg/toolrecord/REAMDE_toolrecord.md
	new file:   pkg/toolrecord/toolrecord_main.go
	new file:   pkg/toolrecord/toolrecord_test.go

* Add toolrecord file to Checkmarx results
modified:   cmd/checkmarxExecuteScan.go

* Add toolrecord file to Fortify results
	modified:   cmd/fortifyExecuteScan.go

* Add toolrecord file to Whitesource results
modified:   cmd/whitesourceExecuteScan.go

* unset umask (#2927)

* (feat) adds error logging output for downloading reports from whitesource (#2928)

* Add toolrecord file to Protecode results

* address code climate findings (1/2)

* address codeclimate findings (2/2)

* add comments to all methods

Co-authored-by: Kevin Stiehl <kevin.stiehl@numericas.de>
Co-authored-by: ffeldmann <felix@bnbit.de>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-06-23 15:05:00 +02:00
Sven Merk
f7bc956058
fix(fortifyExecuteScan): Support MTA interdepedencies (#2916)
* Make sure artifacts go to local repo

* Just package

* Fix test
2021-06-23 11:55:34 +02:00
Andre
f63ac3bba0
mavenExecuteIntegration: add maven lifecycle goal as parameter (#2930)
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2021-06-22 12:51:47 +02:00
Kevin Stiehl
c0ae0df2f0
unset umask (#2927) 2021-06-21 09:45:10 +02:00
Oliver Nocon
8883a5148c
feat(mavenBuild): accept build profiles (#2921) 2021-06-18 11:57:00 +02:00
tiloKo
9db249fe1c
Docu updates abap steps (#2910)
* docu updates

* go generate

* remove example as better explained in scenario docu

* Update abapAddonAssemblyKitCheckCVs_generated.go

* PV Step update

* md lint

* create TV

* publish TV

* lint

* register

* release

* reserve

* yaml lint

* Update abapAddonAssemblyKitRegisterPackages_generated.go

* Update resources/metadata/abapAddonAssemblyKitCreateTargetVector.yaml

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* Update resources/metadata/abapAddonAssemblyKitPublishTargetVector.yaml

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>

* refer

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-06-17 21:28:15 +02:00
Kevin Stiehl
29b991d6fc
feat(commonPipelineEnv): consume pipeline environment from env variable if set (#2919)
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-17 16:54:57 +02:00
Kevin Stiehl
80974ea930
update docker image (#2918)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-06-17 16:19:39 +02:00
Johannes Schneider
3fa46f20d3
report vulnerability reports in the aggregated vulnerability report only (#2915) 2021-06-17 13:58:10 +02:00
Oliver Nocon
188e409a87
feat(protecodeExecuteScan): allow scanning a binary (#2889)
* feat(protecodeExecuteScan): allow scanning a binary

so far the step only accepts a Docker image or a FetchURL
This adds functionality to also pass a FilePath

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Update protecodeExecuteScan.go

* Fix fmt

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Sven Merk <s.merk@sap.com>
2021-06-17 09:40:21 +02:00
Oliver Nocon
78d7c4c71a
fix(githubCreateIssue): prevent panic for Github error (#2914)
In case the Github connection leads to an error it can happen that a nil pointer dereference exception can occur.
This is to fix this.

Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-06-16 22:31:01 +02:00
Kevin Stiehl
ff507b959e
pin kaniko version to v1.3.0-debug (latest working version) (#2911) 2021-06-16 16:37:39 +02:00
Oliver Nocon
0b48bfcc73
feat: retrieve metadata by stepName - corrected (#2892)
* refactored getConfig to allow stepName param for metadata fetching

* extended step generator

* go generate

* Update cmd/getConfig.go

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

* Update cmd/getConfig.go

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

* Update cmd/getConfig.go

* update generated files

* update golden files to care for generator update

* update and add tests

* update generated files

* Update cmd/getConfig.go

* Update cmd/getConfig.go

* update/fix formatting

* feat: retrieve metadata by stepName - corrected

* update generation

* update condition logic for defaults

* update generation & tests

* support multiple conditions

* update generation

* Add generated

Co-authored-by: Leander Schulz <leander.schulz01@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Sven Merk <s.merk@sap.com>
2021-06-16 08:43:30 +02:00
Sven Merk
07b90dc10b
fix(fortifyExecuteScan): Throw error on classpath detection issues (#2876)
* Update fortifyExecuteScan.go

* Raise error to the top level

* Update fortifyExecuteScan.go

* Update fortifyExecuteScan.go

* Fix code and test

* Add tests

* Fix test

* Last attempt
2021-06-16 08:15:41 +02:00
Christopher Fenner
367ca6211a
refactor(protecode): simplify protecode calls (#2838)
* simplify protecode calls

* add todos

* reomve todo

* restore go.sum

* Update cmd/protecodeExecuteScan.go

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>

* Apply suggestions from code review

* remove productID

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2021-06-15 22:29:24 +02:00
Sven Merk
a43f46465a
feat(fortifyExecuteScan): HTML report for Fortify (#2879)
* Tune test

* Fix report implementation

* Fix tests

* Fix values

* Fix code and test

* Report writing fix

* Commit generated sources

* Update cmd/fortifyExecuteScan.go

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

* Externalize report generation

* Fix fmt

* Fix fmt 2

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-15 14:53:42 +02:00
Sven Merk
7fa31ae9cc
feat(http): Resilience via retry on intermittent communication issues (#2877)
* feat(http): Resilience on connectivity issues

* Update whitesourceExecuteScan.go

* Update splunk_test.go

* Fix initialization

* Change http interaction

* Fix fmt and tests

* Final test fix
2021-06-15 11:13:24 +02:00
Tom Bendrath
3520b36558
Add mtaBuild step parameters: target, source (#2858)
* Add mtaBuild step parameters: target, source

* Add unit test for mtaBuild with custom source

* Simplify mtaBuild parameter defaults for source, target

* Fix mtaBuild default values and path in unit test

* Only append custom target and source params in mtaBuild

* Set mtaBuild source and target to ./ when not customized

* mtaBuild unit test: fix expected params sequence

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2021-06-14 16:06:47 +02:00
Oliver Feldmann
f9bfb037a0
Don't configure secret with config file (#2866) 2021-06-14 15:42:23 +02:00
Marcus Holl
fe5ce61d9e
rfc upload (#2533)
* Add RFC upload command
2021-06-14 12:36:18 +02:00
Oliver Nocon
4250ca8bed
Revert "feat(getConfig): retrieve metadata by stepName (#2736)" (#2891)
This reverts commit ae4a24c594.
2021-06-14 10:57:44 +02:00
Andre
62810d01d0
docs: fortifyExecuteScan - aggregator pom (#2847)
* document fortify specifics

* go generate

* Update resources/metadata/fortify.yaml

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

* Update resources/metadata/fortify.yaml

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

* Update resources/metadata/fortify.yaml

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

* go generate

* Apply suggestions from code review

* chore

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-14 09:54:45 +02:00
lndrschlz
ae4a24c594
feat(getConfig): retrieve metadata by stepName (#2736)
* refactored getConfig to allow stepName param for metadata fetching

* extended step generator

* go generate

* Update cmd/getConfig.go

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

* Update cmd/getConfig.go

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

* Update cmd/getConfig.go

* update generated files

* update golden files to care for generator update

* update and add tests

* update generated files

* Update cmd/getConfig.go

* Update cmd/getConfig.go

* update/fix formatting

Co-authored-by: Leander Schulz <leander.schulz01@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: OliverNocon <oliver.nocon@sap.com>
2021-06-14 08:58:41 +02:00
Kevin Stiehl
6c7814e4d5
feat(cpm): Add read and write CPE Go step (#2888)
* add read write cpe go steps

* Update pkg/piperenv/CPEMap.go

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

* Update pkg/piperenv/CPEMap.go

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

* Update pkg/piperenv/environment.go

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

* Apply suggestions from code review

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

* rename file

* add error handling

* add error handling

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-11 16:17:40 +02:00
Oliver Feldmann
d0f7400122
kubernetesDeploy - Allow docker config.json file (#2829)
* Introduce docker config.json parameter for kubectl

* Use docker config.json parameter for helm

* Export definition of kube secret parameters

* fix username password existence check

* choose more fitting name for secret spec

* Adopt review suggestions

Co-authored-by: Roland Stengel <r.stengel@sap.com>
2021-06-11 10:41:03 +02:00
Roland Stengel
1eab39d847
solman upload split git documentation (#2831)
* Split git commit message scan from solman upload
2021-06-10 10:16:22 +02:00
Johannes Schneider
c22e0a1f0e
[WhitesourceExecuteScan] Fix Inconsistencies in Aggregated Report (#2872)
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2021-06-09 15:56:56 +02:00
Marc Bormeth
911d4bc770
feat(sonar): make step orchestrator-agnostic (#2874)
* Make sonarExecuteScan orchestrator-agnostic

* Increase coverage + support empty or false env vars

* Use cleared env for unit tests

* Refactor to standalone package

* Fix review findings

* Fix review findings

* Fix unit test

* Add logging

* Refactor

* Add to codeowners 😎

* Apply suggestions from code review

* Remove unreachable code

* no message

* fix typos

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-09 09:38:52 +02:00
Sven Merk
b7b775c981
Update whitesourceExecuteScan.go (#2875) 2021-06-08 11:03:57 +02:00
Christopher Fenner
8c5a7f5db5
feat(docs): add possibleValues for artifactPrepareVersion (#2865)
* correct docs

* update generated sources
2021-06-04 12:20:24 +02:00
Oliver Nocon
d8a8a73184
feat(commonPipelineEnvironment): add artifact coordinates (#2867)
* add coordinates to CPE

* revert go.mod changes
2021-06-02 15:41:05 +02:00
Mikalai Dzemidzenka
c38d231820
feat(gauge): migrate gaugeExecuteTests to go implementation (#2775)
* gaugeExecuteTests converted to golang

* rewrited gaugeExecuteTests to cross-platform implementation. Now gauge uses npm

* regenerated

* groovy file import fix

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-06-01 13:15:10 +02:00
Anil Keshav
a830a35800
Extending mavenBuild step with an option to perform maven deploy with publish flag (#2833)
* modifying detect.maven.excluded.scopes from TEST to test

* new maven alt deployment flags

* changing flag names

* tlsCertificate addtion

* adding publish flags

* new flags

* publish flag

* enhance maven builds

* enhance maven builds

* creating new settings xml

* updating project settings

* changing interface for artifactPreparation that uses the same maven util niterface

* adding general scope to maven params

* global reference

* removing vault tmp

* debuging deployment user

* more debug

* maven build paras

* using smaller case

* adding incorrect error check

* adding deployment flags

* code refactor

* unit tests

* changing scope of paramter for tls certs

* new scope for tls

* remove trailing space in mavenBuild.yaml

* trailing space fix

* typo fix and jenkins secret

* including jenkins credentials for repo pass in the maven build groovy

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-06-01 09:24:36 +02:00
Christopher Fenner
40c32598a4
feat(jenkins): update jenkins go dependency (#2848)
* update dependency

* use context

* regenerate mock

* decapitalize error messages

* use getBuildFromQueueID

* add comments about mockery

* update mocks

* update tests

* add context parameter

* pull up context

* update mocks

* update tests
2021-05-28 11:12:42 +02:00
Roland Stengel
02dd60c0c8
Split git commit message scan from solman upload (#2773)
* Split git commit message scan from solman upload
2021-05-21 08:54:43 +02:00
ffeldmann
52c25a0dbb
feat(splunk): Adds head commitID of current build to commonPipelineEnvironment (#2844)
* Adds headCommitId, which stores the head commit has of the current build, includes tests and generated files

* Adds headCommitId, which stores the head commit has of the current build, includes tests and generated files

* Go fmt fix

* Fixes artifactoryPrepareVersion test

* Removes xMake CommitId
2021-05-20 13:11:57 +02:00
Thorsten Duda
cdcce05145
get rid of classic mta builder (#2835)
* get rid of classic mta builder

* fix yaml lint error

* adding new line in yaml

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-05-19 08:45:38 +02:00
Oliver Nocon
c088e623aa
feat(pipelineCreateSummary): enhance content with reference link (#2837)
* feat(pipelineCreateSummary): enhance content with reference link

* Update cmd/pipelineCreateScanSummary.go

* Update cmd/pipelineCreateScanSummary.go
2021-05-19 07:57:44 +02:00