Jenkins refresh 96/12396/2
authorMark Beierl <mark.beierl@canonical.com>
Thu, 14 Jul 2022 13:41:20 +0000 (09:41 -0400)
committerMark Beierl <mark.beierl@canonical.com>
Wed, 20 Jul 2022 16:55:27 +0000 (12:55 -0400)
Change the jenkins node label from 'docker'
to 'stage_2' as part of the Jenkins cleanup

Change-Id: Ic2837c0f6163a511e064eb5a2a254c58c1c0c960
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
Jenkinsfile
devops-stages/stage-build.sh
releasenotes/notes/jenkins-cleanup-d993516add9704b9.yaml [new file with mode: 0644]
tox.ini

index 6eea999..88aaa9f 100644 (file)
@@ -1,3 +1,20 @@
+/* Copyright ETSI OSM and others
+ *
+ * All Rights Reserved.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License"); you may
+ *   not use this file except in compliance with the License. You may obtain
+ *   a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ *   WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ *   License for the specific language governing permissions and limitations
+ *   under the License.
+ */
+
 properties([
     parameters([
         string(defaultValue: env.BRANCH_NAME, description: '', name: 'GERRIT_BRANCH'),
@@ -16,7 +33,7 @@ def devops_checkout() {
     }
 }
 
-node('docker') {
+node('stage_2') {
     checkout scm
     devops_checkout()
 
index b9b72f0..5bc8cd5 100755 (executable)
@@ -17,31 +17,30 @@ set -ex
 rm -rf deb_dist/*
 mkdir -p deb_dist
 
-# Building packages
-tox -e dist_ro_plugin &
-tox -e dist_ng_ro &
-tox -e dist_ro_sdn_arista_cloudvision &
-tox -e dist_ro_sdn_dpb &
-tox -e dist_ro_sdn_dynpac &
-tox -e dist_ro_sdn_floodlight_of &
-tox -e dist_ro_sdn_ietfl2vpn &
-tox -e dist_ro_sdn_juniper_contrail &
-tox -e dist_ro_sdn_odl_of &
-tox -e dist_ro_sdn_onos_of &
-tox -e dist_ro_sdn_onos_vpls &
-tox -e dist_ro_vim_aws &
-tox -e dist_ro_vim_azure &
-tox -e dist_ro_vim_openstack &
-tox -e dist_ro_vim_openvim &
-tox -e dist_ro_vim_vmware &
-
-while true; do
-  wait -n || {
-    code="$?"
-    ([[ $code = "127" ]] && exit 0 || exit "$code")
-    break
-  }
-done;
+PACKAGES="
+dist_ro_plugin
+dist_ng_ro
+dist_ro_sdn_arista_cloudvision
+dist_ro_sdn_dpb
+dist_ro_sdn_dynpac
+dist_ro_sdn_floodlight_of
+dist_ro_sdn_ietfl2vpn
+dist_ro_sdn_juniper_contrail
+dist_ro_sdn_odl_of
+dist_ro_sdn_onos_of
+dist_ro_sdn_onos_vpls
+dist_ro_vim_aws
+dist_ro_vim_azure
+dist_ro_vim_openstack
+dist_ro_vim_openvim
+dist_ro_vim_vmware
+dist_ro_vim_gcp"
+
+TOX_ENV_LIST="$(echo $PACKAGES | sed "s/ /,/g")"
+PROCESSES=$(expr `nproc --a` / 2)
+
+TOX_PARALLEL_NO_SPINNER=1 tox -e $TOX_ENV_LIST --parallel $PROCESSES
+
 # Copying packages
 # RO plugin
 cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/
diff --git a/releasenotes/notes/jenkins-cleanup-d993516add9704b9.yaml b/releasenotes/notes/jenkins-cleanup-d993516add9704b9.yaml
new file mode 100644 (file)
index 0000000..80e8fd3
--- /dev/null
@@ -0,0 +1,22 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+---
+prelude: >
+  Jenkins uses labels for each agent to determine where jobs should run.  This
+  change requests to use a more meaningful label.
+  No code is impacted by this change
+
diff --git a/tox.ini b/tox.ini
index 134e5d3..e7c9c77 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -20,6 +20,7 @@ envlist = black, flake8, safety
 
 [tox:jenkins]
 toxworkdir = /tmp/.tox
+setenv = XDG_CACHE_HOME=/tmp/.cache
 
 [testenv]
 usedevelop = True