Stephan Aßmus
da0f25fd7b
Piper-Go: Allow aliases also for inputs of type "secret" ( #1355 )
...
* Fix typos
* Support aliases also for secrets
* Adapt & extend Unit Tests
* Output deprecation warning for param/secret aliases
... if the alias is marked as 'deprecated'.
2020-04-01 20:46:33 +02:00
Dominik Lendle
5fba815fe8
Transformation of cfCreateServiceKey to Golang ( #1253 )
2020-04-01 11:45:31 +02:00
Stephan Aßmus
96030304a1
Restore possibility to run piper without config file ( #1345 )
2020-03-31 16:06:27 +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
Florian Geckeler
bb72c38413
Add documentation for mavenExecuteStaticCodeChecks groovy part ( #1339 )
...
* Add documentation for mavenExecuteStaticCodeChecks groovy part
* Add import
* Remove wrong default
* Add markdown file
* Add mkdocs
* Update vars/mavenExecuteStaticCodeChecks.groovy
Co-Authored-By: Daniel Kurzynski <daniel.kurzynski@sap.com>
* remove import
* remove import
Co-authored-by: Daniel Kurzynski <daniel.kurzynski@sap.com>
2020-03-31 11:29:44 +02:00
Daniel Mieg
86dd37c035
Increase timeout ( #1319 )
...
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-03-31 10:56:57 +02:00
Oliver Nocon
91b6b0900f
Config and Defaults via http(s) ( #1302 )
...
* Config and Defaults via http(s)
Add the possibility to use http(s) urls as path to
* config.yml
* defaults
* Remove comment
* Addressing PR feedback
* Fix error handling
2020-03-31 08:47:09 +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
Daniel Kurzynski
a40ac015a8
Add tests for maven build ( #1276 )
2020-03-26 08:23:21 +01:00
Stephan Aßmus
804bd8e3e0
http.go: Set fine-grained timeouts ( #1257 )
...
* Replace the default maximum request deadline with a default timeout on the transport level.
* Keep the possibility to set a maximum request deadline.
2020-03-23 15:02:22 +01:00
Stephan Aßmus
4f7955bede
Fix CLI exec call building for keytool ( #1307 )
2020-03-23 13:29:42 +01:00
Christopher Fenner
60b7d3a8df
refactor(sonar): implement Sonar step in GO ( #1042 )
...
* refactor(sonar): add initial metadata file for GO-based sonar step
* refactor(sonar): add initial generated files for GO-based sonar step
* refactor(sonar): add initial step file for GO-based sonar step
* refactor(sonar): add sonar cmd to executable
* refactor(sonar): cleanup metadata file
* fix(go): use capital TLS in golang names
* add download of Sonar scanner cli
* move download & unzip methods to FileUtils
* download certificate files
* use http.Downloader
* update generated code
* add slice prefix function
* update sonar step
* add test cases
* update docs
* use node:lts image
* use latest sonar-scanner
* add test cases
* use latest sonar-scanner
* fix test case
* change things
* return errors on functions
* limit changeID visibility
* use lowercase scm provider
* add test case for legacy PRs
* add test case
* update docs
* use local temp dir
* extend parameter visibility to GENERAL
* use SONAR_AUTH_TOKEN
* remove comments
* update generated code
* Apply suggestions from code review
* change to private fields
* use setter for sonar options & environment
* remove obsolete return statement
* add comment about Downloader mock
* add test case for custom options
* handle custom options
* refactor slice functions
* fix go fmt
* fix generated step code
* update docs
2020-03-23 10:38:31 +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
Oliver Nocon
8fbeddb26c
Golang step metadata: Config aliases for steps ( #1293 )
...
* Golang step metadata: Config aliases for steps
This will ease following scenarios:
* config migration due to step name changes
* re-use of more general config, e.g. `mavenExecute` in `mavenBuild`
* fix CodeClimate finding
* Fix panic if original stage config does not exist yet
2020-03-19 17:24:35 +01:00
Daniel Kurzynski
4e9e31810c
Config maven in general
2020-03-17 12:09:08 +01:00
Daniel Mieg
81708648e4
Improve error handling ( #1263 )
2020-03-17 10:54:48 +01:00
Daniel Kurzynski
a923e4cfc2
Add maven build/install step ( #1245 )
2020-03-13 13:32:37 +01:00
Florian Geckeler
9a28e12d5d
Add groovy wrapper for mavenExecuteStaticCodeChecks and rename go step
2020-03-12 15:45:57 +01:00
Christopher Fenner
922a1796e0
fix(mta): add os.Environ() only once to command ( #1260 )
...
* add os.Environ() only once
* correct imports
2020-03-11 15:15:00 +01:00
Florian Geckeler
ed7f4831fb
Fix typo in mavenStaticCodeChecks.yaml
2020-03-10 09:59:22 +01:00
Florian Geckeler
de2909e64b
Add Maven static code checks
...
* add static code checks for maven based projects as:
* pmd plugin
* spotBugs plugin
* test modules as unit-tests and integration-tests will be ignored by default. Additional modules to ignore are configurable
* for pmd: rulesets and excludes are configurable
* for spotBugs: includeFilter and excludeFilter are configurable
2020-03-09 08:58:59 +01:00
Oliver Nocon
622d559eae
Add ServiceKey deletion to cloudFoundryDeleteService step ( #1177 )
2020-03-05 15:35:43 +01:00
Marcus Holl
2918ee52cc
Eliminte envMockRunner ( #1233 )
...
ExecMockRunner and ShellMockRunner both needs an environment. "Extending"
here leads to "subclasses" for both cases. That is more long-winded since
it could be.
2020-03-03 10:26:34 +01:00
Marcus Holl
52b0991a36
Get rid of two dimensional env array ( #1235 )
...
I don't understand why there should be a two dimensional array.
When dealing with envs we have normally a list containing entries like
[]string{"DEBUG=true", "HOME=/home/me"}
Having two dimensional env arrays would mean to have several alternate
environment in the tests at the same time. Don't think there is a need
for that.
2020-03-03 09:26:32 +01:00
Florian Geckeler
783d955654
Add mavenExecute to go lib
2020-02-28 13:09:46 +01:00
Marcus Holl
95a1a4d928
xsDeploy: simplifiy assertions in tests ( #1211 )
2020-02-28 11:20:17 +01:00
Marcus Holl
e10a7f20c7
xs deploy cpe inputs and outputs ( #1111 )
...
Use inputs and outputs from commonPipelineEnvironment
* mtaPath is read as input
* operationId is provided as output and read as input
2020-02-28 11:01:09 +01:00
Marcus Holl
161e0b5d3b
xsDeploy: check for operationId in go layer and return error in case it is missing ( #1109 )
2020-02-28 09:40:22 +01:00
Florian Geckeler
ef330e1eee
Move mock capabilities to pkg/mock/runner and adapt all tests
2020-02-27 12:11:22 +01:00
Christopher Fenner
3794371be3
fix typo ( #1224 )
...
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-02-26 16:21:40 +01:00
Marcus Holl
190a4708a2
go: mta build ( #1128 )
...
move mtaBuild step from groovy to go.
Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-02-25 14:33:34 +01:00
Florian Geckeler
48fa0a7521
Add 'Code generated by' header to stepGoTemplate
2020-02-21 12:56:09 +01:00
Marcus Holl
d04edd5e8d
unify mocking for shell and exec runner ( #1120 )
...
* same behaviour for shellRunner and execRunner wrt errors and stdout
* replace shouldFail with shouldFailOnCommand
* [formatting only] format struct
* Move to regex for execptions and stdout
* shrink code
2020-02-21 10:56:53 +01:00
redehnroV
716ac7735d
Fixed error handling gitHubPublishRelease ( #1184 )
2020-02-14 14:56:23 +01:00
redehnroV
be03b3dfc1
Adjust documentation for Protecode ( #1175 )
2020-02-12 15:57:39 +01:00
Marcus Holl
38652eed04
[refactoring] Condence common functions for execRunner and shellRunner into runner interface ( #1127 )
...
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-12 10:12:58 +01:00
dominiklendle
2007a94174
Add step cloudFoundryDeleteService ( #1097 )
2020-02-10 14:53:12 +01:00
redehnroV
c37df0d55e
Adjust protecode influx parameter ( #1161 )
2020-02-07 14:12:40 +01:00
redehnroV
2ebf2010b7
Protecode as GoLang ( #1119 )
...
* Protecode as go implementation
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-02-06 16:16:34 +01:00
Sven Merk
3139255312
Fix chars in checkmarx test, improve development.md ( #1154 )
...
* Fix chars in test
* Update DEVELOPMENT.md
* Update DEVELOPMENT.md
* Update DEVELOPMENT.md
2020-02-06 09:43:19 +01:00
Oliver Nocon
cead027bfb
Support yml and yaml extension of config files ( #1153 )
...
* Support yml and yaml extension of config files
* Update cmd/piper.go
Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-02-06 09:08:15 +01:00
Daniel Mieg
2e742c7ed3
Fix formatting of documentation ( #1151 )
...
* Fix formatting of documentation
* Regenerate go files
2020-02-05 15:46:14 +01:00
Daniel Mieg
6f0bde154b
Go implementation for abapEnvironmentPullGitRepo() ( #1107 )
2020-02-04 11:43:27 +01:00
Oliver Nocon
9c1bd04752
Streamline step generation ( #1142 )
...
* Streamline step generation
* Include PR feedback, update DEVELOPMENT.md
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Sven Merk <33895725+nevskrem@users.noreply.github.com>
2020-02-04 10:46:43 +01:00
Sven Merk
36423eb78d
Avoid potential collisions among steps ( #1141 )
...
* Avoid potential collisions amongst steps
* Improve code, move to JenkinsUtils
* Improve code
* Improve tests
* Fix test
* Add scope on golang side
2020-02-03 15:25:49 +01:00
Oliver Nocon
b542d15998
Enhance telemetry reporting ( #1133 )
...
* Enhance telemetry reporting
* Use central telemetry data object
* Add duration
Co-Authored-By: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
2020-01-31 14:06:08 +01:00
Oliver Nocon
152c4dc9d2
Pass container image via CPE ( #1113 )
...
* Pass container image via CPE
* Update generated step
* update map name to better represent content
2020-01-29 16:03:18 +01:00
Marcus Holl
40f0a17b45
re-use execRunner for envExecRunner ( #1117 )
...
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-01-29 14:22:43 +01:00
Christopher Fenner
aa3fb8adb4
feat(go): add telemetry reporting ( #1100 )
...
* Add telemetry support
* First round telemetry
* Add telemetry flag
* fix: move files to avoid import cycles
* add noTelemetry as global config option
* Respect telemetry configuration for reporting
* add site id, swa endpoint
* correct logger initialization
* add http logic
* rename init method
* rename consts & types
* convert struct to payload
* convert data to payload string
* move activation flag out of data structure
* extract types to own file
* build query using net/url
* correct field mapping
* extract notify coding to own file
* cleanup parameter mapping
* preare base data
* fix codeclimate issue
* correct test case
* fill values from env
* test all fields
* untrack notify.go
* ignore empty custom values
* cleanup data.go
* add test cases
* cleanup
* add usage reporting to karma step
* add usage reporting to step generator
* externalise siteID
* correct custom field names
* test env handling
* simplify method signature
* revert parameter negation
* correct import
* adjust golden file
* inclease log level
* ignore test case
* Revert "inclease log level"
This reverts commit 70cae0e029
.
* add test case for envvars
* remove duplicate reporting
* remove duplicate reporting
* correct format
* regenerate checkmarx file
* add log message on deactivation
* rename function
* add comments to understand SWA mapping
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-01-29 13:17:54 +01:00