1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/vars
TheFonz2017 41dcebb3a5 Variable Substitution in YAML Files (#852)
* Changes:
- New YamlSubstituteVariables step to substitute variables in YAML files with values from another YAML
- New Tests, that check the different substitution patterns.
- Added test resources, including various manifest and variables files.
- Improved usage of JenkinsLoggingRule
- Improved JenkinsReadYamlRule to properly reflect the mocked library's behaviour.
- Added a new JenkinsWriteYamlRule.

* Changes:
- added a Logger that checks a config.verbose flag before it logs debug messages.
- changed error handling to rethrow Yaml parsing exception in case of wrongly-formatted Yaml files.
- changed JenkinsWriteYamlRule to capture Yaml file details of every invocation of writeYaml. This allows sanity checks at end of tests, even if there were multiple invocations.
- adjusted tests.

* Changes:
- Removed javadoc-code blocks from API documentation since they are not supported.
- Removed skipDeletion boolean.
- Added a new deleteFile script which deletes a file if present.
- Added a new JenkinsDeleteFileRule to mock deleteFile script and optionally skip deletion for tests.
- Adjusted yamlSubstituteVariables script.
- Adjusted tests to include new JenkinsDeleteFileRule.
- Changed code that deletes an already existing output file to produce better logs.

* Changes:
- Turned yamlSubstituteVariables into a script that works purely based on Yaml data (not files).
- Added a new cfManifestSubstituteVariables that uses yamlSubstituteVariables under the hood but works based on files.
- Adjusted tests, and added new ones.

* Adjusted documentation and a few log statements.

* Changed documentation to no longer include javadoc code statements.

* Made mocking of deletion of a file a default. Adjusted tests.

* Changed signature of yamlSubstituteVariables' call method to return void.

* Changes:
- Fixed naming issues in deleteFile.
- Renamed Logger to DebugHelper.
- Fixed some documentation.

* Changed implementation of deleteFile not to use java.io.File - which is evil when using it for file operations.

* PROPERLY Changed implementation of deleteFile not to use java.io.File - which is evil when using it for file operations.

* Changes:
- Added tests for deleteFile script
- Changed JenkinsFileExistsRule to also keep track of which files have been queried for existence.

* Changes:
- Removed java.io.File usage from cfManifestSubstituteVariables and using fileExists instead now.
- Adjusted tests.

* Wrapped file path inside ticks to allow spaces in file path when calling deleteFile.

* Removed null checks of mandatory parameters, and resorted to ConfigurationHelper.withMandatoryProperty

* Fixed a NullPointer due to weird Jenkins / Groovy behaviour.

* Changes:
- Turned yamlSubstituteVariables step into a utils class.
- Added tests
- Adjusted cfManifestSubstituteVariables to use utils class instead of step.
- Adjusted tests
- Adjusted APIs of DebugHelper.

* Re-introduced log statement that shows what variables are being replaced and with what.

* Changing API of YamlUtils to take the script and config as input.

* Test

* Test

* Test

* Test

* Test

* Fixing issue.

* Fixing issue.

* Changes:
- Refactored DebugHelper and YamlUtils to make usage nicer and rely on dependency injection.
- Removed Field for DebugHelper and turned it into local variable.
- Adjusted classes using the above.
- Adjusted tests where necessary.

* Added link to CF standards to YamlUtils also.

* Add docu for step cfManifestSubstituteVariables.md

* Added documentation.

* Added missing script parameter to documentation. Some steps document it, some don't. Right now you need it, so we document it.

* Fixed some layouting and typos

* Beautified exception listing.

* Removed trailing whitespaces to make code climate checks pass.

* Trying to get documentation generated, with all the exceptions to markup one should not use.

* cosmetics.

* cosmetics, part 2

* Code climate changes...

* Inlined deleteFile step.

* Added two more tests to properly check file deletion and output handling.

* Changes:
- adjusted API to take a list of variables files, as does 'cf push --vars-file'
- adjusted API to allow for an optional list of variable key-value-maps as does 'cf push --vars'
- reproduced conflict resolution and overriding behavior of variables files and vars lists
- adjusted tests and documentation

* Added missing paramter to doc comment.

* Re-checked docs for missing paramters or params that have no counterpart in the method signature.

* Adjusted documentation.

* Removed absolute path usage from documentation.

* corrected documentation.

* Changed javadoc comment to plain comment.

* Turned all comments to plain comments.
2019-09-06 10:20:35 +02:00
..
artifactSetVersion.groovy Rename dlang to dub (#762) 2019-07-03 11:27:07 +02:00
batsExecuteTests.groovy Docker Pipeline - fixes and small adoptions (#779) 2019-07-05 16:32:24 +02:00
buildExecute.groovy Docker Pipeline - fixes and small adoptions (#779) 2019-07-05 16:32:24 +02:00
buildSetResult.groovy piperPipeline: handle build result correctly (#660) 2019-04-15 14:18:08 +02:00
cfManifestSubstituteVariables.groovy Variable Substitution in YAML Files (#852) 2019-09-06 10:20:35 +02:00
checkChangeInDevelopment.groovy update documentation 2019-04-09 20:46:45 +02:00
checksPublishResults.groovy fix NonCPS issues (#796) 2019-07-29 10:17:56 +02:00
cloudFoundryDeploy.groovy cloudFoundryDeploy: generate docu 2019-04-12 13:08:05 +02:00
commonPipelineEnvironment.groovy Compatibility to Piper PR support 2019-05-14 16:30:13 +02:00
containerExecuteStructureTests.groovy containerExecuteStructureTests: generate docu 2019-04-09 11:12:38 +02:00
containerPushToRegistry.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
detectExecuteScan.groovy add step for Synopsis Detect Scans (#690) 2019-05-08 11:36:01 +02:00
dockerExecute.groovy Pass configured env vars to docker execution in existing container (#851) 2019-08-16 17:05:18 +02:00
dockerExecuteOnKubernetes.groovy Fix imagePullPolicy always being IfNotPresent when executing single container (#834) 2019-08-21 15:04:20 +02:00
dubExecute.groovy Add dubExecute step (#754) 2019-06-19 16:52:18 +02:00
durationMeasure.groovy fix code climate issues (#712) 2019-05-16 10:46:13 +02:00
fioriOnCloudPlatformPipeline.groovy enhance prepare stage with cleanup and checkout 2019-03-21 10:37:02 +01:00
gaugeExecuteTests.groovy Doc - Add missing possible values (#679) 2019-04-29 11:43:26 +02:00
githubPublishRelease.groovy githubPublishRelease - add templating capabilities (#849) 2019-08-15 15:26:08 +02:00
hadolintExecute.groovy Add new step for Dockerfile linting (#723) 2019-06-04 08:01:43 +02:00
handlePipelineStepErrors.groovy use new unstable step to better visualize pipeline errors (#804) 2019-07-26 17:40:22 +02:00
healthExecuteCheck.groovy Update vars/healthExecuteCheck.groovy 2019-04-02 21:01:09 +02:00
influxWriteData.groovy influxWriteData: generate docu 2019-04-12 20:29:09 +02:00
kanikoExecute.groovy Add step buildExecute (#527) 2019-07-02 13:00:36 +02:00
karmaExecuteTests.groovy karmaExecuteTests: fix multi module execution (#765) 2019-06-24 15:29:32 +02:00
mailSendNotification.groovy remove semikolons 2019-05-23 14:28:32 +02:00
mavenExecute.groovy Allow setting global maven config in MTA builder (#667) 2019-04-24 12:47:37 +02:00
mtaBuild.groovy added comment to explain escaped variable 2019-06-13 15:33:18 +02:00
multicloudDeploy.groovy add multicloud deploy step 2019-04-12 17:51:38 +02:00
neoDeploy.groovy Remove useless utils from signature inside neoDeploy (#853) 2019-08-21 13:10:54 +02:00
newmanExecute.groovy newmanExecute: generate documentation (#591) 2019-03-26 13:26:21 +01:00
npmExecute.groovy Add npmExecute step (#491) 2019-02-21 19:14:48 +01:00
pipelineExecute.groovy fix code climate issues (#712) 2019-05-16 10:46:13 +02:00
pipelineRestartSteps.groovy Fix formatting (#719) 2019-05-22 08:16:07 +02:00
pipelineStashFiles.groovy pipelineStashFiles: generate docu 2019-04-12 22:45:31 +02:00
pipelineStashFilesAfterBuild.groovy pipelineStashFiles: generate docu 2019-04-12 22:45:31 +02:00
pipelineStashFilesBeforeBuild.groovy pipelineStashFiles: generate docu 2019-04-12 22:45:31 +02:00
piperInitRunStageConfiguration.groovy move method to MapUtils (#709) 2019-05-15 20:52:45 +02:00
piperPipeline.groovy Docker Pipeline - fixes and small adoptions (#779) 2019-07-05 16:32:24 +02:00
piperPipelineStageAcceptance.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPipelineStageAdditionalUnitTests.groovy Docker Pipeline - fixes and small adoptions (#779) 2019-07-05 16:32:24 +02:00
piperPipelineStageBuild.groovy Docker Pipeline - fixes and small adoptions (#779) 2019-07-05 16:32:24 +02:00
piperPipelineStageCompliance.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPipelineStageConfirm.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPipelineStageInit.groovy more precise param handover (gitUrl) in piperPipelineStageInit (#848) 2019-08-20 09:08:42 +02:00
piperPipelineStageIntegration.groovy Docker Pipeline - fixes and small adoptions (#779) 2019-07-05 16:32:24 +02:00
piperPipelineStagePerformance.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPipelineStagePost.groovy add new step piperPublishNotifications (#652) 2019-07-18 12:09:54 +02:00
piperPipelineStagePromote.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPipelineStagePRVoting.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPipelineStageRelease.groovy TMS integration (#782) 2019-07-18 15:06:11 +02:00
piperPipelineStageSecurity.groovy Piper pipeline - enhance stages (#755) 2019-07-03 10:13:26 +02:00
piperPublishWarnings.groovy add new step piperPublishNotifications (#652) 2019-07-18 12:09:54 +02:00
piperStageWrapper.groovy Update piperStageWrapper.groovy (#767) 2019-06-27 10:53:46 +02:00
prepareDefaultValues.groovy shift coding for preparing defaultValueCache into that class 2019-05-31 14:26:25 +02:00
seleniumExecuteTests.groovy Doc - Add missing possible values (#679) 2019-04-29 11:43:26 +02:00
setupCommonPipelineEnvironment.groovy setupCommonPipelineEnvironment: support yaml config file ending (#811) 2019-07-31 12:22:26 +02:00
slackSendNotification.groovy minor change in slackSendNotification documentation 2019-05-23 20:16:02 +02:00
snykExecute.groovy snykExecute: add missing documentation (#570) 2019-03-18 11:08:41 +01:00
sonarExecuteScan.groovy sonarExecuteScan: add custom certificate support (#819) 2019-08-11 22:42:34 +02:00
testsPublishResults.groovy fix NonCPS issues (#796) 2019-07-29 10:17:56 +02:00
tmsUpload.groovy TMS integration (#782) 2019-07-18 15:06:11 +02:00
transportRequestCreate.groovy fix code climate issues (#712) 2019-05-16 10:46:13 +02:00
transportRequestRelease.groovy fix code climate issues (#712) 2019-05-16 10:46:13 +02:00
transportRequestUploadFile.groovy fix code climate issues II (#715) 2019-05-17 13:20:13 +02:00
uiVeri5ExecuteTests.groovy seleniumExecuteTests & uiVeri5ExecuteTests: improve documentation (#568) 2019-03-19 15:38:52 +01:00
whitesourceExecuteScan.groovy whitesourceExecuteScan: Add scanType dub 2019-07-11 06:17:30 +02:00