Installing jenkins plugins automatically
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
Im writing the script which downloads jenkins war, skip setup, then install plugins for it.
i downloaded batch-install-jenkins-plugins.sh using some link, and also created the plugins.txt file as mentioned.
when i run the script using docker it is giving me error that you must specify plugins.txt.
Here is my script:
FROM ubuntu:14.04
# Install Java.
RUN
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y software-properties-common &&
add-apt-repository ppa:webupd8team/java -y &&
apt-get update &&
apt-get install -y oracle-java8-installer &&
rm -rf /var/lib/apt/lists/* &&
rm -rf /var/cache/oracle-jdk8-installer
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# get maven 3.2.2 and verify its checksum
RUN wget --no-verbose -O /tmp/apache-maven-3.2.2.tar.gz http://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz;
echo "87e5cc81bc4ab9b83986b3e77e6b3095 /tmp/apache-maven-3.2.2.tar.gz" | md5sum -c
ARG BASE_URL=https://apache.osuosl.org/maven/ven-3/$MAVEN_VERSION/binaries
# install maven
RUN tar xzf /tmp/apache-maven-3.2.2.tar.gz -C /opt/;
ln -s /opt/apache-maven-3.2.2 /opt/maven;
ln -s /opt/maven/bin/mvn /usr/local/bin;
rm -f /tmp/apache-maven-3.2.2.tar.gz
ENV MAVEN_HOME /opt/maven
# Install dependencies
RUN apt-get -y update &&
apt-get -yqq --no-install-recommends install bash git bzip2 curl unzip &&
apt-get update
# copy jenkins war file to the container
#ADD http://mirrors.jenkins.io/war-stable/2.107.1/jenkins.war /opt/jenkins.war
COPY jenkins.war /opt/jenkins.war
ENV JENKINS_HOME /jenkins
# configure the container to run jenkins, mapping container port 8080 to that host port
RUN mkdir /jenkins/
COPY proxy.xml /jenkins/proxy.xml
COPY config_updated.xml opt/config_updated.xml
COPY settings.xml /usr/share/maven/conf/settings.xml
ENTRYPOINT ["java","-jar","/opt/jenkins.war"]
ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
#Install plugins
RUN cd /usr/local/bin && curl -L https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh -o batch-install-jenkins-plugins.sh
RUN chmod +x /usr/local/bin/batch-install-jenkins-plugins.sh
COPY /plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
when i build the image of above script it is giving this error:
Step 21/23 : RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
---> Running in 72d198deef6b
You must provide plugin file
usage: batch-install-jenkins-plugins.sh options
Install or update Jenkins Plugins.
OPTIONS:
-p --plugins file containing plugins list
-x --xplugins file containing excluded plugins list
-d --plugindir directory where to deploy plugins (.jpi)
Examples:
Run:batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins
The command '/bin/sh -c xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt' returned a non-zero code: 123
FOR checking if i comment that line and changed ENTRYPOINT to bash and checked, and found plugins.txt is present in that location only
BASH OUTPUT
I need to take arguments from plugins.txt and install those plugins to jenkins, when i launch it in browser.
i refered to the link
Thank you in advance, sorry if there wrong english.
bash scripts plugins docker jenkins
add a comment |Â
up vote
0
down vote
favorite
Im writing the script which downloads jenkins war, skip setup, then install plugins for it.
i downloaded batch-install-jenkins-plugins.sh using some link, and also created the plugins.txt file as mentioned.
when i run the script using docker it is giving me error that you must specify plugins.txt.
Here is my script:
FROM ubuntu:14.04
# Install Java.
RUN
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y software-properties-common &&
add-apt-repository ppa:webupd8team/java -y &&
apt-get update &&
apt-get install -y oracle-java8-installer &&
rm -rf /var/lib/apt/lists/* &&
rm -rf /var/cache/oracle-jdk8-installer
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# get maven 3.2.2 and verify its checksum
RUN wget --no-verbose -O /tmp/apache-maven-3.2.2.tar.gz http://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz;
echo "87e5cc81bc4ab9b83986b3e77e6b3095 /tmp/apache-maven-3.2.2.tar.gz" | md5sum -c
ARG BASE_URL=https://apache.osuosl.org/maven/ven-3/$MAVEN_VERSION/binaries
# install maven
RUN tar xzf /tmp/apache-maven-3.2.2.tar.gz -C /opt/;
ln -s /opt/apache-maven-3.2.2 /opt/maven;
ln -s /opt/maven/bin/mvn /usr/local/bin;
rm -f /tmp/apache-maven-3.2.2.tar.gz
ENV MAVEN_HOME /opt/maven
# Install dependencies
RUN apt-get -y update &&
apt-get -yqq --no-install-recommends install bash git bzip2 curl unzip &&
apt-get update
# copy jenkins war file to the container
#ADD http://mirrors.jenkins.io/war-stable/2.107.1/jenkins.war /opt/jenkins.war
COPY jenkins.war /opt/jenkins.war
ENV JENKINS_HOME /jenkins
# configure the container to run jenkins, mapping container port 8080 to that host port
RUN mkdir /jenkins/
COPY proxy.xml /jenkins/proxy.xml
COPY config_updated.xml opt/config_updated.xml
COPY settings.xml /usr/share/maven/conf/settings.xml
ENTRYPOINT ["java","-jar","/opt/jenkins.war"]
ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
#Install plugins
RUN cd /usr/local/bin && curl -L https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh -o batch-install-jenkins-plugins.sh
RUN chmod +x /usr/local/bin/batch-install-jenkins-plugins.sh
COPY /plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
when i build the image of above script it is giving this error:
Step 21/23 : RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
---> Running in 72d198deef6b
You must provide plugin file
usage: batch-install-jenkins-plugins.sh options
Install or update Jenkins Plugins.
OPTIONS:
-p --plugins file containing plugins list
-x --xplugins file containing excluded plugins list
-d --plugindir directory where to deploy plugins (.jpi)
Examples:
Run:batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins
The command '/bin/sh -c xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt' returned a non-zero code: 123
FOR checking if i comment that line and changed ENTRYPOINT to bash and checked, and found plugins.txt is present in that location only
BASH OUTPUT
I need to take arguments from plugins.txt and install those plugins to jenkins, when i launch it in browser.
i refered to the link
Thank you in advance, sorry if there wrong english.
bash scripts plugins docker jenkins
This site is for Ubuntu specific questions. You might get a better response if you post it on stack overflow... stackoverflow.com/questions/tagged/java
â Joshua Besneatte
May 24 at 15:29
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Im writing the script which downloads jenkins war, skip setup, then install plugins for it.
i downloaded batch-install-jenkins-plugins.sh using some link, and also created the plugins.txt file as mentioned.
when i run the script using docker it is giving me error that you must specify plugins.txt.
Here is my script:
FROM ubuntu:14.04
# Install Java.
RUN
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y software-properties-common &&
add-apt-repository ppa:webupd8team/java -y &&
apt-get update &&
apt-get install -y oracle-java8-installer &&
rm -rf /var/lib/apt/lists/* &&
rm -rf /var/cache/oracle-jdk8-installer
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# get maven 3.2.2 and verify its checksum
RUN wget --no-verbose -O /tmp/apache-maven-3.2.2.tar.gz http://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz;
echo "87e5cc81bc4ab9b83986b3e77e6b3095 /tmp/apache-maven-3.2.2.tar.gz" | md5sum -c
ARG BASE_URL=https://apache.osuosl.org/maven/ven-3/$MAVEN_VERSION/binaries
# install maven
RUN tar xzf /tmp/apache-maven-3.2.2.tar.gz -C /opt/;
ln -s /opt/apache-maven-3.2.2 /opt/maven;
ln -s /opt/maven/bin/mvn /usr/local/bin;
rm -f /tmp/apache-maven-3.2.2.tar.gz
ENV MAVEN_HOME /opt/maven
# Install dependencies
RUN apt-get -y update &&
apt-get -yqq --no-install-recommends install bash git bzip2 curl unzip &&
apt-get update
# copy jenkins war file to the container
#ADD http://mirrors.jenkins.io/war-stable/2.107.1/jenkins.war /opt/jenkins.war
COPY jenkins.war /opt/jenkins.war
ENV JENKINS_HOME /jenkins
# configure the container to run jenkins, mapping container port 8080 to that host port
RUN mkdir /jenkins/
COPY proxy.xml /jenkins/proxy.xml
COPY config_updated.xml opt/config_updated.xml
COPY settings.xml /usr/share/maven/conf/settings.xml
ENTRYPOINT ["java","-jar","/opt/jenkins.war"]
ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
#Install plugins
RUN cd /usr/local/bin && curl -L https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh -o batch-install-jenkins-plugins.sh
RUN chmod +x /usr/local/bin/batch-install-jenkins-plugins.sh
COPY /plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
when i build the image of above script it is giving this error:
Step 21/23 : RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
---> Running in 72d198deef6b
You must provide plugin file
usage: batch-install-jenkins-plugins.sh options
Install or update Jenkins Plugins.
OPTIONS:
-p --plugins file containing plugins list
-x --xplugins file containing excluded plugins list
-d --plugindir directory where to deploy plugins (.jpi)
Examples:
Run:batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins
The command '/bin/sh -c xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt' returned a non-zero code: 123
FOR checking if i comment that line and changed ENTRYPOINT to bash and checked, and found plugins.txt is present in that location only
BASH OUTPUT
I need to take arguments from plugins.txt and install those plugins to jenkins, when i launch it in browser.
i refered to the link
Thank you in advance, sorry if there wrong english.
bash scripts plugins docker jenkins
Im writing the script which downloads jenkins war, skip setup, then install plugins for it.
i downloaded batch-install-jenkins-plugins.sh using some link, and also created the plugins.txt file as mentioned.
when i run the script using docker it is giving me error that you must specify plugins.txt.
Here is my script:
FROM ubuntu:14.04
# Install Java.
RUN
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections &&
apt-get update &&
apt-get upgrade -y &&
apt-get install -y software-properties-common &&
add-apt-repository ppa:webupd8team/java -y &&
apt-get update &&
apt-get install -y oracle-java8-installer &&
rm -rf /var/lib/apt/lists/* &&
rm -rf /var/cache/oracle-jdk8-installer
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# get maven 3.2.2 and verify its checksum
RUN wget --no-verbose -O /tmp/apache-maven-3.2.2.tar.gz http://archive.apache.org/dist/maven/maven-3/3.2.2/binaries/apache-maven-3.2.2-bin.tar.gz;
echo "87e5cc81bc4ab9b83986b3e77e6b3095 /tmp/apache-maven-3.2.2.tar.gz" | md5sum -c
ARG BASE_URL=https://apache.osuosl.org/maven/ven-3/$MAVEN_VERSION/binaries
# install maven
RUN tar xzf /tmp/apache-maven-3.2.2.tar.gz -C /opt/;
ln -s /opt/apache-maven-3.2.2 /opt/maven;
ln -s /opt/maven/bin/mvn /usr/local/bin;
rm -f /tmp/apache-maven-3.2.2.tar.gz
ENV MAVEN_HOME /opt/maven
# Install dependencies
RUN apt-get -y update &&
apt-get -yqq --no-install-recommends install bash git bzip2 curl unzip &&
apt-get update
# copy jenkins war file to the container
#ADD http://mirrors.jenkins.io/war-stable/2.107.1/jenkins.war /opt/jenkins.war
COPY jenkins.war /opt/jenkins.war
ENV JENKINS_HOME /jenkins
# configure the container to run jenkins, mapping container port 8080 to that host port
RUN mkdir /jenkins/
COPY proxy.xml /jenkins/proxy.xml
COPY config_updated.xml opt/config_updated.xml
COPY settings.xml /usr/share/maven/conf/settings.xml
ENTRYPOINT ["java","-jar","/opt/jenkins.war"]
ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false"
#Install plugins
RUN cd /usr/local/bin && curl -L https://raw.githubusercontent.com/hgomez/devops-incubator/master/forge-tricks/batch-install-jenkins-plugins.sh -o batch-install-jenkins-plugins.sh
RUN chmod +x /usr/local/bin/batch-install-jenkins-plugins.sh
COPY /plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
when i build the image of above script it is giving this error:
Step 21/23 : RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
---> Running in 72d198deef6b
You must provide plugin file
usage: batch-install-jenkins-plugins.sh options
Install or update Jenkins Plugins.
OPTIONS:
-p --plugins file containing plugins list
-x --xplugins file containing excluded plugins list
-d --plugindir directory where to deploy plugins (.jpi)
Examples:
Run:batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins
The command '/bin/sh -c xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt' returned a non-zero code: 123
FOR checking if i comment that line and changed ENTRYPOINT to bash and checked, and found plugins.txt is present in that location only
BASH OUTPUT
I need to take arguments from plugins.txt and install those plugins to jenkins, when i launch it in browser.
i refered to the link
Thank you in advance, sorry if there wrong english.
bash scripts plugins docker jenkins
edited May 24 at 10:42
asked May 24 at 10:19
![](https://lh3.googleusercontent.com/-JlAxPZoN4GA/AAAAAAAAAAI/AAAAAAAAD4Q/qxZNm6nfF3s/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-JlAxPZoN4GA/AAAAAAAAAAI/AAAAAAAAD4Q/qxZNm6nfF3s/photo.jpg?sz=32)
Hithesh Veer
11
11
This site is for Ubuntu specific questions. You might get a better response if you post it on stack overflow... stackoverflow.com/questions/tagged/java
â Joshua Besneatte
May 24 at 15:29
add a comment |Â
This site is for Ubuntu specific questions. You might get a better response if you post it on stack overflow... stackoverflow.com/questions/tagged/java
â Joshua Besneatte
May 24 at 15:29
This site is for Ubuntu specific questions. You might get a better response if you post it on stack overflow... stackoverflow.com/questions/tagged/java
â Joshua Besneatte
May 24 at 15:29
This site is for Ubuntu specific questions. You might get a better response if you post it on stack overflow... stackoverflow.com/questions/tagged/java
â Joshua Besneatte
May 24 at 15:29
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
xargs
works by creating a new command line an running it. The way it creates the command line is by starting the new command line it is creating with the arguments given as the xargs
command line and then appending the biggest chunk of stdin that it can (remember that if stdin is bigger than the maximum command line length will make it impossible to simply use all of stdin, it must be chopped up to fit inside of valid maximum command line length.)
The script, batch-install-jenkins-plugins.sh
, (I got mine from here, you should have provided the link to where you got yours from because there could be many variants of that script) does nothing to provide the -p
option so it dies with missing -p pluginfile.txt
.
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
Are you sure you should even be using xargs
here at all? I think this is what you are really trying to do:
RUN /usr/local/bin/batch-install-jenkins-plugins.sh -p /usr/share/jenkins/ref/plugins.txt
But then you will probably crash because of missing -z plugindir
option which you should also add to your Dockerfile
.
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
add a comment |Â
up vote
0
down vote
Go to below link, which I found similar what you have asked
You can refer this
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
xargs
works by creating a new command line an running it. The way it creates the command line is by starting the new command line it is creating with the arguments given as the xargs
command line and then appending the biggest chunk of stdin that it can (remember that if stdin is bigger than the maximum command line length will make it impossible to simply use all of stdin, it must be chopped up to fit inside of valid maximum command line length.)
The script, batch-install-jenkins-plugins.sh
, (I got mine from here, you should have provided the link to where you got yours from because there could be many variants of that script) does nothing to provide the -p
option so it dies with missing -p pluginfile.txt
.
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
Are you sure you should even be using xargs
here at all? I think this is what you are really trying to do:
RUN /usr/local/bin/batch-install-jenkins-plugins.sh -p /usr/share/jenkins/ref/plugins.txt
But then you will probably crash because of missing -z plugindir
option which you should also add to your Dockerfile
.
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
add a comment |Â
up vote
0
down vote
xargs
works by creating a new command line an running it. The way it creates the command line is by starting the new command line it is creating with the arguments given as the xargs
command line and then appending the biggest chunk of stdin that it can (remember that if stdin is bigger than the maximum command line length will make it impossible to simply use all of stdin, it must be chopped up to fit inside of valid maximum command line length.)
The script, batch-install-jenkins-plugins.sh
, (I got mine from here, you should have provided the link to where you got yours from because there could be many variants of that script) does nothing to provide the -p
option so it dies with missing -p pluginfile.txt
.
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
Are you sure you should even be using xargs
here at all? I think this is what you are really trying to do:
RUN /usr/local/bin/batch-install-jenkins-plugins.sh -p /usr/share/jenkins/ref/plugins.txt
But then you will probably crash because of missing -z plugindir
option which you should also add to your Dockerfile
.
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
add a comment |Â
up vote
0
down vote
up vote
0
down vote
xargs
works by creating a new command line an running it. The way it creates the command line is by starting the new command line it is creating with the arguments given as the xargs
command line and then appending the biggest chunk of stdin that it can (remember that if stdin is bigger than the maximum command line length will make it impossible to simply use all of stdin, it must be chopped up to fit inside of valid maximum command line length.)
The script, batch-install-jenkins-plugins.sh
, (I got mine from here, you should have provided the link to where you got yours from because there could be many variants of that script) does nothing to provide the -p
option so it dies with missing -p pluginfile.txt
.
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
Are you sure you should even be using xargs
here at all? I think this is what you are really trying to do:
RUN /usr/local/bin/batch-install-jenkins-plugins.sh -p /usr/share/jenkins/ref/plugins.txt
But then you will probably crash because of missing -z plugindir
option which you should also add to your Dockerfile
.
xargs
works by creating a new command line an running it. The way it creates the command line is by starting the new command line it is creating with the arguments given as the xargs
command line and then appending the biggest chunk of stdin that it can (remember that if stdin is bigger than the maximum command line length will make it impossible to simply use all of stdin, it must be chopped up to fit inside of valid maximum command line length.)
The script, batch-install-jenkins-plugins.sh
, (I got mine from here, you should have provided the link to where you got yours from because there could be many variants of that script) does nothing to provide the -p
option so it dies with missing -p pluginfile.txt
.
RUN xargs /usr/local/bin/batch-install-jenkins-plugins.sh < /usr/share/jenkins/ref/plugins.txt
Are you sure you should even be using xargs
here at all? I think this is what you are really trying to do:
RUN /usr/local/bin/batch-install-jenkins-plugins.sh -p /usr/share/jenkins/ref/plugins.txt
But then you will probably crash because of missing -z plugindir
option which you should also add to your Dockerfile
.
answered May 24 at 10:44
![](https://lh5.googleusercontent.com/-CUr7ygKQqUw/AAAAAAAAAAI/AAAAAAAAAD8/u8jPNuITK98/photo.jpg?sz=32)
![](https://lh5.googleusercontent.com/-CUr7ygKQqUw/AAAAAAAAAAI/AAAAAAAAAD8/u8jPNuITK98/photo.jpg?sz=32)
Metta Crawler
1169
1169
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
add a comment |Â
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
and about batch-install-jenkins-plugin.sh, i got it from the same link u have used
â Hithesh Veer
May 24 at 11:09
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
i referd to the eg which was in the error i.e batch-install-jenkins-plugins.sh --plugins okplugins --excludedplugins nokplugins --plugindir /var/lib/myjenkins/plugins im not getting of what path should i mention in --jenkindir , and what shold be the content of it
â Hithesh Veer
May 24 at 11:18
add a comment |Â
up vote
0
down vote
Go to below link, which I found similar what you have asked
You can refer this
add a comment |Â
up vote
0
down vote
Go to below link, which I found similar what you have asked
You can refer this
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Go to below link, which I found similar what you have asked
You can refer this
Go to below link, which I found similar what you have asked
You can refer this
edited May 25 at 9:10
answered May 25 at 8:48
![](https://lh5.googleusercontent.com/-Lc3rmXgHOGc/AAAAAAAAAAI/AAAAAAAAAKc/-0JuDgpLAk4/photo.jpg?sz=32)
![](https://lh5.googleusercontent.com/-Lc3rmXgHOGc/AAAAAAAAAAI/AAAAAAAAAKc/-0JuDgpLAk4/photo.jpg?sz=32)
Akshay chittal
12
12
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039766%2finstalling-jenkins-plugins-automatically%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
This site is for Ubuntu specific questions. You might get a better response if you post it on stack overflow... stackoverflow.com/questions/tagged/java
â Joshua Besneatte
May 24 at 15:29