e9adeb63bce06f020bffd0e9a3df30f5f9aafba3
[integration.git] / bootstrap / jenkins / vagrant / jjb-init.sh
1 #!/bin/bash
2 #
3 # Copyright 2017 Huawei Technologies Co., Ltd.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11
12 cd ~jenkins
13 git add -A
14 git commit -m 'Installed plugins, restarted Jenkins' > /dev/null
15
16
17 mkdir -p ~/.config/jenkins_jobs
18 cp /vagrant/jenkins_jobs.ini ~/.config/jenkins_jobs
19
20 pip install --user jenkins-job-builder
21
22 jenkins-job-builder update -r /vagrant/jjb
23
24 cat > .gitignore <<EOF
25 jobs/*/builds
26 jobs/*/last*
27 workspace/
28 .m2/repository/
29 logs/
30 EOF
31
32 git add -A
33 git commit -m 'Set up initial jobs' > /dev/null
34