This repository has been archived by the owner on Jan 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test-webservices.groovy
102 lines (96 loc) · 3.64 KB
/
test-webservices.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*****************************************************************************
* *
* Copyright FUJITSU LIMITED 2020 *
* *
* Creation Date: 16-07-2020 *
* *
****************************************************************************/
// How to use:
// 1. Create a job of type Pipeline
// 2. As the pipeline script paste this script
// 3. Create the following string parameters (adjust defaults if you wish):
// --
// Name: DOCKER_REGISTRY
// Description: Registry host and port for the final Docker image. Example: DOCKER_REGISTRY/DOCKER_ORGANIZATION/oscm-core:TAG_DOCKER
// --
// Name: DOCKER_ORGANIZATION
// Default: oscmdocker
// Description: Organization name for the final Docker image. Example: DOCKER_REGISTRY/DOCKER_ORGANIZATION/oscm-core:TAG_DOCKER
// --
// Name: TAG_REPO_JENKINS_SCRIPTS
// Default: master
// Description: http://estscm1.intern.est.fujitsu.com/fujitsu-bss/jenkinsScripts
// --
// Name: TAG_REPO_DEVELOPMENT
// Default: master
// Description: Branch or tag in the git repository development
// --
// Name: TAG_REPO_DOCKERBUILD
// Default: master
// Description: Branch or tag in the git repository oscmaas-dockerbuild
// --
// Name: TAG_REPO_DOCUMENTATION
// Default: master
// Description: Branch or tag in the git repository documentation https://github.com/servicecatalog/documentation
// --
// Name: DOCKER_ORGANIZATION
// Default: oscmdocker
// Description: Project name for the final Docker image. Example: DOCKER_REGISTRY/DOCKER_ORGANIZATION/oscm-core:TAG_DOCKER
// --
// Name: TAG_DOCKER
// Default: ws-tests
// Description: Docker tag name for the built images
// --
// Name: ANT_URL
// Default: https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.tar.gz
// Description: URL to download ant from.
// --
// Name: IVY_URL
// Default: http://www-eu.apache.org/dist//ant/ivy/2.4.0/apache-ivy-2.4.0-bin.tar.gz
// Description: URL to download ivy from.
// --
// Name: OSCM_GIT_REPO
// Default: https://github.com/servicecatalog/oscm.git
// Description: Repository URL to download the oscm from.
// --
// Name: JAVA_HOME_DIR
// Default: /etc/alternatives/java_sdk_1.8.0
// Description: Path to the JDK directory.
//
// Create the following Node parameter:
// --
// Name: NODE_NAME
// Select the default nodes and possible nodes for your environment
// Enable "Disallow multi node selection"
// Node eligibility: All nodes
// Description: Where to set up the OSCM?
//
// Create the following Boolean parameters:
// --
// Name: PURGE_DATABASE
// Default: disabled
// Description: Delete the database and start with a fresh one?
// --
// Name: TOMEE_DEBUG
// Default: disabled
// --
// Name: SAMPLE_DATA
// Default: disabled
// Description: Load sample data?
node("${NODE_NAME}") {
def clean = evaluate readTrusted('shared/cleanup.groovy')
def defVariables = evaluate readTrusted('shared/proxyvariables.groovy')
def pull = evaluate readTrusted('shared/pull.groovy')
def checkoutTests = evaluate readTrusted('shared/checkout-tests.groovy')
def prepareWS = evaluate readTrusted('shared/prepare-ws.groovy')
def start = evaluate readTrusted('shared/start.groovy')
def test = evaluate readTrusted('shared/test-webservices.groovy')
clean.execute()
defVariables.execute()
pull.execute()
checkoutTests.execute()
prepareWS.execute()
start.execute(env.NODE_NAME, false)
test.execute()
clean.execute()
}