Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
1361f859
Commit
1361f859
authored
Aug 06, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't run plugin install un-necessarily.
parent
d03ef582
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
17 deletions
+30
-17
playbooks/roles/jenkins_master/tasks/main.yml
+30
-17
No files found.
playbooks/roles/jenkins_master/tasks/main.yml
View file @
1361f859
...
...
@@ -23,13 +23,17 @@
# Should be resolved in the next release, but until then we need to do this
# https://issues.jenkins-ci.org/browse/JENKINS-20407
-
name
:
workaround for JENKINS-20407
command
:
"
mkdir
-p
/var/run/jenkins"
file
:
path="/var/run/jenkins"
state=directory
owner="{{ jenkins_user }}"
group="{{ jenkins_group }}"
-
name
:
download Jenkins package
get_url
:
url="{{ jenkins_deb_url }}" dest="/tmp/{{ jenkins_deb }}"
-
name
:
install Jenkins package
command
:
dpkg -i --force-depends "/tmp/{{ jenkins_deb }}"
shell
:
dpkg -i --force-depends "/tmp/{{ jenkins_deb }}"
-
name
:
stop Jenkins
service
:
name=jenkins state=stopped
...
...
@@ -57,8 +61,11 @@
shell
:
usermod -d {{jenkins_home}} {{jenkins_user}}
-
name
:
make plugins directory
sudo_user
:
jenkins
shell
:
mkdir -p {{ jenkins_home }}/plugins
file
:
path="{{ jenkins_home }}/plugins"
state=directory
owner="{{ jenkins_user }}"
group="{{ jenkins_group }}"
# We first download the plugins to a temp directory and include
# the version in the file name. That way, if we increment
...
...
@@ -67,15 +74,18 @@
get_url
:
url=http://updates.jenkins-ci.org/download/plugins/{{ item.name }}/{{ item.version }}/{{ item.name }}.hpi
dest=/tmp/{{ item.name }}_{{ item.version }}
with_items
:
jenkins_plugins
register
:
jenkins_plugin_downloads
-
name
:
install Jenkins plugins
command
:
cp /tmp/{{ item.name }}_{{ item.version }} {{ jenkins_home }}/plugins/{{ item.name }}.hpi
with_items
:
jenkins_plugins
command
:
cp {{ item.dest}} {{ jenkins_home }}/plugins/{{ item.item.name }}.hpi
with_items
:
jenkins_plugin_downloads.results
when
:
item.changed
-
name
:
set Jenkins plugin permissions
file
:
path={{ jenkins_home }}/plugins/{{ item.name }}.hpi
file
:
path={{ jenkins_home }}/plugins/{{ item.
item.
name }}.hpi
owner={{ jenkins_user }} group={{ jenkins_group }} mode=700
with_items
:
jenkins_plugins
with_items
:
jenkins_plugin_downloads.results
when
:
item.changed
notify
:
-
restart Jenkins
...
...
@@ -88,23 +98,26 @@
repo={{ item.repo_url }} dest=/tmp/{{ item.repo_name }} version={{ item.version }}
accept_hostkey=yes
with_items
:
jenkins_custom_plugins
register
:
jenkins_custom_plugins_checkout
-
name
:
compile custom plugins
command
:
mvn -Dmaven.test.skip=true install chdir=/tmp/{{ item.repo_name }}
with_items
:
jenkins_custom_plugins
command
:
mvn -Dmaven.test.skip=true install chdir=/tmp/{{ item.item.repo_name }}
with_items
:
jenkins_custom_plugins_checkout.results
when
:
item.changed
-
name
:
install custom plugins
command
:
mv /tmp/{{ item.repo_name }}/target/{{ item.package }}
{{ jenkins_home }}/plugins/{{ item.package }}
with_items
:
jenkins_custom_plugins
command
:
mv /tmp/{{ item.item.repo_name }}/target/{{ item.item.package }}
{{ jenkins_home }}/plugins/{{ item.item.package }}
with_items
:
jenkins_custom_plugins_checkout.results
when
:
item.changed
notify
:
-
restart Jenkins
-
name
:
set custom plugin permissions
file
:
path={{ jenkins_home }}/plugins/{{ item.package }}
file
:
path={{ jenkins_home }}/plugins/{{ item.
item.
package }}
owner={{ jenkins_user }} group={{ jenkins_group }} mode=700
with_items
:
jenkins_custom_plugins
with_items
:
jenkins_custom_plugins
_checkout.results
when
:
item.changed
# Plugins that are bundled with Jenkins are "pinned".
# Jenkins will overwrite updated plugins with its built-in version
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment