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

1291 Commits

Author SHA1 Message Date
Eugene Kortelyov
4d787ded6d
gradleExecuteBuild initial commit (#3337)
* gradleExecuteBuild initial commit

* fmt fixes for metadata_generated

* flow updates, some tests were added

* add gradle path alias, add stage scope to task parameter

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-12-22 15:34:36 +01:00
Oliver Nocon
b1eeca54ff
fix(commonPipelineEnvironment): add missing gitHttpsUrl (#3370) 2021-12-15 17:34:45 +01:00
Roland Stengel
47d8d2c357
GPP Init Stage needs to consider mta yaml path (#3305)
mtaBuild - support config.source to yaml path
2021-12-14 14:43:02 +01:00
Eugene Kortelyov
e727601ea4
feat(shellExecute): cleanup, Jenkins step, docs … (#3313)
* remove functionality with script downloading (security issue), clean up code

* remove vault client creating, remove vault params

* fix go generate issue

* error handling and test updated

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-12-13 12:31:31 +01:00
Ralf Pannemans
0c79b84d51
fix(cnbBuild): failOnError (#3344) 2021-12-08 17:13:20 +01:00
Oliver Nocon
9a78fabc89
feat(golangBuild): add new step for building go (#3178)
* feat(golangBuild): add new step for building go

* chore(golangBuild): increase test coverage

* remove indirect dependencies

* cleanup go.sum

* chore: remove trailing spaces

* chore(golangBuild): cleanup params, add groovy wrapper

* fix: update docker options

* update docs

* update installation according to https://golang.org/doc/go-get-install-deprecation

* fix: update installation

* update groovy test exclusion

* Update vars/golangBuild.groovy

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

* update branch

* address PR feedback

* fix compilation error

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-12-06 16:17:59 +01:00
rosemarieB
e90856d5bf
Generic build step (#3323)
* new step abapEnvironmentBuild

* Update piper.go

* Update abapEnvironmentBuild.go

* update yaml file

* Logging for debugging

* Update abaputils.go

* Update connector.go

* assigning connector

* delete debugging logging

* Update abapEnvironmentBuild.go

* certificate to yaml

* Update abapEnvironmentBuild.go

* add scope

* Update abapEnvironmentBuild.go

* Update abapEnvironmentBuild.yaml

* change certificate name in yaml

* test my new gitscript

* logging for debugging

* debugging...

* adding options to client.

* skip verification

* debugging

* debugging...

* switch of transportskipverification

* changing connector return

* deleting additional set options

* fixed timeout error

* adding certificate

* testing without certificate set

* testing with certificate set

* download, publish and value logic

* write values to cpe

* logging

* adding condition on string length

* change publishmethod and some logging

* change download method -> using references

* evaluation of parameter for download

* add case for empty string

* adding unittests

* Update mockClient.go

* make abapEnvironmentBuildUtilsBundle powerful

* refactor abapEnvironmentBuild into pieces

* check error message

* check error message 2

* check error message 3

* check error message 4

* remove check error message

* cleanup

* adding unittests

* unittests and docu

* docu

* docu

* Update abapEnvironmentBuild.md

* removing trailing spaces and adding empty lines in docu

* Update abapEnvironmentBuild.md

* fixing unittest and PR recommen

* Update abapEnvironmentPipelineStageBuild.groovy

* Update abapEnvironmentPipelineStageBuild.groovy

* Update abapEnvironmentPipelineStageBuild.groovy

* Update abapEnvironmentPipelineStageBuild.groovy

* changes derived from pull request

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2021-12-06 14:43:37 +01:00
Christopher Fenner
835be3c333
feat(sonar): use go-based certificate loading (#3307)
* do not load sap certificates with groovy

* add toggle
2021-11-25 07:42:54 +01:00
Daniel Mieg
50b36794b1
Fail properly in Integration Tests (#3282)
* Require success for publish

* Echo and tets

* Fix test

* Improve test

* Update docu

* Let Integration Test throw

* Update publish.md

* Remove condition for publish

* Update docu
2021-11-16 09:32:09 +01:00
Philipp Stehle
f9f0cbfd33
enforce that step metadata yaml file is called <step>.yaml (#3226)
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
2021-11-15 14:20:20 +01:00
Mayur Belur Mohan
d3b090e63e
ApiKeyValueMapDownload Command (#3245)
* ApiKeyValueMapDownload Command

* CodeReview Fixes
2021-11-15 13:48:14 +01:00
Marcus Holl
cf62c35b1a
Fix env var replacement (#3260)
* Fix envVar replacement (go part)

* Fix envVar replacement (groovy part)

* insert underscore also after 0-9 (go part)

* insert underscore also after 0-9 (groovy part)

* Adjust tests for trailing numbers

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-11-15 12:59:49 +01:00
Daniel Mieg
2e77dff4f0
Add debug flag (#3267)
* Add debug flag

* Move debug flag to general keys

* Add Tests
2021-11-11 18:29:24 +01:00
Dominik Lendle
f67cbbe0a7
A unit step integration (#3120)
* Add AUnit stage

* Add AUnit stage to ABAP Pipeline

* Add Groovy Tests

* surround header with space line

* correct class name

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* adapt Pipeline Tests

* Update tests & docu

* adapt tests

* Fix Pipeline Tests

* adapt tests

* Adapt tests

* Adapt tests

* docu fixes

* Adapt tests

* Improve Tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt host config

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* Adapt tests

* adapt docu links

* adapt docu links

* adapt docu links

* adapt docu links

* Add example to config docu

* change docu

* Change host check

* Adapt tests

* Add Prepare System defaults

* Change Prepare System defaults

* return after writing xml results

* change logging

* return after results have been persisted

* Change host check

* echo test

* echo test

* echo test

* echo test

* echo test

* config host checker working

* Enable host groovy test

* remove duplicates

* docu extension AUnit extension stage

* Remove trailing spaces

* package restrictions added to docu

* correct to type

* correct type aunit tests

* add capital letters to docu examples

* remove escape

* adapt unit tests

Co-authored-by: Daniel Mieg <daniel.mieg@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-11-11 15:10:14 +01:00
Oliver Feldmann
ac35401a91
ABAP - add custom defaults from file parameter (#3239)
* Add custom defaults from file

* Add documentation
2021-11-10 14:34:56 +01:00
Oliver Nocon
b4d314215e
chore(cloudFoundryDeploy): remove deprecated groovy-based part (#3242)
* chore(cloudFoundryDeploy): remove deprecated groovy-based part

* chore: update test due to different step logic

* chore: update documentation

* fix yaml issue
2021-11-09 07:44:31 +01:00
tiloKo
f1a5b6a918
abapAddonAssemblyKitReserveNextPackages additional checks & move stage (#3247)
* new checks for commitIDs

* new checks for commitIDs

* relocate step from build stage to initial checks + refac

* log list

* fix log + check

* log format

* fix unit tests

Co-authored-by: Christian Luttenberger <42861202+bluesbrother84@users.noreply.github.com>
2021-11-04 22:04:00 +01:00
Mayur Belur Mohan
3ee4339af1
ApiProxyDownload Command (#3197)
* ApiProxyDownload Command

* Lint Fixes

* Lint Fixes

* codereview fixes

* Code Review Fixes

* CodeReview Fixes

* CodeReview Fixes

* Code Review Fixes

* Code Review Changes

* CodeReview Fixes

* CodeReview Fixes

* CodeReview Fix

* CodeReview Fixes

* CodeReviw Fixes

* CodeReview Changes

* CodeReview Fixes

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-11-02 10:30:08 +01:00
Thorsten Duda
014739451b
add annotations (#3207)
* add annotations

* adding utils

* fix test

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-11-02 10:00:38 +01:00
tiloKo
a0ad624b9a
RobustConfirm (#3179)
confirm no longer done based on package status but now based on boolean indicator which is set during assembly step.
Thus confirm can now be placed after release packages.
2021-10-28 11:01:16 +02:00
Daniel Mieg
0d7d4f22c8
Add skipCheckout Flag (#3210)
* Add skipCheckout Flag

* Add tests
2021-10-27 13:30:44 +02:00
Christopher Fenner
f585e932ef
docs: remove hadolint docs in Groovy (#3164)
* allow buildTool yarn

* remove groovy docs for hadolint

* remove unused import
2021-10-11 10:08:20 +02:00
Pavel Busko
28e0905964
fix(dockerExecuteOnKubernetes) print the error cause if unstash failed and always invalidate (#3142)
Co-authored-by: Ralf Pannemans <ralf.pannemans@sap.com>
Co-authored-by: Pavel Busko <pavel.busko@sap.com>
2021-10-06 10:25:50 +02:00
Roland Stengel
41ed285afa
isChangeInDevelopment creation (#3139)
* checkChangeInDevelopment to GO
- add groovy step isChangeInDevelopment
- direct to new Groovy
- direct to GO
2021-10-04 14:35:38 +02:00
Roland Stengel
1e20fbb6a7
No such property: commonPipelineEnvironment for class: com.sap.piper.cm.StepHelpers (#3132)
Fix Issue 3131
2021-09-29 17:50:45 +02:00
Linda Siebert
54f55f7388
Add kubernetesDeploy to Release (#3126)
* Add kubernetesDeploy to Release

* Add dockerConfigJSON to STEPS

* Generate go

* Fix removed code

* Generated

* Add debugging

* Change for debugging

* Try this

* Debugging

* Try reading file

* Fix log

* See files

* Add debugging

* Remove debugging here

* Remove debug

* Remove some debugging

* Apply suggestions from code review

* Add tests

* Format
2021-09-29 15:01:40 +02:00
Roland Stengel
05301b6974
TransportRequestUploadFile migration to Go - Documentation (#3102)
* UploadFile Documentation
- migrate documentation to GO steps
- adjust UploadFile references
2021-09-27 15:14:35 +02:00
Linda Siebert
ca2a753e9c
Pass in custom stash settings to Init (#3119)
* Add customStashSettings parameter

* Add test for customStashSettings

* Remove file

* Fix tests

* Remove unnecessary rule

* Remove assert

* Apply suggestions from code review

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

* Update vars/piperPipelineStageInit.groovy

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-09-27 13:36:55 +02:00
Roland Stengel
f88751feb1
TransportRequestUploadFile migration to Go - Git commit scan (#3094)
UploadFile requestid/changedocid retrieval
- migrate Git commit history traversal to GO code
2021-09-27 11:57:20 +02:00
Roland Stengel
893edfe4d6
transportRequestUploadFile - consider changemanagement.[solman|cts|rfc].docker (#3112)
Pass docker parameters to the new transport request steps.
Fixes Issue 3110 and 3111.
2021-09-21 10:29:43 +02:00
Dominik Lendle
09f5c0a524
AUnit step (#3075)
* Add AUnit step

* Add Groovy File

* Update metadata

* Add groovy test config

* Add Unit tests

* Add Documentation

* Docu fixes

* change docu

* change docu

* change logging level & remove sleep

* change docu

* change docu

* Update documentation/docs/steps/abapEnvironmentRunAUnitTest.md

Co-authored-by: Daniel Mieg <56156797+DanielMieg@users.noreply.github.com>
2021-09-20 11:14:13 +02:00
Roland Stengel
cacdb2b867
TransportRequestUploadFile migration to Go - CTS (#3098)
* UploadFile CTS
- migrate to GO implementation
2021-09-16 13:18:03 +02:00
Roland Stengel
bd8ca941b6
TransportRequestUploadFile migration to Go - RFC (#3097)
* UploadFile RFC
- migrate to GO code
2021-09-13 14:14:38 +02:00
Michael
bab369c6d4
typo (#3082)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-09-13 13:57:04 +02:00
Roland Stengel
45b55254b9
TransportRequestUploadFile migration to Go - SOLMAN (#3078)
* UploadFile SOLMAN
- migrate to GO code
2021-09-13 13:31:43 +02:00
Linda Siebert
fa95bcc8a9
Match documentation of buildExecute (#3095)
* Match documentation

* Move comment

* Don't pass containerImageNameAndTag

* Change kaniko tests

* Move code in

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-09-10 16:25:44 +02:00
Thorsten Duda
6c339b8aed
Enables skipping the checkout in piperPipelineInitStage step by providing stashes (#3085)
* enable unstashing for initial content

* syntax fix

* beatufy unstashing

* Apply suggestions from code review

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>

* fix tests

* fix tests

* avoid npe

* Fix syntax

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>

* Update vars/piperPipelineStageInit.groovy

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

* add unit tests

* Update vars/piperPipelineStageInit.groovy

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>

Co-authored-by: Linda Siebert <39100394+LindaSieb@users.noreply.github.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-09-08 08:13:32 +02:00
Haegi
3f4b32f7ba
cnbBuild step MVP (#3021)
* Implement cnbBuild step

Co-authored-by: Benjamin Haegenlaeuer <benjamin.haegenlaeuer@sap.com>

* Add cnbBuild groovy test

Co-authored-by: Benjamin Haegenlaeuer <benjamin.haegenlaeuer@sap.com>

* Add basic documentation template

Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>

* Support specifiying name, tag and registry

Co-authored-by: Pavel Busko <pbusko@users.noreply.github.com>

Co-authored-by: Johannes Dillmann <j.dillmann@sap.com>
Co-authored-by: Philipp Stehle <philipp.stehle@sap.com>
Co-authored-by: Pavel Busko <pbusko@users.noreply.github.com>
2021-08-18 12:10:55 +02:00
Roland Stengel
d8d5f91bac
CPE - set initial value of mtaFilePath to null (#2997) 2021-08-17 18:51:47 +02:00
Mayur Belur Mohan
2d412d9f3c
IntegrationArtifactResource Command (#3027)
* IntegrationArtifactResource Command

* Remove unused code

* Formatting fix

* formatting fix

* formatting fix

* formatting fix

* formatting fix

* CodeReview Fixes

* Code Review Fix

* Code Review Fixes

* Code Review Fixes

* Format fix

* format fix

* format fix

* format fix

* Code Review Fix

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-08-12 09:11:02 +02:00
Linda Siebert
f9e052e4d1
Refactor all instances of iFlow to be integrationFlow (#2992) 2021-08-04 16:42:25 +02:00
Mayur Belur Mohan
c283b9319d
IntegrationArtifactUnDeploy Command (#3018)
* IntegrationArtifactUnDeploy Command

* formatting fix

* Code Review Fixex

* Code Review Fixes

* remove unused code

* Formating fixes

* formatting fixes

* formatting fix

Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-08-02 16:27:16 +02:00
Marcus Holl
a1823aeb98
checksPublishResults: prepare reports only if the reporting is active (#2971)
* checksPublishResults: prepare reports only if the reporting is active

* test

* remove un-used import

* dummy in order to trigger checks
2021-07-12 10:02:09 +02:00
Roland Stengel
e025c1d774
CTS Upload Groovy (#2970)
CTS Upload Groovy
- add step
2021-07-08 16:37:39 +02:00
Roland Stengel
d38a0f8430
RFC Upload Groovy (#2920)
* RFC Upload Groovy
- add step
- test step
2021-07-06 10:09:41 +02:00
Oliver Feldmann
9e22251c8d
CPI - Improve serviceKey parameter name and description (#2958)
* Make credential id name more descriptive

* Improve serviceKey description

* Change descriptions to add word service

Co-authored-by: Linda Siebert <linda.siebert@sap.com>
2021-07-01 10:07:57 +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
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
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
Hans Schulz
d2f75044d0
Add option to tag artifact version to containerPushToRegistryStep (#2859)
* Add option to tag artifact version to containerPushToRegistryStep

* Update vars/containerPushToRegistry.groovy

Co-authored-by: breuerjo <36748317+breuerjo@users.noreply.github.com>

* commonPipelineEnvironment instead of globalPipelineEnvironment

Co-authored-by: breuerjo <36748317+breuerjo@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-06-28 08:02:06 +02:00
Daniel Mieg
ccdedd4599
Add stage defaults (#2841)
* Add stage defaults

* Adapt defaults

* Change default file

* Rename config files

* Add defaults for Build stage

* Change and escape cfServiceKeyConfig

* Remove service key config

* Fix typo

* Change quotes

* Add default for Publish

* Add cfDeleteServicesKeys to defaults
2021-06-23 10:04:15 +02:00
Kevin Stiehl
49dfc1f422
fix(pipelineEnv): use env instead of heredoc (#2923) 2021-06-18 11:00:59 +02:00
Oliver Nocon
d6b7a0f566
fix(commonPipelineEnvironment): StackOverflowError (#2917)
* chore(cpe): add debug messages and catch error

* fix catch

* fix variable declaration

* fix type name

* check for instanceof JSONNull

* check for net.sf.json.JSONNull

* fix formatting

* fix StackOverflow exception

* Update vars/writePipelineEnv.groovy
2021-06-17 15:42:39 +02:00
Kevin Stiehl
a03be973bc
fix(cpe): add more null checks (#2913) 2021-06-16 18:04:37 +02:00
Kevin Stiehl
173e887064
[CPE] Missing pipeline environment in sonar docker container (#2909)
* execute writepipeline env in sonar

* non exisitng dir is no error

* add log message
2021-06-16 11:46:55 +02:00
Kevin Stiehl
eb6ffc334a
[CPE] write commonPipelineEnvironment even when it's empty (#2904)
* writePipelineEnv even when map is empty

* mock write and read PipelineEnv calls
2021-06-15 18:42:04 +02:00
Kevin Stiehl
d1c8abc6b3
refactor: move common pipeline environment handling to golang (#2823)
* make use of new read,writePipelineEnv Steps in groovy

* remove unused cat

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-06-15 14:34:56 +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
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
Roland Stengel
e794d4884b
solman upload split git groovy (#2782)
* Split git commit message scan from solman upload - groovy part
2021-06-07 10:34:36 +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
Jesse Awan
3b2e7dc53d
add initContainer capabilities (#2820)
* set init container capabilities

* set init container capabilities

* correct parameter definition + change assertThat

Co-authored-by: Adnan Awan <adnan.awan@sap.com>
Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2021-06-01 09:59:49 +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
Marcus Holl
aafda73f41
Let docu for cloudFoundryDeploy generate by go (#2605)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-05-06 12:23:33 +02:00
Maximilian Braun
9d82bdcd20
feat(ContainerPushToRegistry): add authentication for source registry (#2798)
* feat(ContainerPushToRegistry): add authentication for source repository

* Adjust mocking to reflect a source and a target registry instead of an anonymous and an authenticated

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-05-06 11:17:02 +02:00
Srinikitha Kondreddy
363600ce9f
Introduce new flag to run artifact versioning on a pod for maven projects (#2788)
* Introduce new flag to run artifact versionining for maven on pod

* Add code review changes
2021-04-30 10:14:14 +02:00
Mikalai Dzemidzenka
b82ecb0ff7
convert batsExecuteTests to go implementation (#2737)
* convert batsExecuteTests to go implementation

* added additional test cases, added container definition to batsExecuteTests.yaml

* added influx, for junit added container definition

* added parameter envVars

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-04-29 16:50:23 +02:00
Oliver Feldmann
d766f6befe
dockerExecuteOnKubernetes: Add capability for volume mounts (#2784)
* Remove unused container variable

* Add volume mounts functionality

* Make volume mounts optional

* Replace placeholder with {}

* Don't provide sidecar volume mounts

* Remove unnecessary parameter volumeName

* Add documentation for new parameter

* Use empty map for {}

* Update vars/dockerExecuteOnKubernetes.groovy

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>

* Improve documentation

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
2021-04-29 11:39:34 +02:00
Mikalai Dzemidzenka
61f4c5245a
feat(karma): migrate karmaExecuteTests to go implementation (#2695)
* convert karmaExecuteTests to go implementation

* removed KarmaExecuteTestsTest.groovy

* added KarmaExecuteTests to fieldRelatedWhiteList

* Update vars/karmaExecuteTests.groovy

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

* Update resources/metadata/karmaExecuteTests.yaml

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

* Update resources/metadata/karmaExecuteTests.yaml

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

* added reference seleniumHubCredentialsId to yaml file, fixed modules code

* karmaExecuteTests.yaml renamed to karma.yaml

Co-authored-by: lndrschlz <leander.schulz01@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-04-15 13:58:23 +02:00
Oliver Nocon
d04a7c2eb3
feat(pipelineCreateScanSummary) Create groovy wrapper (#2743)
* feat(pipelineCreateScanSummary) Create groovy wrapper

* add command to binary

* stash step reports

* update stash

* fix typo

* unstash reports first

* update reporting

* update json reporting

* update tests & enhance logging

* update md report

* update md reporting

* fix rendering

* update tests
2021-04-15 07:45:06 +02:00
Kevin Stiehl
fe6ea643fa
Add terraformExecuteStep (#2679)
* Add terraformExectueStep

* Update terraformExecute.go

* fmt

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-29 16:22:23 +02:00
lndrschlz
b612a1fb3f
fix: stackoverflow error when writing cpe file (#2729)
* catch stackoverflow error

* update log

* update log

* update log

* explicit return if value null

* wip

* wip

* wip

* wip

* prevent error

* cleanup

* cleanup

* use notify

* removed import

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-03-29 13:44:55 +02:00
Kevin Stiehl
b70af2651e
Fix config rsolving in PostStage (#2726)
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-03-29 12:18:19 +02:00
Siarhei Pazdniakou
33699c7388
Convert containerExecuteStructureTests to go implementation (#2701)
* Converted containerExecuteStructureTests to go implementation

* Added tests

* Fixed issues

* Made fixes

Co-authored-by: lndrschlz <leander.schulz01@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-25 08:18:30 +01:00
Roland Stengel
101e8ec784
TransportRequest: add UploadSOLMAN groovy step (#2688)
* TransportRequest: add UploadSOLMAN groovy step
- groovy to go
- use docker image in go
- map credentials in go
- generated yaml
2021-03-22 11:53:37 +01:00
lndrschlz
dea96a3ba0
feat(newmanExecute): golang implmementation for newmanExecute (#2513)
* Automates first parts of newmanExecute.groovy

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds newman installation

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Removes warning

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* makes tests robust for later shell calls

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds version logging

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds tests for version logging

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds newman shell execution

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Prepare cloud foundry apps with secrets handling

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds further process to CF Utils

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Fixes unit test

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adds error category

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Add fix to execute step locally

Currently only tested on windows machine locally in powershell.

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* Adapt unit test to fix of runCommand

Signed-off-by: Fabian Reh <fabian.reh@sap.com>

* refactored golang step to newmanExecute

* wip

* added test config

* refactored newmanExecute groovy wrapper step

* exclude newmanExecute from common step test

* cleaups

* add credential support

* fix groovy credential providing

* add import

* add stageName

* define script

* remove unused vars

* add import

* fix iterator ref

* golang secret handling and cleanups

* wip

* wip

* wip

* update go step

* implement cf credential proposal

* testRepository functionality implemented

* register secrets to logger

* add missing dependecies

* test xsuaa credential handling

* wip

* wip

* cleanups

* add import

* remove mandatory params

* add container definition

* test runCommand

* test runCommand

* fix npm path

* fix npm path

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* added newmanEnvironment to templating

* wip

* use env and globals params in runCommand when no templating

* fix condition

* wip

* reverted config edit

* updated documentation

* install with shell

* wip

* wip

* fix tests

* refactor tests

* wip

* remove old test

* wip

* escape go tmpl

* escape go tmpl

* fix defaults

* add doc comment

* remove test case

* refactored newman commands

* add cli reporter

* refactor options

* mock os getenv and fix all tests

* refactoring and doc update

* go generate

* small refactor

* spelling

* fix newman doc

* remove MaskPasswords wrapper; fix stash bug;

* docu fix

Co-authored-by: Fabian Reh <fabian.reh@sap.com>
2021-03-17 08:08:33 +01:00
Christopher Fenner
0fcbfa8da7
feat(sonar): create report for issue count (#2691)
* create json report

* archive report

* add test case

* generate report

* correct report name
2021-03-12 15:05:07 +01:00
Christopher Fenner
be68270cb4
fix(piperExecuteBin): move CPE.readFromDisk to own finally block (#1885)
* Update piperExecuteBin.groovy

fixes #1881

* Update piperExecuteBin.groovy
2021-03-12 09:42:19 +01:00
Christopher Fenner
f999925788
fix(influx): correct data type of influx measurements (#2171)
* update data type of influx measurements

* Update checkmarx.yaml

* pick changes from #1885 for testing

* update generated code

* update to new datatype

* adjust to type changes

* change back to string type

* Update fortifyExecuteScan.go

* add typo to be backward compatible

* change type to int for files_scanned and lines_of_code_scanned

* add typo

* add measurements to whitesource

* update generated sources

* adjust test cases

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-10 16:00:53 +01:00
Sven Merk
34f2a82787
Update influxWriteData.groovy (#2684)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-03-10 09:23:36 +01:00
Christian Luttenberger
c8e9e44f23
New pipeline step assembly confirm (#2631)
* Add new pipeline step

* new pipeline stage

* Cleanup Test

* Adding new step to pipeline - stage publish

* Move from Publish to Build

* Adjusting documentation for move from publish to build

* Change Release with Confirm Step in Build Stage

* codeclimate

* Code Climate

* Code Climate spaces

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2021-02-23 11:11:52 +01:00
Daniel Mieg
43fa6634ee
Updates for ABAP Environment release 2102 (#2621) 2021-02-21 20:19:42 +01:00
Christopher Fenner
2d93e5d4df
fix(cpe) readToDisk failes with content from writeToDisk (#2629)
* branch for debugging

* Add json fix for booleans

* remove debug output

* handle boolean in cpe

* handle various types in json

* fix variable

Co-authored-by: OliverNocon <oliver.nocon@sap.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2021-02-19 11:34:30 +01:00
Marcus Holl
3df4542271
move additional hints into markdown file (#2599)
These hints are up to now provided as javadoc like comments
at the call method for cloudFoundryDeploy step. At that level
they are not taken into account by the go generator.

Is is not a suitable approach to include this kind of markdown
docu into the long description of the metadata file since this
long description is (also) used by the piper help command when
invoking piper cloudFoundyDeploy --help. At that point in time
markdown like text does not make sense.
2021-02-19 08:44:51 +01:00
Mayur Belur Mohan
06afce3005
IntegrationArtifactUpload Command (#2610)
* IntegrationArtifactUpload Command
2021-02-17 09:59:56 +01:00
Kevin Stiehl
ffffe8295e
(Vault) Improvements (#2439)
* vault improvements

* Update cloudFoundryDeploy.yaml

remove double PARAMETERS

* go generate

* fix type & resturcutre paragraph to a list

* remove non-existent secrets

* build trigger

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-02-15 09:48:51 +01:00
Oliver Feldmann
1b032b5c82
Skip checkout flag (#2594)
* Skip checkout flag

Defaults to null==false
We need the option to provide an scmInfo object by the user

* Check skipCheckout is Boolean

* Require scmInfo map in case checkout is skipped
2021-02-11 16:21:57 +01:00
Marcus Holl
c53d5241cb
use v6 version of ppiper/cf-cli consistently for all go steps (#2569) 2021-02-11 09:31:25 +01:00
Mayur Belur Mohan
f030bc9861
IntegrationArtifactDownload Command (#2587)
* IntegrationArtifactDownload Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-02-10 17:08:23 +01:00
Christian Luttenberger
e9a93ed384
Adding new step for abap Enviroment Assembly Confirm (#2586)
* Adding new abap Assembly Confirm

* Update abapEnvironmentAssembleConfirm.go

* Add generated objects

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
2021-02-10 11:33:10 +01:00
Mayur Belur Mohan
538256774a
IntegrationArtifactGetServiceEndpoint Command (#2582)
* GetIntegrationArtifactServiceEndpoint Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-02-05 10:35:55 +01:00
Mayur Belur Mohan
426c106765
IntegrationArtifactGetMplStatus Command (#2558)
* IntegrationArtifactGetMplStatus Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-02-04 10:50:15 +01:00
Srinikitha Kondreddy
1b16de0734
Remove handle pipeline step errors from groovy glue code (#2573) 2021-02-04 08:54:00 +01:00
Oliver Nocon
a104b2a06d
feat(whitesourceExecuteScan): UA for all build tools, e.g. maven & npm (#2501)
* feat(whitesource): add config helper

this helps to ease & enforce config settings

* fix accidential change of class

* add todos wrt java download

* use existing scanOptions, add option to download jre

* update generation

* fix generation

* allow running UA via go library

* correct image, improve logging

* add removal of downloaded JVM

* update java creation and deletion

* refactor and add log output

* remove obsolete ToDo

* increase test coverage

* increase test coverage

* adding aliases and tests

* make go modules as default

* maven: update behavior of projectNaming

* add Docker capabilities

* correct parameter name

* retrieve Docker coordinates

* docker coordinates only to provide artifact

* add ToDos

* add mta capability

* add aliases, mvn arguments for settings

* clean up groovy part

* update defaults

* add container for pip

* add defaults, add maven specifics, ...

* properly download settings

* maven: check existence of excluded files

* fix reporting

* Update CommonStepsTest.groovy

* update comment

* fix CodeClimate finding

* add tests for pip & fix minor issues

* fix order of pip build descriptors

* update pip container options

* fix pip virtualEnv parameter

* update report permissions

* fix test

* update container options

* add use fileUtils to load properties file

* update parameter description

* adding Docker scanning defaults

* clean up configHelper

* consider also npm tool cache

* add todos
2021-02-03 14:52:48 +01:00
Mayur Belur Mohan
0ed5cce53a
IntegrationArtifactUpdateConfiguration Command (#2542)
* IntegrationArtifactUpdateConfiguration Command

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2021-01-29 09:46:47 +01:00
lndrschlz
e60bdb94a6
feat(uiVeri5): golang implmementation for uiVeri5ExecuteTests (#2394)
* added uiVeri5ExecuteTests step files

* added confPath an regenerated step

* added test for uiVeri5ExecuteTests

* config modified

* added groovy wrapper

* ambiguous method fixed

* uiveri5 wrapper

* removed install command

* fixed defaults

* added testOptions as confPath arg

* test set env

* test npm install local

* changed env settings

* tests regenerated

* go generate

* fix code climate

* overwrite groovy step

* remove groovy wrapper go

* unstash piper bin

* test older node version

* test piperExecuteBin

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* refactored params

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* set testServerUrl as os env for uiveri5

* Update config.yml

* fix naming of testServerUrl param

* wip

* refactored setEnv and fixed tests

* wip

* step param for NPM_CONFIG_PREFIX

* fix runCommand

* refactored step param, regenerate, docu, fix tests

* fix groovy wrapper test

* cleanup

* add to CommonStepsTest field whitelist

* fixed default pipeline environment vars

* fix []string default

* fix metadata.go bug

* added test for docu metadata gen

* fix metadata_test.go in doc gen

* Update metadata_generated.go

* Update metadata_generated.go

* remove npm config prefix param; doc fix

* remove tab

* changed npm config prefix

* removed groovy wrapper test

* removed groovy step defaults

* modify path variable

* modified npm config prefix

* fix error wrapper and tests

* doc update

* add testRepository support

* wip

* fix testRepository param

* wip

* add utils

* init stash content

* wip

* wip

* wip

* add comment for deprecated parameters

* fixed commonStepTest

* fixed commonStepTest

* added error category for testOptions failure

* Update vars/uiVeri5ExecuteTests.groovy

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

* Update vars/uiVeri5ExecuteTests.groovy

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

* fix condition

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2021-01-28 11:31:24 +01:00
Srinikitha Kondreddy
efe3ab36f8
Support for secretfile type neo credential for deployment (#2537)
* Use Oauth bearer token credentials to deploy to neo

* Add test case

* Add test file

* Fix code climate issues

* Add code review changes
2021-01-26 09:29:44 +01:00
Mayur Belur Mohan
fe72b295d6
IntegrationArtifactDeploy Command (#2526)
* UpdateIntegrationArtifactConfiguration Command

* Fixes for codeclimate Check

* CommonStepsTest changes

* CodeReview Changes

* Git Patch

* Git Patch undo

* Code Review Comments

* code review fixes

* improve the error handling

* codeclimate fixes

* remove json parsing

* Error handling changes

* TestCase coverage fixes

* Refactoring Commands

* IntegrationArtifactDeploy Command

* Regenerate metadata_generated

* codereview fixes

* Code Review Fixes

* Code Review Fixes

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Oliver Feldmann <oliver.feldmann@sap.com>
2021-01-22 15:55:50 +01:00
Oliver Feldmann
741b49140e
Move pull image parameters to general section (#2478)
* Move pull image parameters to general section

* Allow no nesting override

* Test dockerPullImage can be set to true

As the default is false, we need to make sure it can still be set to true.
2021-01-13 10:48:48 +01:00