blob: a6cddbb103c93460b84329a47f310e8a2f48879f [file] [log] [blame]
Gary Wu213a8352017-06-16 13:44:28 -07001#!/bin/bash
Gary Wu5cccfa92017-08-02 12:03:10 -07002#
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 Wu213a8352017-06-16 13:44:28 -070011
12cd ~jenkins
13ln -s /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar
14
15# Get the update center ourself
16curl -L http://updates.jenkins-ci.org/update-center.json | sed '1d;$d' | curl -X POST -H 'Accept: application/json' -d @- http://localhost:8080/updateCenter/byId/default/postBack
17
18java -jar jenkins-cli.jar -s http://localhost:8080/ -auth jenkins:jenkins install-plugin git
19java -jar jenkins-cli.jar -s http://localhost:8080/ -auth jenkins:jenkins install-plugin ws-cleanup
20java -jar jenkins-cli.jar -s http://localhost:8080/ -auth jenkins:jenkins install-plugin envinject
21
22git add -A
Gary Wub2076ff2017-06-22 13:29:06 -070023git commit -m 'Install initial plugins' > /dev/null
Gary Wu213a8352017-06-16 13:44:28 -070024