Nicolas Massé 7 years ago
parent
commit
3437f42fe6
  1. 2
      README.md
  2. 13
      testcase-01/Jenkinsfile

2
README.md

@ -5,7 +5,7 @@
```sh ```sh
oc project api-lifecycle oc project api-lifecycle
3scale remote add $NAME https://$TOKEN@$TENANT.3scale.net/ 3scale remote add $NAME https://$TOKEN@$TENANT.3scale.net/
oc create secret generic 3scale-toolbox --from-file=~/.3scalerc.yaml oc create secret generic 3scale-toolbox --from-file=$HOME/.3scalerc.yaml
``` ```
```sh ```sh

13
testcase-01/Jenkinsfile

@ -1,6 +1,9 @@
#!groovy #!groovy
def toolbox = load '../3scale_toolbox.groovy' library identifier: '3scale-toolbox-jenkins@master',
retriever: modernSCM([$class: 'GitSCMSource',
remote: 'https://github.com/nmasse-itix/3scale-toolbox-jenkins.git'])
def toolboxConfig = [ def toolboxConfig = [
"secretName": params.SECRET_NAME "secretName": params.SECRET_NAME
] ]
@ -8,13 +11,14 @@ def baseSystemName = toolbox.generateRandomBaseSystemName()
node() { node() {
stage('Checkout Source') { stage('Checkout Source') {
//git url: "https://github.com/nmasse-itix/API-Lifecycle-Mockup.git"
checkout scm checkout scm
} }
stage("Get toolbox version") { stage("Get toolbox version") {
openshift.withCluster() { openshift.withCluster() {
openshift.withProject(params.NAMESPACE) { openshift.withProject(params.NAMESPACE) {
echo "toolbox version = " + toolbox.getToolboxVersion() echo "toolbox version = " + toolbox.getToolboxVersion(openshift: openshift)
} }
} }
} }
@ -22,9 +26,10 @@ node() {
stage("Import OpenAPI") { stage("Import OpenAPI") {
openshift.withCluster() { openshift.withCluster() {
openshift.withProject(params.NAMESPACE) { openshift.withProject(params.NAMESPACE) {
toolbox.importOpenAPI(destination: params.TARGET_INSTANCE, toolbox.importOpenAPI(openshift: openshift,
destination: params.TARGET_INSTANCE,
toolboxConfig: toolboxConfig, toolboxConfig: toolboxConfig,
oasFile: "swagger.json", oasFile: "testcase-01/swagger.json",
baseSystemName: baseSystemName) baseSystemName: baseSystemName)
} }
} }

Loading…
Cancel
Save