| Nicolas De Loof | b75dc1a | 2015-03-17 11:24:05 +0100 | [diff] [blame^] | 1 | #! /bin/bash | 
|  | 2 |  | 
|  | 3 | # Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed | 
|  | 4 | # in the reference directory, so user can define a derived Docker image with just : | 
|  | 5 | # | 
|  | 6 | # FROM jenkins | 
|  | 7 | # COPY plugins.txt /plugins.txt | 
|  | 8 | # RUN /usr/share/jenkins/plugins.sh /plugins.txt | 
|  | 9 | # | 
|  | 10 |  | 
|  | 11 | REF=/usr/share/jenkins/ref/plugins | 
|  | 12 | mkdir -p $REF | 
|  | 13 |  | 
|  | 14 | while read spec; do | 
|  | 15 | plugin=(${spec//:/ }); | 
|  | 16 | curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi; | 
|  | 17 | done  < $1 |