Gary Wu | 39a2f2f | 2017-11-10 13:38:28 -0800 | [diff] [blame^] | 1 | #!/bin/bash -x |
Gary Wu | 5cccfa9 | 2017-08-02 12:03:10 -0700 | [diff] [blame] | 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 | # |
Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame] | 11 | |
Gary Wu | 3824c75 | 2017-06-22 12:40:23 -0700 | [diff] [blame] | 12 | cd ~jenkins |
Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame] | 13 | git add -A |
Gary Wu | b2076ff | 2017-06-22 13:29:06 -0700 | [diff] [blame] | 14 | git commit -m 'Installed plugins, restarted Jenkins' > /dev/null |
Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame] | 15 | |
| 16 | |
| 17 | mkdir -p ~/.config/jenkins_jobs |
| 18 | cp /vagrant/jenkins_jobs.ini ~/.config/jenkins_jobs |
| 19 | |
Gary Wu | 39a2f2f | 2017-11-10 13:38:28 -0800 | [diff] [blame^] | 20 | pip -v install --user jenkins-job-builder |
| 21 | pip list |
Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame] | 22 | |
Gary Wu | 39a2f2f | 2017-11-10 13:38:28 -0800 | [diff] [blame^] | 23 | jenkins-jobs update -r /vagrant/jjb |
Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame] | 24 | |
| 25 | cat > .gitignore <<EOF |
| 26 | jobs/*/builds |
| 27 | jobs/*/last* |
| 28 | workspace/ |
| 29 | .m2/repository/ |
| 30 | logs/ |
| 31 | EOF |
| 32 | |
| 33 | git add -A |
Gary Wu | b2076ff | 2017-06-22 13:29:06 -0700 | [diff] [blame] | 34 | git commit -m 'Set up initial jobs' > /dev/null |
Gary Wu | 213a835 | 2017-06-16 13:44:28 -0700 | [diff] [blame] | 35 | |