Use ci branch of jjb in job-generator-kernel
[lttng-ci.git] / scripts / kernel / job-generator-kernel.sh
CommitLineData
9c41f7e2
JR
1#!/bin/sh -ex
2#
3# Copyright (C) 2016 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18PYTHON_2_ENV=$WORKSPACE"/.python2_venv"
19PYTHON_3_ENV=$WORKSPACE"/.python3_venv"
20
21virtualenv -p python2 $PYTHON_2_ENV
22virtualenv -p python3 $PYTHON_3_ENV
23
24# Prepare python 3 env
25. $PYTHON_3_ENV/bin/activate
26pip install gitpython
27pip install pyyaml
28
29# Run the kernel seed generator
30python $WORKSPACE/automation/kernel-seed.py --kernel-path $WORKSPACE/kernel --kernel-cutoff 2.6.36 > $WORKSPACE/jobs/inc/kernel-versions.yaml.inc
31
32deactivate
33
34# Prepare JJB python 2 environment
35. $PYTHON_2_ENV/bin/activate
2e83b97d 36pip install git+git://github.com/mjeanson/jenkins-job-builder@ci
9c41f7e2
JR
37
38cp $WORKSPACE/etc/jenkins_jobs.ini-sample $WORKSPACE/etc/jenkins_jobs.ini
39
40# Prepare configuration file
41set +x
42sed -i -e "s/user=jenkins/user=$JJB_JENKINS_USER/g" $WORKSPACE/etc/jenkins_jobs.ini
43sed -i -e "s/password=1234567890abcdef1234567890abcdef/password=$JJB_JENKINS_TOKEN/g" $WORKSPACE/etc/jenkins_jobs.ini
44set -x
45
46jenkins-jobs --conf $WORKSPACE/etc/jenkins_jobs.ini delete --path $WORKSPACE/jobs/lttng-modules.yaml:$WORKSPACE/jobs/kernel.yaml \*rc\*_build
47jenkins-jobs --conf $WORKSPACE/etc/jenkins_jobs.ini update $WORKSPACE/jobs/lttng-modules.yaml:$WORKSPACE/jobs/kernel.yaml
48
49deactivate
50# EOF
This page took 0.023898 seconds and 4 git commands to generate.