Removing repo from default pipeline for nightly tests
Change-Id: I79dba8275c77ca7733ec0b3a0ee76b7b7c1f76c8
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index ab68755..c8a80fd 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -28,7 +28,7 @@
environment {
KUBECONFIG="$HOME/.kube/kind-config-voltha-minimal"
VOLTCONFIG="$HOME/.volt/config-minimal"
- PATH="$HOME/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+ PATH="$PATH:$WORKSPACE/kind-voltha/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
NAME="minimal"
FANCY=0
WITH_SIM_ADAPTERS="no"
@@ -44,34 +44,46 @@
}
stages {
- stage('Repo') {
+ stage('Clone kind-voltha') {
steps {
- step([$class: 'WsCleanup'])
- checkout(changelog: true,
- poll: false,
- scm: [$class: 'RepoScm',
- manifestRepositoryUrl: "${params.manifestUrl}",
- manifestBranch: "${params.branch}",
- currentBranch: true,
- destinationDir: 'voltha',
- forceSync: true,
- resetFirst: true,
- quiet: true,
- jobs: 4,
- showAllChanges: true]
- )
+ checkout([
+ $class: 'GitSCM',
+ userRemoteConfigs: [[
+ url: "https://gerrit.opencord.org/kind-voltha",
+ // refspec: "${kindVolthaChange}"
+ ]],
+ branches: [[ name: "master", ]],
+ extensions: [
+ [$class: 'WipeWorkspace'],
+ [$class: 'RelativeTargetDirectory', relativeTargetDir: "kind-voltha"],
+ [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
+ ],
+ ])
}
}
-
- stage('Download kind-voltha') {
+ stage('Cleanup') {
steps {
sh """
- cd $HOME
- [ -d kind-voltha ] || git clone https://gerrit.opencord.org/kind-voltha
- rm -rf $HOME/kind-voltha/scripts/logger
- cd $HOME/kind-voltha
- git pull
- """
+ cd $WORKSPACE/kind-voltha/
+ WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down || true
+ """
+ }
+ }
+ stage('Clone voltha-system-tests') {
+ steps {
+ checkout([
+ $class: 'GitSCM',
+ userRemoteConfigs: [[
+ url: "https://gerrit.opencord.org/voltha-system-tests",
+ // refspec: "${volthaSystemTestsChange}"
+ ]],
+ branches: [[ name: "${branch}", ]],
+ extensions: [
+ [$class: 'WipeWorkspace'],
+ [$class: 'RelativeTargetDirectory', relativeTargetDir: "voltha-system-tests"],
+ [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false],
+ ],
+ ])
}
}
@@ -81,7 +93,7 @@
export EXTRA_HELM_FLAGS=""
if [ "${branch}" != "master" ]; then
echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
- source "$HOME/kind-voltha/releases/${branch}"
+ source "$WORKSPACE/kind-voltha/releases/${branch}"
else
echo "on master, using default settings for kind-voltha"
fi
@@ -96,7 +108,7 @@
EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${params.extraHelmFlags} "
- cd $HOME/kind-voltha/
+ cd $WORKSPACE/kind-voltha/
WAIT_ON_DOWN=y DEPLOY_K8S=n ./voltha down || ./voltha down
./voltha up
"""
@@ -109,11 +121,11 @@
set +e
mkdir -p $WORKSPACE/RobotLogs
- cd $HOME/kind-voltha/scripts
+ cd $WORKSPACE/kind-voltha/scripts
./log-collector.sh > /dev/null &
./log-combine.sh > /dev/null &
- make -C $WORKSPACE/voltha/voltha-system-tests ${makeTarget} || true
+ make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
'''
}
}
@@ -123,7 +135,7 @@
always {
sh '''
set +e
- cp $HOME/kind-voltha/install-minimal.log $WORKSPACE/
+ cp $WORKSPACE/kind-voltha/install-minimal.log $WORKSPACE/
kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq
kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq
kubectl get nodes -o wide
@@ -136,14 +148,14 @@
extract_errors_go() {
echo
echo "Error summary for $1:"
- grep '"level":"error"' $HOME/kind-voltha/scripts/logger/combined/$1*
+ grep '"level":"error"' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
echo
}
extract_errors_python() {
echo
echo "Error summary for $1:"
- grep 'ERROR' $HOME/kind-voltha/scripts/logger/combined/$1*
+ grep 'ERROR' $WORKSPACE/kind-voltha/scripts/logger/combined/$1*
echo
}
@@ -155,14 +167,14 @@
gzip error-report.log || true
- cd $HOME/kind-voltha/scripts/logger/combined/
+ cd $WORKSPACE/kind-voltha/scripts/logger/combined/
tar czf $WORKSPACE/container-logs.tgz *
cd $WORKSPACE
gzip *-combined.log || true
## shut down voltha but leave kind-voltha cluster
- cd $HOME/kind-voltha/
+ cd $WORKSPACE/kind-voltha/
DEPLOY_K8S=n WAIT_ON_DOWN=y ./voltha down
kubectl delete deployment voltctl || true
'''