You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.8 KiB
58 lines
1.8 KiB
#!groovy
|
|
|
|
library identifier: '3scale-toolbox-jenkins@master',
|
|
retriever: modernSCM([$class: 'GitSCMSource',
|
|
remote: 'https://github.com/nmasse-itix/3scale-toolbox-jenkins.git'])
|
|
|
|
def toolboxConfig = [
|
|
"secretName": params.SECRET_NAME
|
|
]
|
|
def baseSystemName = toolbox.generateRandomBaseSystemName()
|
|
def targetSystemName = null
|
|
|
|
node() {
|
|
stage('Checkout Source') {
|
|
//git url: "https://github.com/nmasse-itix/API-Lifecycle-Mockup.git"
|
|
checkout scm
|
|
}
|
|
|
|
stage("Get toolbox version") {
|
|
openshift.withCluster() {
|
|
openshift.withProject(params.NAMESPACE) {
|
|
echo "toolbox version = " + toolbox.getToolboxVersion(openshift: openshift)
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Import OpenAPI") {
|
|
openshift.withCluster() {
|
|
openshift.withProject(params.NAMESPACE) {
|
|
targetSystemName = toolbox.importOpenAPI(openshift: openshift,
|
|
destination: params.TARGET_INSTANCE,
|
|
toolboxConfig: toolboxConfig,
|
|
oasFile: "testcase-01/swagger.json",
|
|
baseSystemName: baseSystemName)
|
|
echo "Service with system_name ${targetSystemName} created !"
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Create an Application Plan") {
|
|
openshift.withCluster() {
|
|
openshift.withProject(params.NAMESPACE) {
|
|
applyApplicationPlan(openshift: openshift,
|
|
destination: params.TARGET_INSTANCE,
|
|
serviceSystemName: targetSystemName,
|
|
planSystemName: "test_plan",
|
|
planDisplayName: "Test Plan",
|
|
toolboxConfig: toolboxConfig)
|
|
}
|
|
}
|
|
}
|
|
|
|
// Create an application
|
|
// Integration tests
|
|
// Promote to production
|
|
|
|
|
|
}
|
|
|