Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / jenkins-init-scripts / init.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2016 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
12 ciman_init_scripts=$(readlink -f "$(dirname "$0")"/../../jenkins-init-scripts)
13 jjb_init_scripts=$(readlink -f "$(dirname "$0")")
14
15 "$jjb_init_scripts/package-listing.sh"
16 "$jjb_init_scripts/basic-settings.sh"
17 "$jjb_init_scripts/disable-firewall.sh"
18 "$jjb_init_scripts/create-swap-file.sh"
19
20 # Entry point for additional local minion customization
21 # Note this is called before the 'jenkins' account is created
22 if [ -e "$ciman_init_scripts/local-init.sh" ]; then
23     "$ciman_init_scripts/local-init.sh"
24 fi
25
26 # Create the jenkins user last so that hopefully we DO NOT have to deal with
27 # guard files
28 "$jjb_init_scripts/create-jenkins-user.sh"
29
30 cp "$jjb_init_scripts/lf-env.sh" ~jenkins/
31 chmod 644 ~jenkins/lf-env.sh
32 chown jenkins:jenkins ~jenkins/lf-env.sh