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

198 Commits

Author SHA1 Message Date
Oliver Nocon
14efc51d24
whitesourceExecuteScan - fix stashing behavior for golang (#688)
* whitesourceExecuteScan - fix stashing behavior for golang
**changes:**

golang scan requires sources to be present. They are already part of the `checkmarx` stash which can be used here.

* fix tests
2019-05-03 16:21:36 +02:00
Oliver Nocon
700a6e2e4e
Add step kanikoExecute for Docker builds using Kaniko (#684)
* Add step kanikoExecute for Docker builds using Kaniko
* Update kanikoExecute.md
* address PR feedback
2019-05-02 17:29:11 +02:00
shellmann
bbdb719313 Add Ruby (bundler) support for gaugeExecuteTests (#580)
* Add Ruby (bundler) support for gaugeExecuteTests
Including seleniumExecuteTests.
* Empty the dockerWorkspace attribute for bundler
2019-04-15 13:21:32 +02:00
Alejandra Ferreiro Vidal
86978becfc remove utils.getMandatoryParameter() 2019-04-09 16:25:25 +02:00
Oliver Nocon
4d945c8557
handlePipelineStepErrors - allow step timeouts (#644)
* handlePipelineStepErrors - allow step timeouts

This adds another resilience option:
A timeout can be configured for steps in order to stop step execution, continue with the pipeline while setting build status to "UNSTABLE"
2019-04-05 11:16:34 +02:00
Sven Merk
259619f00f
Merge branch 'master' into whitesource-step 2019-04-04 16:06:51 +02:00
Oliver Nocon
138656b49b
Allow resilient error handling in pipelines (#583)
* add resilience to error handling
* adapt documentation
* make ConfigLoader more resilient
2019-04-04 08:38:54 +02:00
Sven Merk
1fe05b8a56
Merge branch 'master' into whitesource-step 2019-04-03 12:19:34 +02:00
Oliver Nocon
24563db155
update stashing behavior (#628)
* update stashing behavior

close #619

* add test
2019-04-02 13:13:25 +02:00
Sven Merk
c82bcc9c86 Addressed feedback 2019-03-29 13:58:41 +01:00
Sven Merk
eab1dacde6 Fix stashes 2019-03-27 12:58:54 +01:00
Sven Merk
9466beec42 Fix tests 2019-03-26 17:45:29 +01:00
Sven Merk
b2929a9070 Fix path 2 2019-03-26 17:26:09 +01:00
Sven Merk
957bad0d45 Fix path 2019-03-26 17:22:51 +01:00
Sven Merk
8adf183395 Fix quoting 2019-03-26 17:16:44 +01:00
Sven Merk
9184102295 Fix string 2019-03-26 17:05:12 +01:00
Sven Merk
8725f28ed6 Switch image, dep on the fly 2019-03-26 17:00:13 +01:00
Sven Merk
5ae1f40983 Switch image 2019-03-26 15:23:58 +01:00
Sven Merk
56ae339d9c Switch working directory 3 2019-03-26 09:36:59 +01:00
Sven Merk
b36ad6d8d3 Switch working directory 2 2019-03-25 17:02:46 +01:00
Sven Merk
514e3f7c84 Switch working directory 2019-03-25 16:47:51 +01:00
Sven Merk
630150d481 Switch to dep image 2019-03-25 16:15:57 +01:00
Sven Merk
cbc81acaa5 Refactor stash 2019-03-25 14:00:57 +01:00
Sven Merk
6fbf659553 Extend build descriptor stash for glide 2019-03-25 11:00:24 +01:00
Sven Merk
8470e14aed Fix Go image 2019-03-22 13:50:11 +01:00
Sven Merk
991dd5ec51
Merge branch 'master' into whitesource-step 2019-03-22 11:58:01 +01:00
Sven Merk
8da169d2a8 Enable golang 2019-03-22 11:55:50 +01:00
Sven Merk
be814c62aa Included comments refactored docu generation 2019-03-21 13:25:22 +01:00
Marcus Holl
3f8498e4dd Merge remote-tracking branch 'github/master' into HEAD 2019-03-21 10:43:27 +01:00
Christopher Fenner
80d288ae57
handlePipelineStepError: use ConfigurationHelper (#556)
* use ConfigurationHelper in handlePipelineStepError

* externalise help url
2019-03-20 11:21:06 +01:00
Holger Partsch
94957e2b54 Make K8S integration more configurable (#552)
* Define pod using k8s yaml manifest

The Kubernetes plugin allows to define pods directly via the Kubernetes
API specification:
https://github.com/jenkinsci/kubernetes-plugin#using-yaml-to-define-pod-templates

This has the advantage of unlocking Kubernetes features which are not
exposed via the Kubernetes plugin, including all Kubernetes security
featues.

Using the Kubernetes API directly is also better from development
point of view because it is stable and better desgined then the API the
plugin offers.

* Make the Kubernetes ns configurable

If one Jenkins Master is used by multiple Teams, it is desirable to
schedule K8S workloads in seperatae workspaces.

* Add securityContext to define uid and fsGroup

In the context of the Jenkins k8s plugin it is uids and fsGroups play an
important role, because the containers share a common file system.

Therefore it is benefical to configure this data centraly.

* fix indention

* Undo format changes

* Extend and fix unit tests

* Fix port mapping

* Don't set uid globally

This does not work with jaas due to permissions problems.

* Fix sidecar test

* Make security context configurable at stage level

* Extract json serialization

* Cleanup unit tests
2019-03-20 10:07:37 +01:00
Marcus Holl
24cd9400d7 create transport request SOLMAN with docker 2019-03-19 10:07:18 +01:00
Marcus Holl
94315bf006 use docker image for cts upload file 2019-03-19 10:07:18 +01:00
Sven Merk
bb31060dad
Merge branch 'master' into whitesource-step 2019-03-15 13:16:29 +01:00
Marcus Holl
201b075cb5 Merge remote-tracking branch 'github/master' into HEAD 2019-03-13 14:36:34 +01:00
Sven Merk
cfc3a1528a Implement comments 2019-03-06 14:03:00 +01:00
Sven Merk
6a907cff23 Add creation capabilities for whitesource products 2019-03-06 13:12:23 +01:00
Sven Merk
93b3afe67d Add default for whitesource backend URL 2019-03-06 12:16:51 +01:00
Sven Merk
f7f33f38ac Address comments 2019-03-06 11:04:49 +01:00
Sven Merk
53491ce956 Cleanup and alignment with internal step 2019-03-05 13:59:40 +01:00
Marcus Holl
42d57479d9 Verbose flag for transport request release 2019-03-05 12:35:28 +01:00
Marcus Holl
ad3e0f86d1 Verbose flag for transportRequestCreate 2019-03-05 10:29:23 +01:00
Sven Merk
863831c9b3 Move to python image containing curl 2019-03-04 15:30:50 +01:00
Sven Merk
2c00d8cdd0 Switching to official docker images + fixing tests 2019-03-04 11:47:04 +01:00
Sven Merk
617256cc09 Switching to official docker images 2019-03-04 11:46:44 +01:00
Sven Merk
29a54db7c8 Addressing PR feedback 2019-03-04 11:46:20 +01:00
Sven Merk
14700ba210 Initial checkin of new whitesource step 2019-02-28 13:01:30 +01:00
yemengsap
38c5a0d779 Add npmExecute step (#491) 2019-02-21 19:14:48 +01:00
Marcus Holl
827d8aa32d imagePull --> pullImage 2019-02-19 11:35:03 +01:00
Marcus Holl
15102feec2 provide defaults for unixLineEnding, codePage 2019-02-19 11:22:33 +01:00
Marcus Holl
546db7f3f3 Provide verbose flag. 2019-02-15 13:58:11 +01:00
Marcus Holl
a375cc75a5 Provide flag failUploadOnWarning
in order to be able to survive uploads which are basically successful, but
with warning(s).
2019-02-15 13:58:11 +01:00
Florian Wilhelm
d2b6be4e25
Configure default mta build image to ppiper/mta-archive-builder (#515) 2019-02-15 13:48:34 +01:00
Oliver Nocon
793df723cf add step slackSendNotification (#338)
* add step slackSendNotification

This step allows to send Slack notifications in case of pipeline failures.

* add SWA reporting

* remove allowBuildFailure

* add GENERAL_CONFIG_KEYS

* update STEP_NAME

* add missing import

* fix MD findings

* adjust rule name to be aligned with #455
2019-02-13 16:45:35 +01:00
Marcus Holl
dc1dfd622c docker params as map for fileUpload 2019-02-12 15:22:22 +01:00
Marcus Holl
9305a52d0f Merge remote-tracking branch 'github/master' into HEAD 2019-02-08 12:38:59 +01:00
Christopher Fenner
d657f0dc28
testsPublishResults: add option to fail the build on test errors (#472)
* add option to fail the build on test errors

* fix typo

* add test cases

* adjust docs

* set build result

* add hasTestFailure utils method

* use utils method

* use dedicated type

* adapt tests

* handle missing test actions

* Update testsPublishResults.md

* Update JenkinsUtils.groovy

* Update JenkinsUtils.groovy

* Update JenkinsUtils.groovy

* remove comments

* adapt test case

* Update TestsPublishResultsTest.groovy
2019-02-08 12:30:59 +01:00
Marcus Holl
1b202f879a Provide flag for skipping docker image pulls (#407)
* Provide flag for skipping docker image pulls

Usefull for testing while developing images. Without pulling images it is possible to
use images available in the local registry only.
2019-02-06 08:48:33 +01:00
Oliver Nocon
74366631b5
Project "Piper" Template: framework and structure (#476)
* Project "Piper" Template: framework and structure

This is the first in a series of Pull-Requests to provide a fully functional Pipeline template into the library.

This PR contains:
* general Pipeline structure incl. tests
* Pipeline initialization incl. tests
* Hollow pipeline stages incl. tests
* first set of default values
* add gitUrls to commonPipelineEnvironment
* set correct git information on commonPipelineEnvironment
2019-02-05 15:37:59 +01:00
Oliver Nocon
dde4e0abef
Fix regression introduced with #474 (#483)
Fix stashing behavior to include all files in workspace.
This was for example an issue for PR-voting in Docker pipeline since `Dockerfile` has been excluded from stashing
2019-02-05 09:07:47 +01:00
Marcus Holl
5302d1d7b1 Merge remote-tracking branch 'github/master' into work 2019-01-31 09:55:21 +01:00
Oliver Nocon
3b2e42c74f
Add step containerExecuteStructureTest (#441)
* add step containerExecuteStructureTest
* include PR-review feedback
* documentation
2019-01-31 09:39:13 +01:00
Christopher Fenner
bca5b8ccf1
Add step uiVeri5ExecuteTests (#469)
* add defaults for uiVeri5 step

* add step and tests

* correct parameter names

* add empty docs

* add docs annotations

* remove not needed parameter

* add docs annotations
2019-01-31 09:16:34 +01:00
Marcus Holl
661745fd81 Merge remote-tracking branch 'github/master' into HEAD 2019-01-30 15:01:09 +01:00
Daniel Kurzynski
6e26d78047
Improve neo deploy (#440)
The following features were added:
Lock resources for deployment
New parameters: environment, vmArguments
Assert password does not start with @
Link to cloud cockpit
Only execute rolling update if app is running
Show logs if deployment failed
Restart app after normal deployment
Use neo namespace for parameters
Align parameter names with neo sdk: size, application, source
Remove vmSize check as done by the tool itself
2019-01-28 11:32:24 +01:00
Marcus Holl
50fea23d2f Merge remote-tracking branch 'github/master' into HEAD 2019-01-24 08:04:55 +01:00
Florian Wilhelm
bb3763bf32 Hint about api in defaut environment 2019-01-23 11:35:18 +01:00
Marcus Holl
cca46d509b Upload binaries to transport requests via RFC 2019-01-18 10:26:03 +01:00
Oliver Nocon
e11478ca00
cloudFoundryDeploy - add deployment reporting to Influx (#421)
Add reporting of operations-related data to Influx (if configured), like:
* Version of deployed artifact
* Deployment time
* Target infrastructure for deployment
2019-01-18 08:25:22 +01:00
Oliver Nocon
e556fba950
add wrapper for stages contained in library (#341)
* add wrapper for stages contained in library

`piperStageWrapper` provides a wrapper for stages which we may include into the library.
It will take care about extension capabilities, locking, node handling, ... which should be a capability of every stage contained in the library.
2018-12-12 11:45:11 +01:00
Oliver Nocon
2881877322
newmanExecute - adapt to changes (#400)
* script now mandatory, thus passing it to dockerExecute
* html reporter needs to be installed separately
2018-11-28 09:25:34 +01:00
Florian Geckeler
32e20a7293
Provide option to Stop and not delete old instance on BlueGreenDeploy (#394)
* Provide option to Stop and not delete old instance on BlueGreenDeploy
* Default is still delete old instance 

Closes #323
2018-11-27 11:47:44 +01:00
Christopher Fenner
ddc40044a2
karmaExecuteTests: extend default proxy excludes and stashes (#389)
* extend default proxy excludes

* Update karmaExecuteTests.md
2018-11-19 10:54:14 +01:00
Oliver Nocon
d65a010158
testsPublishResults: Make jUnit pattern more universal (#386)
* Make jUnit pattern more universal
* update documentation & test
2018-11-16 08:57:09 +01:00
Christopher Fenner
9a1ab37c0b
add new step karmaExecuteTests (#351)
* add new step for karma execution

* add defaults

* Update karmaExecuteTests.groovy

* add key comments

* add test case

* docs

* add step docs

* add step docs

* Update karmaExecuteTests.md

* complete docs

* Update karmaExecuteTests.md

* init `script` the "new way"

* Update karmaExecuteTests.groovy

* Update karmaExecuteTests.groovy
2018-11-08 12:15:15 +01:00
Christopher Fenner
aa5ad1c0d1 dockerExecute: handle stashContent (#332)
* handle stashed content
* add utils
2018-11-05 11:24:25 +01:00
Oliver Nocon
a8a29b753a
add step githubPublishRelease (#345)
This step allows to easily create a new release for your GitHub repository

* include PR review feedback - add additional labels
* consider return status of api call
2018-10-25 16:56:09 +02:00
Marcus Holl
5cdd1129a0 Merge remote-tracking branch 'github/master' into HEAD 2018-10-25 08:38:48 +02:00
Christopher Fenner
48990bac47
dockerExecute: use docker network to connect sidecar containers (#352)
* use docker network to connect containers

* add container names

* use network-alias instead of name

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update dockerExecute.groovy

* Update DockerExecuteTest.groovy

* remove obsolete parameter

* Update default_pipeline_environment.yml

* Update DockerExecuteTest.groovy

* Update dockerExecute.groovy

* Update DockerExecuteTest.groovy

* Update dockerExecute.groovy

* update docs
2018-10-24 10:13:28 +02:00
Marcus Holl
a2393c3f92 merge remote-tracking branch 'github/master' into HEAD 2018-10-23 09:08:59 +02:00
Oliver Nocon
455461d3c1
add step pipelineRestartSteps (#337)
This step allows to restart a set of steps in order to retry in case of e.g. infrastructure failures which first need to be fixed.

* update documentation
2018-10-18 08:51:48 +02:00
Oliver Nocon
0e5ccabdae
add step gaugeExecuteTests (#340)
* seleniumExecuteTests - fixes
* add step gaugeExecuteTests incl. tests
* add documentation
* add more config options
2018-10-17 16:44:20 +02:00
Oliver Nocon
1f8b94528c
add step mailSendNotification (#336)
This step allows to send email notifications in case of pipeline failures.
2018-10-17 12:05:11 +02:00
Oliver Nocon
17e8390511
add step healthExecuteCheck (#339)
This step allows to perform a basic health check on an installed application.
It verifies that your app has a simple health endpoint available and that there is no error when calling it.
2018-10-12 16:06:41 +02:00
Oliver Nocon
7a961ef38e
seleniumExecuteTests - add step to run Selenium tests (#318)
It comes with an extension to executeDocker and executeDockerOnKubernetes to run sidecar containers.

This helps to execute Selenium tests using two Docker images:

1. Execution runtime for tests (e.g. node image)
2. Selenium instance which holds Selenium server + browser

* add documentation & some name cleanup
* include PR feedback
* add step documentation to structure
2018-10-04 17:06:42 +02:00
Marcus Holl
0e6f44a4ed Switch default for changeManagement.type to NONE
before we had SOLMAN.
2018-09-28 14:16:20 +02:00
Marcus Holl
80572f8569 Backend type in default configuration. 2018-09-18 14:48:47 +02:00
Ramachandra Kamath Arbettu
c84114c3df
Enable support for executing on K8S as a step (#231)
* Create executeDockerOnKubernetes.groovy

* Update dockerExecute.groovy

* Create SysEnvTest.groovy

* Update default_pipeline_environment.yml

* Update executeDockerOnKubernetes.groovy

* Create utils object

* update docker image

* Update mavenExecute.groovy

* Use pipeline-lib than piper

* Check container name

* Always change ownership to 1000

* Check for map

* Fix command

* Move chmod to docker execute

* Use generic name for the pod

* runAsPod has been added

* Return false if script has no k8smapping

* fix syntax error

* Null checks

* Returnn dockerImage name

* Check method body

* Return container name

* Cleanup echos

* Use runAsPod

* Rename step

* Use official jenkins JNLP agent image

* Construct containersMap

* Check if kubernetes plugin is active

* Support JaaS

* pass script object

* Move configuration to default section

* Use generic flag to check if running in k8s

* fix jnlp agent name

* Solve travis errors

* Improvements to config and changes to name of the method

* Improvements to config

* Fix type

* Rename stash config

* add import

* Fix map order

* Fix jnlp agent name

* cleanup config usage

* Check if config is enabled

* Use nested k8s mapping

* Support custom docker workspace and move flag to env

* Feature/k8s stage (#1)

* Use nested k8s mapping

* Support custom docker workspace and move flag to env

* Check dockerOptions value

* Support local execution

* Add tests for dockerExecute

* Move config to step and Fix tests

* Use step configuration while running as a pod

* Streamline parameter and config initialization

* Streamline parameter and tests

* Cleanup and align variable name

* Use default JNLP agent if one not defined in config

* Add tests for runInsidePod. Ensure lowercase container names.

* Improve tests and remove unused code block

* Fix permission issues

* Perform stashing and unstashing inside container

* Use custom jnlp agent due to user id restriction

* Fix tests after jnlp agent change

* Address review comments

* Initialize script to default value if null

* Address review comments

* Update exeception handling and documentation

* Improve documentation

* correct indent

* Link documents to the index page

* Merge containerExecute and dockerExecuteOnKuberenetes step and address comments.

* Update dockerExecute.md

* Update dockerExecuteOnKubernetes.md

* Update default_pipeline_environment.yml

* update documentation

* Update documentation. Use annotation for singleton

* Update DockerExecuteOnKubernetesTest.groovy

* Update dockerExecute.groovy

* Update dockerExecuteOnKubernetes.groovy

* Improve documentation and test case names

* neoDeploy: switch to chained ConfigurationHelper (#244)

* switch neoDeploy to chained ConfigurationHelper

* update imports

* Improve tests

* Address review comments

* Improve documentation

* made dockerImage non-mandatory parm, improved test

* add comment regarding userid assumption
2018-08-21 15:45:59 +02:00
Oliver Nocon
17ee927807
batsExecuteTests - add step for executing bats-core (#254)
details are available in the documentation contained in this PR
2018-08-15 11:41:01 +02:00
Oliver Nocon
be1d97cb5a cloudFoundryDeploy - update stshing behavior
adapt stashing behavior according to #230
2018-08-15 09:46:08 +02:00
Christopher Fenner
059268459a
Merge branch 'master' into CCFenner/newman 2018-08-09 10:34:00 +02:00
Oliver Nocon
65b582dc9d
artifactSetVersion - add new artifact types & cleanup (#242)
* artifactSetVersion - add new artifact types & cleanup

added:
* dlang
* golang
* npm
* pip
* scala

* add documentation update
2018-08-08 22:21:26 +02:00
Christopher Fenner
240df88882
add stashing & private test repositories 2018-08-08 11:22:08 +02:00
Oliver Nocon
cd4a9f226e
Add collection of library telemetry data (#239)
* add telemetry collection
* add telemetry reporting for first steps
* fix documentation formatting
2018-08-06 08:57:36 +02:00
Oliver Nocon
745b6d471d
fix issue with resource naming conflict (#234) 2018-07-30 12:06:35 +02:00
Oliver Nocon
d844b23b90
add cloudFoundryDeploy step (#173)
* add cloudFoundryDeploy step
* added cf-cli docker image
* support existing parameters
* support check script with flexible STATUS_CODE
* add mandatory parameters
* fix compatibility handling
* address PR feedback
* fix access to smokeTest script
* make credentialsId mandatory to avoid NPE
2018-07-30 09:28:24 +02:00
rodibrin
9e547cd605
Merge branch 'master' into pr/neoimage 2018-07-26 10:04:20 +02:00
Roland Stengel
b7e355bca8 config neo docker image 2018-07-25 15:23:56 +02:00
Marcus Holl
f16d5c766b Merge remote-tracking branch 'github/master' into HEAD 2018-07-25 12:26:20 +02:00
Marcus Holl
3effe404b0 Merge remote-tracking branch 'github/master' into HEAD 2018-07-19 08:54:57 +02:00