Add lf ci-management jjb jobs
[releng/global-jjb.git] / shell / jjb-verify-job.sh
1 #!/bin/bash
2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> jjb-verify-job.sh"
12
13 jenkins-jobs -l DEBUG test --recursive -o archives/job-configs jjb/
14
15 # Sort job output into sub-directories. On large Jenkins systems that have
16 # many jobs archiving so many files into the same directory makes NGINX return
17 # the directory list slow.
18 pushd archives/job-configs
19 for letter in {a..z}
20 do
21     ls "$letter"* > /dev/null 2>&1
22     if [[ "$?" -eq 0 ]]
23     then
24         mkdir "$letter"
25         find . -type f -maxdepth 1 -name "$letter*" -exec mv {} "$letter" \;
26     fi
27 done
28 popd