[VOL-5100] - periodic-voltha-test-bbsim
jjb/pipeline/voltha/master/bbsim-tests.groovy
jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
vars/installKind.groovy
vars/installKind.sh
--------------------------------------------------
o Remove groovy script and accompaning logic installing the kind command,
something is just not right in the land of OZ.
o Updated voltha-system-tests makefiles, added a target to install
the kind command (centrally, consistent version!) similar to kail.
Change-Id: I342a7e7bcf2d0cfe282b80c418feee0ee891302a
diff --git a/jjb/pipeline/voltha/master/bbsim-tests.groovy b/jjb/pipeline/voltha/master/bbsim-tests.groovy
index 8ff8e6b..d38d004 100644
--- a/jjb/pipeline/voltha/master/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/bbsim-tests.groovy
@@ -28,9 +28,13 @@
def clusterName = 'kind-ci'
// -----------------------------------------------------------------------
+// Intent:
// -----------------------------------------------------------------------
String getBranchName() {
String name = 'master'
+
+ // [TODO] Sanity check the target branch
+ // if (name != jenkins.branch) { fatal }
return(name)
}
@@ -49,8 +53,8 @@
'bbsim-tests.groovy'
].join('/')
- String iam = [src, func].join('::')
- return iam
+ String name = [src, func].join('::')
+ return(name)
}
// -----------------------------------------------------------------------
@@ -65,46 +69,6 @@
}
// -----------------------------------------------------------------------
-// Intent: Phase helper method
-// -----------------------------------------------------------------------
-// NOTE: installKind temporarily disabled:
-// o error makes little sense, install.Kind.{groovy,sh} exist in vars/
-// o jenkins shared library -- checked out on server disk is stale
-// 2 changesets behind current ?!?!
-// o Disable call for now to revive the pipeline.
-// 10:26:05 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
-// 10:26:05 WorkflowScript: 73: unexpected token: installKind @ line 73, column 2.
-// 10:26:05 installKind(name)
-// 10:26:05 ^
-// -----------------------------------------------------------------------
-Boolean install_kind(String name)
-{
- String iam = getIam('installKind')
- Boolean ans = False
-
- println("** ${iam}: ENTER")
- try
- {
- println("** ${iam} Running installKind(name): ENTER")
- installKind(name)
- println("** ${iam} Running installKind(name): LEAVE")
- ans = True // iff
- }
- catch (Exception err)
- {
- ans = False
- println("** ${iam}: EXCEPTION ${err}")
- throw err
- }
- finally
- {
- println("** ${iam}: ENTER")
- }
-
- return(ans)
-}
-
-// -----------------------------------------------------------------------
// Intent:
// -----------------------------------------------------------------------
def execute_test(testTarget, workflow, testLogging, teardown, testSpecificHelmFlags = "")
@@ -124,6 +88,8 @@
}
}
+ // -----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
stage('Cleanup')
{
if (teardown) {
@@ -141,21 +107,8 @@
}
}
- stage ('Install Kail')
- {
- // VOL-4926 - Is voltha-system-tests available ?
- String cmd = [
- 'make',
- '-C', "$WORKSPACE/voltha-system-tests",
- "KAIL_PATH=\"$WORKSPACE/bin\"",
- 'kail',
- ].join(' ')
- println(" ** Running: ${cmd}:\n")
- sh("${cmd}")
- // if (! my_install_kail())
- // throw new Exception('installKail() failed')
- }
-
+ // -----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
stage('Deploy common infrastructure')
{
sh '''
@@ -420,20 +373,34 @@
}
// -----------------------------------------------------------------------
- // Intent: Install early so stage('Create K8s Cluster') will not
- // fail on bogus "script.sh: line 1: kind: command not found".
+ // -----------------------------------------------------------------------
+ stage ('Install Kail')
+ {
+ String cmd = [
+ 'make',
+ '-C', "$WORKSPACE/voltha-system-tests",
+ "KAIL_PATH=\"$WORKSPACE/bin\"",
+ 'kail',
+ ].join(' ')
+
+ println(" ** Running: ${cmd}:\n")
+ sh("${cmd}")
+ }
+
+ // -----------------------------------------------------------------------
// -----------------------------------------------------------------------
stage ('Install Kind')
{
- steps
- {
- script
- {
- String branch_name = getBranchName()
- install_kind(branch_name)
- } // script
- } // steps
- } // stage
+ String cmd = [
+ 'make',
+ '-C', "$WORKSPACE/voltha-system-tests",
+ "KIND_PATH=\"$WORKSPACE/bin\"",
+ 'install-command-kind',
+ ].join(' ')
+
+ println(" ** Running: ${cmd}:\n")
+ sh("${cmd}")
+ }
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------