Commit Graph
59 Commits
Author SHA1 Message Date
Christopher Fenner 6c25c28801 chore(pipeline): add action to lint markdown files (#1593)
* add markdownlint action

* add markdownlint config

* add dummy change to MD file

* rename job

* run on master branch

* remove ignore files

* add dummy change

* revert dummy change

* Update markdown.yml

* Update .markdownlint.yml

* Update README.md

* Update .markdownlint.yml

* Update markdown.yml
2020-06-15 21:10:12 +02:00
Christopher Fenner 8e78199cce chore: emit used project config & defaults to log (#1633)
* print used project config

* print used project defaults
2020-06-10 09:39:29 +02:00
Christopher FennerandOliver Nocon 65a3ecd208 refactor(go): increase retry time for piper binary download (#1591)
* increase retry time

* Update src/com/sap/piper/PiperGoUtils.groovy

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

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2020-05-28 09:28:31 +02:00
Christopher Fenner 0ce6473a98 fix(spinnaker): fix MissingPropertyException (#1543)
* add test case

* fix issue
2020-05-14 17:45:02 +02:00
Christopher Fenner f9be21900e fix(versioning): commit only modified files (#1549)
* add only modified files

* adjust tests

* remove mock add
2020-05-14 17:20:13 +02:00
Christopher FennerandStephan Aßmus 27c6320474 feat(sonar): write flag for sonar execution to influx (#1534)
* write flag for sonar execution to influx

* add missing step metadata file

* first attempt to read influx from disk

* add missing import

* correct glob pattern

* use file path

* correct type names

* cleanup

* fix code climate issue

* fix typo

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>

* add test case

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-05-14 13:46:40 +02:00
Christopher Fenner 04da130dbd fix(sonar): handle piper-bin error result (#1524) 2020-05-11 12:46:16 +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
Christopher Fenner d18f4a8ff0 docs: correct protecode sample (#1507) 2020-05-05 16:32:17 +02:00
Christopher Fenner 8874ace564 fix(protecode): handle api request issues (#1508)
* fix(protecode): handle api request issues

* Update pkg/protecode/protecode.go
2020-05-05 16:26:41 +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
Christopher Fenner 6eb8dc8191 docs: add possible value for bool parameters (#1486) 2020-04-30 06:39:48 +02:00
Christopher Fenner 3a4d4b2de7 docs: add general config parameters to GO docs (#1471)
* extract StepConfiguration generation to separate file

* add general options to parameter and config table

* fix test case

* remove telemetry flag from docs

* Revert "extract StepConfiguration generation to separate file"

This reverts commit df80dab8cd.
2020-04-29 14:40:11 +02:00
Christopher Fenner aab3c5989f fix(sonar): remove .sonar-scanner and .certificates folder after scan (#1481) 2020-04-29 11:11:23 +02:00
Christopher Fenner 36a198ac86 docs: add possible values (#1458)
* add possible values for xsDeploy

* add possible values for protecodeExecuteScan

* add possible values for mtaBuild

* add possible values for artifactPrepareVersion

* add possible values for sonarExecuteScan

* add possible values for detectExecuteScan

* add possible values for checkmarxExecuteScan

* Update gctsCreateRepository.yaml
2020-04-27 15:16:01 +02:00
Christopher Fenner 8455306a5e docs: add code blocks to parameters table (#1460)
* add code blocks

* set parameters name in code block

* change test cases

* set parameters name in code block

* add step configuratio caption

* remove details caption

* add code block for docker settings

* add code block for stash content

* add code block for defaults

* add code block for sidecar image & name

* correct test cases

* add code block for docker

* correct test cases
2020-04-27 12:16:41 +02:00
Christopher Fenner 1660f4df48 docs: remove dangling whitespaces (#1459)
* omit <nil> in parameter table

* remove additional whitespaces

* add newline

* remove whitespaces

* adjust test cases

* fix whitespaces
2020-04-24 21:48:28 +02:00
Christopher Fenner 96439972e2 docs: show possible values in step documentation (#1453)
* add possibleValues to model

* include possible values into docs
2020-04-24 14:13:02 +02:00
Christopher Fenner 2100632b54 docs: omit <nil> in parameter table (#1450)
* omit <nil> in parameter table

* adjust test case
2020-04-24 11:21:33 +02:00
Christopher Fenner b942dcd954 fix(telemetry): correct source URL for web reporting (#1444) 2020-04-23 14:33:06 +02:00
Christopher Fenner f655c07a92 fix(sonar): do not fail on missing task report file (#1436)
* fix(sonar): do not fail on missing task report file

* fix format
2020-04-21 22:47:38 +02:00
Christopher FennerandStephan Aßmus 989c47db2c feat(sonar): extract sonar project link to report JSON (#1390)
* add test cases for sonar pkg

* add sonar pkg

* read task report and write reports JSON

* use alias

* rename type

* set read permission on created files

* archive reports

* handle empty report lists

* use filepath

* simplify report creation

* improve error message

* Revert "archive reports"

This reverts commit ba4b56fec1.

* improve test cases

* Add descriptions

Co-Authored-By: Stephan Aßmus <stephan.assmus@sap.com>

* improve tests

Co-Authored-By: Stephan Aßmus <stephan.assmus@sap.com>

Co-authored-by: Stephan Aßmus <stephan.assmus@sap.com>
2020-04-21 15:45:52 +02:00
Christopher Fenner 57f5e436a6 fix: improve stepResults handling (#1425)
* set read permission on created files

* handle empty report lists

* remove test output

* remove duplicate asserts

* remove unnecessary asserts
2020-04-20 16:18:49 +02:00
Christopher Fenner 46bee01ab9 chore: cache .m2 directory during groovy tests (#1419)
* chore: cache .m2 directory during groovy tests

* rename workflow job
2020-04-17 21:29:48 +02:00
Christopher Fenner 171a063590 chore: add gh-action to generate docs (#1386)
* add workflow to generate docs

* Update documentation.yaml

* Update createDocu.sh

* add caching

* fix c&p error

* Update documentation.yaml

* Update documentation.yaml

* remove docs build from travis

* activate workflow for PRs
2020-04-17 17:44:31 +02:00
Christopher Fenner 70c000338f fix: read config.yaml and config.yml in getConfig command (#1400) 2020-04-14 18:10:56 +02:00
Christopher FennerandFlorian Wilhelm b0144614e5 improve error message when parsing config (#1387)
* improve error message when parsing config

* adjust test case

Co-authored-by: Florian Wilhelm <florian.wilhelm02@sap.com>
2020-04-09 13:40:04 +02:00
Christopher Fenner 3308243685 fix: add stash for pipeline custom defaults (#1381) 2020-04-08 16:00:02 +02:00
Christopher FennerandOliver Nocon 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
Christopher Fenner 2fb304588e fix(sonar): use SONAR_TOKEN in Sonar go (#1357) 2020-04-02 10:44:22 +02:00
Christopher Fenner c74183771a feat(mta): update cloud MTA build tool to v1.0.10 (#1310) 2020-03-24 08:51: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
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
Christopher Fenner 5b344b8b7a use sonar-scanner 4.3.0.2102 (#1271) 2020-03-16 10:40:38 +01:00
Christopher Fenner a970507619 refactor(sonar): provide trust store via JVM parameter (#1270)
* provide trust store via JVM parameter

* adjust test cases

* Update vars/sonarExecuteScan.groovy

* Update vars/sonarExecuteScan.groovy

* Update sonarExecuteScan.groovy
2020-03-16 10:34:07 +01:00
Christopher Fenner dd67be3d21 docs(command): Clarify runExecutable Env usage (#1264)
* Clarify runExecutable Env usage

* remove trailing spaces
2020-03-12 09:00:51 +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
Christopher Fenner 0b3b4aae3d chore: streamline GH actions (#1246)
* chore: streamline GH actions

* force use of local piper

* look for piper in project root

* use local piper

* Update .github/workflows/verify-go.yml

* remove chmod
2020-03-05 13:35:35 +01:00
Christopher FennerandMaximilian Lenkeit 2b2b57305e fix: handle NPE in seleniumExecuteTests (#1239)
* handle NPE

* fix Code Climate issue

* add test case

Co-Authored-By: Maximilian Lenkeit <mlenkeit@users.noreply.github.com>

* correct test case

Co-authored-by: Maximilian Lenkeit <mlenkeit@users.noreply.github.com>
2020-03-03 17:09:09 +01:00
Christopher FennerandMarcus Holl 3794371be3 fix typo (#1224)
Co-authored-by: Marcus Holl <marcus.holl@sap.com>
2020-02-26 16:21:40 +01:00
Christopher Fenner ea45136c3d feat(go): add download file function (#1200)
* add download file function

* add test case

* Update pkg/piperutils/FileUtils.go

* correct test case

* remove FileUtils.Download

* add Downloader

* add Downloader

* fix error

* respect header and cookies

* add test case

* rename files

* correct test case

* remove SendRequest

* correct test case
2020-02-19 19:26:47 +01:00
Christopher Fenner 87f0cb687a refactor(deployment): ease debugging in blue ocean (#1173)
* Update cloudFoundryDeploy.groovy

fixes #857

* Update cloudFoundryDeploy.groovy

* Update neoDeploy.groovy

* fix typo

* Update cloudFoundryDeploy.groovy

* Update cloudFoundryDeploy.groovy

* adjust test cases
2020-02-14 13:41:36 +01:00
Christopher Fenner ee1eed4f5f chore(pipeline): streamline travis job (#1150)
* chore(pipeline): streamline travis job

* fix stages
2020-02-05 13:23:27 +01:00
Christopher Fenner 5e06cc4ff5 chore(pipeline): enable GH actions for PRs from forks (#1144)
* Update verify-go.yml

* Update verify-go.yml

* revert dummy change

* Update verify-go.yml

* fix code climate

* Update verify-groovy.yml
2020-02-04 10:00:02 +01:00
Christopher Fenner a79fd95fd8 fix: correct jenkinsKubernetes parameter exposure & docs (#721)
* remove jenkinsKubernetes parameter
2020-02-04 08:02:38 +01:00
Christopher Fenner 6494638106 chore(pipeline): add Groovy unit test as GH action (#1140)
* Create verify-groovy.yml

* correct indent

* correct indent
2020-02-03 15:59:56 +01:00
Christopher Fenner 768c6aa399 fix: generator for custom steps (#1139) 2020-01-31 15:39:45 +01:00
Christopher Fenner d2b8b373b9 chore(pipeline): add GO unit test as GH action (#1138)
* add GO unit test job

* Update .github/workflows/verify-go.yml
2020-01-31 15:18:34 +01:00
Christopher Fenner 2da06bfa91 chore(build): use GH actions to verify if go codebase is up to date (#1125)
* add action to keep codebase up to date

* add go mod tidy command

* use official go action

* correct go fmt command

* fix code climate findings

* remove dummy changes

* separate checks
2020-01-29 18:09:51 +01:00
Christopher FennerandOliver Nocon 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
Christopher Fenner 92441577d8 fix(NPM): change NodeJS image to LTS (#1069)
* change NodeJS image to current LTS

* Update default_pipeline_environment.yml

* Update SonarExecuteScanTest.groovy

* use node:lts-stretch image
2020-01-29 11:17:56 +01:00
Christopher Fenner ce47a80d19 chore(test): cleanup metaClass (#1104) 2020-01-22 08:57:37 +01:00
Christopher Fenner 53317222a3 fix: correct step parameters (unknown parameters found) (#1093)
* fix: correct step invocations (WARNING: Unknown parameter(s) found for class)

* fix: correct step invocations (WARNING: Unknown parameter(s) found for class)
2020-01-13 16:28:12 +01:00
Christopher Fenner 686235613c fix(sonar): run sonar scan in NodeJS container (#1078)
* fix(sonar): run sonar scan in NodeJS container

* fix typo

* adapt tests
2019-12-20 10:51:33 +01:00
Christopher Fenner 57ae0e8f8d fix(kubernetes): invalidate stashes after usage (#1064)
* fix(kubernetes): invalidate stashes after usage

fixes #1057

* adjust test case
2019-12-17 15:10:57 +01:00
Christopher Fenner 68ef5393c7 chore(go): add schema for go metadata files (#1052)
* chore(go): add schema for go metadata files

* chore(go): use k8s container definition in schema

* chore(go): add reusable schema definitions

* chore(go): add further schema definitions

* docs(schema): add description how to use metadata schema
2019-12-17 12:45:53 +01:00
Christopher Fenner 1b95951eb2 fix(mta): create MTAR in project root when using Cloud MBT (#1024)
* fix(mta): generate MTAR to the project root when Cloud MBT is used

fixes #1023

* add test case
2019-12-04 13:24:23 +01:00