Add note to Jenkins setup about Git plugin 52/4752/1
authorTodd Malsbary <todd.malsbary@intel.com>
Wed, 9 Mar 2022 23:50:49 +0000 (15:50 -0800)
committerTodd Malsbary <todd.malsbary@intel.com>
Wed, 9 Mar 2022 23:50:56 +0000 (15:50 -0800)
Use destroy.rb in job scripts instead of explicit machine names.

Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Change-Id: I857ace94070608202cae3ad1da98461b43952605

ci/ci.sh
ci/jjb/shell/bluval.sh
ci/jjb/shell/vagrant-verify.sh

index fcc9d5d..03e631c 100755 (executable)
--- a/ci/ci.sh
+++ b/ci/ci.sh
@@ -46,6 +46,15 @@ function install_jenkins {
     mkdir -p ${HOME}/.config/jenkins_jobs
     cp ${SCRIPT_DIR}/jenkins_jobs.ini ${HOME}/.config/jenkins_jobs/jenkins_jobs.ini
     git clone --recursive https://gerrit.akraino.org/r/ci-management "${CI_MANAGEMENT_DIR}"
+
+    # TODO Figure out how to automate this, it doesn't appear to be exposed with jenkins-cli.jar
+    cat <<EOF
+Git plugin 4.4 removes the second fetch operation in most cases. This
+prevents the CI jobs from checking out the correct version.
+
+To enable the second fetch, check the following in the Jenkins web UI:
+  Manage Jenkins -> Configure System -> [X] Preserve second fetch during checkout
+EOF
 }
 
 function install_credentials {
index bfb6ff6..6dc4245 100644 (file)
@@ -10,21 +10,14 @@ git clone "https://gerrit.akraino.org/r/icn" ${WORKSPACE}/icn
 echo "[ICN] Bringing up test cluster"
 function clean_vm {
     pushd ${WORKSPACE}/icn
-    # TODO Vagrant has a known issue
-    # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371)
-    # destroying the VMs, so destroy them manually here
-    vagrant destroy -f jump
-    virsh -c qemu:///system destroy vm-machine-1
-    virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1
-    virsh -c qemu:///system destroy vm-machine-2
-    virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2
+    ./tools/vagrant/destroy.rb
     popd
 }
 trap clean_vm EXIT
 pushd ${WORKSPACE}/icn
 # TODO Improve VM performance by only using cores on the same node
 #sed -i -e '/^\s\+libvirt.cpus/!b' -e "h;s/\S.*/libvirt.cpuset = '0-21,44-65'/;H;g" Vagrantfile
-vagrant destroy -f
+./tools/vagrant/destroy.rb
 vagrant up --no-parallel
 vagrant ssh jump -c "
 set -exuf
index 76ed59b..ec931c2 100644 (file)
@@ -6,21 +6,14 @@ echo "---> vagrant-verify.sh"
 set -exuf -o pipefail
 
 function clean_vm {{
-    # TODO Vagrant has a known issue
-    # (https://github.com/vagrant-libvirt/vagrant-libvirt/issues/1371)
-    # destroying the VMs, so destroy them manually here
-    vagrant destroy -f jump
-    virsh -c qemu:///system destroy vm-machine-1
-    virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-1
-    virsh -c qemu:///system destroy vm-machine-2
-    virsh -c qemu:///system undefine --nvram --remove-all-storage vm-machine-2
+    ./tools/vagrant/destroy.rb
 }}
 trap clean_vm EXIT
 
 # TODO Improve VM performance by only using cores on the same node
 #sed -i -e '/^\s\+libvirt.cpus/!b' -e "h;s/\S.*/libvirt.cpuset = '0-21,44-65'/;H;g" Vagrantfile
 
-vagrant destroy -f
+./tools/vagrant/destroy.rb
 vagrant up --no-parallel
 vagrant ssh jump -c "
 set -exuf