1f0a80859a028f75108409ac2a949e2ec2fd70d7
[integration.git] / bootstrap / jenkins / vagrant / jenkins-init-1.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 git config --global user.email "jenkins@localhost"
13 git config --global user.name "jenkins"
14
15 cd ~jenkins
16
17 cp /etc/skel/.profile .
18 cat > .bashrc <<EOF
19 alias ls='ls --color -F'
20 EOF
21
22 git init
23
24 git add -A
25 git commit -m 'Initial installation config' > /dev/null
26
27 mkdir -p ~/.m2
28 cp /vagrant/settings.xml ~/.m2
29 rm -f secrets/initialAdminPassword
30 rm -rf users/admin
31 rsync -avP /vagrant/jenkins/ .
32
33 git add -A
34 git commit -m 'Set up jenkins user' > /dev/null
35