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

948 Commits

Author SHA1 Message Date
dominiklendle
ac732b3065
Add abapEnvironmentRunATCCheck step (#1454)
* Minor changes

* Changed groovy file

* Changed generated file

* Changed yaml with container config

* Changed groovy config

* minor changes

* minor changes

* Changed yaml with aliases

* minor changes

* minor changes

* minor changes

* minor changes

* minor changes

* minor changes

* minor changes

* minor changes

* minor changes

* minor changes

* Changed yaml aliases

* Adapted naming conventions

* Removed error code at the end

* Adapted configuration

* Minor changes

* Minor changes

* Minor changes

* Removed spaces

* Removed docker-related config from groovy file

* Minor changes

* Minor changes

* Removed container config

* Corrected testing function name

* Deleted unnecessary parts

* Changed service deletion message

* Changed service deletion message

* Logging out before throwing error service deletion step fails

* Minor changes

* Minor changes

* Minor changes

* Delete .DS_Store

* Delete .DS_Store

* Delete .DS_Store

* Delete .DS_Store

* Minor changes

* Minor changes

* Minor changes

* Added newline at end of file

* Added newline at end of file

* Changes for Pull request optimization

* added documentaion

* Adapted documentation

* Adapted documentation

* Adapted documentation

* Adapted documentation

* Adapted documentation

* Added CFDeleteServiceKeys

* Added ServiceKey deletion tests

* added cfServiceKeys flag explanation to documentation

* removed trailing spaces from documentation

* resolving conflicts

* Changed deletion message an variable naming

* Changed tests

* Changed tests

* Changed tests

* Changed tests

* Changed CloudFoundryDeleteServiceOptions to options

* Changed CloudFoundryDeleteServiceOptions to options

* Minor changes

* Minor changes

* Changed variable naming

* Changed error handling

* Changed error handling and logging

* Changed documentation

* Simplified code

* Fixed CodeClimate issues

* Changed from returning err to nil where no errur returned needed

* Add cloudFoundryCreateServiceKey Go Step

* Changed Groovy File

* Changed aliases

* Removed unneccessary parts

* Minor changes

* Minor changes

* Adapted documentation

* Adapted tests

* Adapted Groovy File

* Changed Groovy file

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Removed Groovy Tests for cfCreateServiceKey

* Minor changes

* Added ATC Check YAML

* Added ATC Check generated files

* Added test class

* Added abapEnvironmentRunATCCheck

* Minor changes

* Minor changes

* Changed groovy

* Minor changes

* Changed groovy

* Changed groovy

* Minor changes

* Adapted Groovy imports

* Adapted Groovy imports

* Adapted Groovy imports

* Adapted Groovy

* Getting ATC results

* Changed error message

* changed groovy

* removed trailing spaces

* Added login check

* Minor changes

* Added step to whitelistScriptReference

* Added ATC error message handling

* Added groovy file

* Added step to groovy tests

* corrected metadata file

* Debugging

* Debugging

* Added yaml config parameter for ATC run

* Adapted file location of ATC run config to jenkins specific location

* Implementing universal pipeline logic for finding yaml config regardless of pipeline

* Changed error handling for reading config yaml file

* Changed atcrunconfig alias

* minor changes

* Minor changes

* Minor changes

* Changed back to dynamic file reading

* Minor changes

* filepath changes

* Removing CF Login

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Minor changes

* Removed whitespaces

* Added CF functions unit tests

* Added invalid parameter handling

* Removed package and SC flag

* Minor changes

* Changed tests

* Changed tests

* Changed tests

* Minor changes

* Changed tests

* removed unnecessary logout

* Added documentation

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Changed docu

* Removed trailing spaces

* Added newline at end of file

* code climate fixes

* code climate fixes

* code climate fixes

* Minor changes

* Minor changes

* Minor changes

* Changed tests

* Test changes

* Splitted Cloud Foundry functions into two classes

* Removed two steps from whtielistScriptReference

* removed atcrunConfig alias

* issue fixes

* Changed docu

* Changed docu

* Changed docu

* Removed trailing spaced from docu

* Changed docu

* Go generator run

* Issue fixes

* Remove unnecessary imports

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

* Update whitelistScript

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

* Adding piperutils for writing xml file

* Persisting ATC Results with piperutils

* Set failonMissingReports to true

* Refactoring for CodeClimate

* Changed result file name

* Changed credentials aliases

* changing secret name

* Removing trailing spaces

* Added secret name and alias to docu

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-05-13 14:51:48 +02:00
Kevin Hudemann
d7985dd1b5
Enable use of customDefaults from Project Config also in Groovy (#1521)
This change enables the setupCommonPipelineEnvironment step to handle
custom default configurations defined in customDefaults parameter of the
project configuration.

Previously, only the getConfig Go step was able to incorporate custom
default configurations.

Update documentation on custom defaults and sharing between projects.

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-05-12 13:50:18 +02:00
Christopher Fenner
04da130dbd
fix(sonar): handle piper-bin error result (#1524) 2020-05-11 12:46:16 +02:00
Marcus Holl
803071f143
fail in case git add or git commit fails during artifactSetVersion (#1491)
* fail in case git add or git commit fails during artifactSetVersion

* check if there is a git config on os level

* better error message in case no user name/mail are configured


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

Co-authored-by: Srinikitha Kondreddy <srinikitha.kondreddy@sap.com>
2020-05-11 10:05:18 +02:00
Florian Wilhelm
eaf5479e9c
Fix maven parameter handling (#1493)
Avoid maven error `Unknown lifecycle phase \"-\"` when the value of a define contains `-`.

Don't split and trim maven arguments. Expect they come in as a list, keep them as list.

This is a breaking change compared to the old Groovy implementation which relied on using a shell for calling maven.

As an example, consider this diff:

```diff
-        goals: 'org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate',
-        defines: "-Dexpression=$pomPathExpression -DforceStdout -q",
+        goals: ['org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate'],
+        defines: ["-Dexpression=$pomPathExpression", "-DforceStdout", "-q"],
```
2020-05-06 17:43:32 +02:00
Christopher Fenner
e4f827118b
refactor(protecode): handle DOCKER_CONFIG in go (#1502)
* handle DOCKER_CONFIG in go

* cleanup

* always use parent dir

* take care of errors
2020-05-06 16:07:10 +02:00
Daniel Kurzynski
89ef622c2b
Let users configure the sap npm registry for mta builds via config.yml (#1499) 2020-05-06 13:05:54 +02:00
Marcus Holl
2c7c165e62
Malware scan metadata update (#1483) 2020-05-06 08:52:26 +02:00
Christopher Fenner
669dc91688
fix: prevent script to json conversion (#1495)
* prevent script to json conversion

* use piperExecuteBin

* correct imports

* fix trailing spaces
2020-05-05 15:21:59 +02:00
Christopher Fenner
d75dced2a6
test: activate common test cases using piperExecuteBin (#1501) 2020-05-05 14:31:12 +02:00
Christopher Fenner
e153e8f798
fix(protecode): provide correct username value (#1500)
leftover of #1426
2020-05-04 16:50:17 +02:00
Marcus Holl
30850aec2d
Add groovy wrapper for malwarescanning (#1403) 2020-04-30 11:14:14 +02:00
Oliver Nocon
3f1a9d004a
Allow proper usage of resilience feature in golang steps (#1487)
* Allow proper usage of resilience feature in golang steps
2020-04-30 10:39:27 +02:00
Oliver Nocon
e8c6baca42
Golang errors: improve error message in groovy part (#1482)
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-29 11:26:29 +02:00
Christopher Fenner
aab3c5989f
fix(sonar): remove .sonar-scanner and .certificates folder after scan (#1481) 2020-04-29 11:11:23 +02:00
Daniel Kurzynski
6bebfbfced
Fix nexus upload to pass correct environment variable (#1480) 2020-04-28 21:09:19 +02:00
Oliver Nocon
43947e6ef5
Pass golang error details to Jenkins pipeline (#1443)
Do not exit with os.Exit(1) but using log.Entry().Fatal() instead
* Golang: forward error details
* extend groovy wrapper to provide proper error message
* create closure for error handling
2020-04-28 07:42:02 +02:00
Oliver Nocon
d27e946280
Update artifactPrepareVersion.groovy (#1470) 2020-04-27 17:20:56 +02:00
Kevin Hudemann
0be3225a3c
Enable the use of artifactPrepareVersion instead of artifactSetVersion (#1455)
This change enables the use of the artifactPrepareVersion go step instead
of the deprecated artifactSetVersion groovy implementation for the Cloud
SDK Pipeline. The groovy wrapper for the artifactPrepareVersion step now
enables the use of the download cache and minor issues are fixed.
2020-04-27 09:56:58 +02:00
Oliver Nocon
b9450702af
piperExecuteBin: fix reading environment (#1452)
* piperExecuteBin: fix reading environment
* update tests

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-04-24 22:41:34 +02:00
Florian Wilhelm
3f5b9cc555
Implement npmExecuteScripts step (#1422) 2020-04-24 18:29:30 +02:00
Chris Bo
fb4cfd84ec
Introducing new step: "gctsCreateRepository" (#1424)
With the step gctsCreateRepository it is possible to create a local gCTS repository on an ABAP server

Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-04-24 15:31:41 +02:00
Daniel Kurzynski
974327d16e
Use mavenExecute from go (#1388)
Also establish mavenExecute() via new JenkinsMavenExecuteRule in Groovy Unit Tests.

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-24 10:41:49 +02:00
Hans Schulz
5c27a717c3
Make smoke test of blueGreen deployment optional (#1394)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-22 21:59:14 +02:00
Daniel Kurzynski
76d24e560e
Fix documentation generation for cloud foundry (#1420) 2020-04-22 11:50:30 +02:00
Oliver Nocon
067eb0ba6a
Improve error messages for test failures (#1417) 2020-04-17 11:59:51 +02:00
Daniel Kurzynski
1c247de9d0
Add option to always run stages in a pod (#1414) 2020-04-17 10:31:04 +02:00
Oliver Nocon
4061881b53
UIVeri5 & Newman: provide better error messages (#1410) 2020-04-16 09:14:39 +02:00
Oliver Nocon
bd0eed30ff
stageWrapper: new error handling (#1401)
* handlePipelineStepErrors: allow disabling for stages
* update error handling in stages
* move file loading into try catch
* Cleanup DebugReport before test

Apparantly, the same DebugReport instance is loaded
during all Unit Tests. Avoid left-overs from previous
tests.

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-04-15 14:02:41 +02:00
Daniel Kurzynski
b32214ee78
Inherit from Kubernetes pod template (#1361) 2020-04-08 19:54:06 +02:00
Christopher Fenner
3308243685
fix: add stash for pipeline custom defaults (#1381) 2020-04-08 16:00:02 +02:00
Christopher Fenner
c190deee44
refactor(sonar): switch to Sonar scan in GO (#1320)
* use sonar go in groovy

* use SONAR_TOKEN

* only use owner/repo if both are set

* trim version to major version digit

* fix code climate issues

* remove Sonar defaults

* use sonar go step

* use SONAR_TOKEN

* use certs from parameters

* use docker workspace & options

* add instance parameter

* implement branchName

* implement branchName

* remove duplicate default

* update docs

* fix TODOs

* remove merge mess

* fix code climate issue

* address comments

* respect custom defaults and custom config file name

* fix typo

* remove obsolete test cases

* disable CommonStepChecks

* check step config instead of context config

* remove TODOs

* respect jenkins PR envvars

* use value from stepConfig

* Update vars/sonarExecuteScan.groovy

* rename options to config

* correct type for options

* add test cases

* log sonar.options in debug message

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-08 12:55:46 +02:00
chrisfries
5c1be118a3
fix: fixing issues with cf docker deployment (#1289) 2020-04-07 09:10:38 +02:00
Stephan Aßmus
ded6152b56
nexusUpload: Remove config processing from Groovy layer (#1364) 2020-04-04 11:44:02 +02:00
Oliver Nocon
999197b919
Add step to prepare the version for an artifact (#1343) 2020-04-03 16:34:40 +02:00
dominiklendle
00b80f0247
Removed report from piperExecuteBin (#1362)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-04-03 13:23:44 +02:00
HenrikB
0a29ff2c57
feat(sonar): report to custom branch name (#1341)
* feat(sonar): report to custom branch name

* fix typo

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-04-01 12:38:36 +02:00
Dominik Lendle
5fba815fe8
Transformation of cfCreateServiceKey to Golang (#1253) 2020-04-01 11:45:31 +02:00
Marcus Holl
04b5805410
Provide verbose flag via signature (#1304) 2020-04-01 10:00:36 +02:00
Stephan Aßmus
0b8b6f2b0c
Migrate stage artifact deployment from Cloud SDK Pipeline-Lib (#1324)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
Co-authored-by: Florian Geckeler <f.geckeler@sap.com>
2020-03-31 15:16:18 +02:00
Stephan Aßmus
0c6dabbd1e
Pass custom config and default configs also to getConfig (#1346)
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-03-31 13:10:02 +02:00
Srinikitha Kondreddy
27286deb59
Add env variable to control execution of extensions in project repo. (#1326)
* Introduce new env variable to restrict extension files exec

* Add docu on restricting exec of extension files

* Update documentation/docs/extensibility.md

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

* Rename parameter

* Update documentation/docs/extensibility.md

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

* Add test for restricting extensions exec

* Fix additional tests

* extract condition

* use binding for env vars

* mock env binding

* Update piperStageWrapper.groovy

🙄

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-03-31 12:51:34 +02:00
Florian Geckeler
bd92804745
Add static code checks stage (#1308)
* Add static code checks stage
* Rework go step to accept thresholds for the checks and fail maven build if above the thresholds
2020-03-30 15:59:59 +02:00
Stephan Aßmus
03096b5d05
Pass custom default-config files and custom project config from Jenkins side to piper (#1333) 2020-03-30 14:31:24 +02:00
Florian Wilhelm
0c3493f9ad
Only add already tracked files to git (#1312) 2020-03-26 09:41:03 +01:00
Daniel Kurzynski
9ed39cfa3f
Maven build groovy (#1303) 2020-03-23 09:58:54 +01:00
Stephan Aßmus
20b65d5a2e
Implement nexusUpload command and tests (#1255)
Artifacts to upload are assembled for MTA projects and Maven projects with optional application sub-module. Then maven deploy:deploy-file is used as backend to upload bundles of artifacts plus sub-artifacts.

Co-authored-by: Florian Wilhelm <florian.wilhelm02@sap.com>
2020-03-20 18:20:52 +01:00
Daniel Kurzynski
6bd259e5d4
Fix sidecar env vars (#1292) 2020-03-20 11:36:16 +01:00
Kaj-Sören Mossdorf
5616ac2ab0
Parse values to json with groovy methods (#1266)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-03-19 14:46:56 +01:00
Christopher Fenner
6feb0cf9e9
fix(telemetry): disable telemetry in init stage (#1272)
* disable telemetry in init stage

* Apply suggestions from code review

* Update vars/piperStageWrapper.groovy
2020-03-19 10:49:28 +01:00