[Fuego] [PATCH 4/9] Move configuration and jenkins plugin installation to separate scripts

Bird, Timothy Tim.Bird at sony.com
Tue Jan 30 20:17:04 UTC 2018



> -----Original Message-----
> From: fuego-bounces at lists.linuxfoundation.org [mailto:fuego-
> bounces at lists.linuxfoundation.org] On Behalf Of Guilherme Campos
> Camargo
> Sent: Friday, January 26, 2018 9:36 AM
> To: fuego at lists.linuxfoundation.org
> Subject: [Fuego] [PATCH 4/9] Move configuration and jenkins plugin
> installation to separate scripts
> 
> In order to simplify the structure of the Dockerfile and optimize build
> times.
> 
> Signed-off-by: Guilherme Campos Camargo <guicc at profusion.mobi>
> ---
>  Dockerfile                                         |  96 ++++++---------------
>  frontend-install/{ => setup/jenkins}/config.xml    |   0
>  .../jenkins.model.JenkinsLocationConfiguration.xml |   0
>  .../plugins/flot-plotter-plugin/.gitignore         |   0
>  .../jenkins}/plugins/flot-plotter-plugin/flot.hpi  | Bin
>  .../jenkins}/plugins/flot-plotter-plugin/pom.xml   |   0
>  .../src/main/java/flotile/ChartAction.java         |   0
>  .../src/main/java/flotile/FlotPublisher.java       |   0
>  .../flotile/ChartAction/floatingBox.jelly          |   0
>  .../src/main/resources/index.jelly                 |   0
>  .../src/main/webapp/flot/.copyarea.db              |   0
>  .../src/main/webapp/flot/API.txt                   |   0
>  .../src/main/webapp/flot/FAQ.txt                   |   0
>  .../src/main/webapp/flot/LICENSE.txt               |   0
>  .../src/main/webapp/flot/PLUGINS.txt               |   0
>  .../src/main/webapp/flot/README.txt                |   0
>  .../src/main/webapp/flot/base64.js                 |   0
>  .../src/main/webapp/flot/canvas2image.js           |   0
>  .../src/main/webapp/flot/excanvas.min.js           |   0
>  .../main/webapp/flot/jquery.colorhelpers.min.js    |   0
>  .../main/webapp/flot/jquery.flot.crosshair.min.js  |   0
>  .../webapp/flot/jquery.flot.fillbetween.min.js     |   0
>  .../src/main/webapp/flot/jquery.flot.image.min.js  |   0
>  .../src/main/webapp/flot/jquery.flot.min.js        |   0
>  .../main/webapp/flot/jquery.flot.navigate.min.js   |   0
>  .../src/main/webapp/flot/jquery.flot.pie.min.js    |   0
>  .../src/main/webapp/flot/jquery.flot.resize.min.js |   0
>  .../main/webapp/flot/jquery.flot.selection.min.js  |   0
>  .../src/main/webapp/flot/jquery.flot.stack.min.js  |   0
>  .../src/main/webapp/flot/jquery.flot.symbol.min.js |   0
>  .../main/webapp/flot/jquery.flot.threshold.min.js  |   0
>  .../src/main/webapp/flot/jquery.min.js             |   0
>  .../src/main/webapp/flot/mod.js                    |   0
>  .../src/main/webapp/flot/my.css                    |   0
>  .../src/main/webapp/help-globalConfig.html         |   0
>  frontend-install/setup/jenkins/plugins/install.sh  |  21 +++++
>  frontend-install/setup/jenkins/setup.sh            |  26 ++++++
>  frontend-install/setup/lava/setup.sh               |  11 +++
>  frontend-install/setup/serial/setup-serio.sh       |   8 ++
>  frontend-install/setup/serial/setup-serlogin.sh    |   6 ++
>  frontend-install/setup/serial/setup-ttc.sh         |   7 ++

In general, I like the idea of refactoring this,  but not this specific
refactoring.  I'll keep your scripts,
but maybe with renames and some merges.  (serio and serlogin
setup don't need to be separate).
ttc is not related to serial.  the lava, serial and apt dirs are
not really related to 'frontend-install', which is itself
a euphemism for 'jenkins'.

I'm applying this patch, in case subsequent patches in this series
depend on the Dockerfile changes here, but I plan to refactor
the frontend-install directory again after I apply the rest of
this series.

>  41 files changed, 105 insertions(+), 70 deletions(-)
>  rename frontend-install/{ => setup/jenkins}/config.xml (100%)
>  rename frontend-install/{ =>
> setup/jenkins}/jenkins.model.JenkinsLocationConfiguration.xml (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/.gitignore (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/flot.hpi (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/pom.xml (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/java/flotile/ChartAction.java (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/java/flotile/FlotPublisher.java (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/resources/flotile/ChartAction/floatingBox.jelly (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/resources/index.jelly (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/.copyarea.db (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/API.txt (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/FAQ.txt (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/LICENSE.txt (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/PLUGINS.txt (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/README.txt (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/base64.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/canvas2image.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/excanvas.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.colorhelpers.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.crosshair.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.fillbetween.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.image.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.navigate.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.pie.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.resize.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.selection.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.stack.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.symbol.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.threshold.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.min.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/mod.js (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/flot/my.css (100%)
>  rename frontend-install/{ => setup/jenkins}/plugins/flot-plotter-
> plugin/src/main/webapp/help-globalConfig.html (100%)
>  create mode 100755 frontend-install/setup/jenkins/plugins/install.sh
>  create mode 100755 frontend-install/setup/jenkins/setup.sh
>  create mode 100755 frontend-install/setup/lava/setup.sh
>  create mode 100755 frontend-install/setup/serial/setup-serio.sh
>  create mode 100755 frontend-install/setup/serial/setup-serlogin.sh
>  create mode 100755 frontend-install/setup/serial/setup-ttc.sh
> 
> diff --git a/Dockerfile b/Dockerfile
> index 3dbae0f..883ac21 100644
> --- a/Dockerfile
> +++ b/Dockerfile
> @@ -106,95 +106,51 @@ RUN echo deb http://emdebian.org/tools/debian/
> jessie main > /etc/apt/sources.li
>          gcc-arm-linux-gnueabihf && \
>      rm -rf /var/lib/apt/lists/*
> 
> -RUN pip install \
> -        filelock \
> -        python-jenkins==0.4.14
> -
>  #
> ==========================================================
> ====================
> -# Install Jenkins with the same UID/GID as the host user
> +# Download and Install Jenkins
>  #
> ==========================================================
> ====================
> 
> -ARG user=jenkins
> -ARG group=jenkins
> -ARG uid=1000
> -ARG gid=${uid}
> +ENV uid=1000
> +ENV gid=${uid}

Do these environment variables persist in the created container?
If so, these names are a bit short.  They don't show up in 
the shell environment inside the container do they?

>  ARG JENKINS_VERSION=2.32.1
>  ARG JENKINS_SHA=bfc226aabe2bb089623772950c4cc13aee613af1
>  ARG JENKINS_URL=https://pkg.jenkins.io/debian-
> stable/binary/jenkins_${JENKINS_VERSION}_all.deb
>  ENV JENKINS_HOME=/var/lib/jenkins
> 
> -RUN groupadd -g ${gid} ${group} \
> -	&& useradd -l -m -d "${JENKINS_HOME}" -u ${uid} -g ${gid} -G sudo -
> s /bin/bash ${user}
> -RUN curl -L -O ${JENKINS_URL}
> -RUN echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" |
> sha1sum -c -
> -RUN dpkg -i jenkins_${JENKINS_VERSION}_all.deb
> -RUN rm jenkins_${JENKINS_VERSION}_all.deb
> +RUN groupadd -g ${gid} ${group} && \
> +    useradd -l -m -d "${JENKINS_HOME}" -u ${uid} -g ${gid} -G sudo -s
> /bin/bash ${user} && \
> +    curl -L -O ${JENKINS_URL} && \
> +    echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" | sha1sum
> -c - && \
> +    dpkg -i jenkins_${JENKINS_VERSION}_all.deb && \
> +    rm jenkins_${JENKINS_VERSION}_all.deb
> 
>  #
> ==========================================================
> ====================
> -# get ttc script and helpers
> +# Post installation
>  #
> ==========================================================
> ====================
> -RUN git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc
> -RUN /usr/local/src/ttc/install.sh /usr/local/bin
> -RUN perl -p -i -e "s#config_dir = \"/etc\"#config_dir = \"/fuego-ro/conf\"#"
> /usr/local/bin/ttc
> 
> -#
> ==========================================================
> ====================
> -# Serial Config
> -#
> ==========================================================
> ====================
> +COPY frontend-install/setup/jenkins /setup/jenkins
> +WORKDIR /setup/jenkins
> +RUN ./setup.sh
> 
> -RUN /bin/bash -c 'git clone https://github.com/frowand/serio.git
> /usr/local/src/serio ;  chown -R jenkins /usr/local/src/serio ; cp
> /usr/local/src/serio/serio /usr/local/bin/ ; ln -s /usr/local/bin/serio
> /usr/local/bin/sercp ; ln -s /usr/local/bin/serio /usr/local/bin/sersh'
> +WORKDIR /setup/jenkins/plugins
> +RUN ./install.sh
> 
> -RUN /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git
> /usr/local/src/serlogin ;  chown -R jenkins /usr/local/src/serlogin ; cp
> /usr/local/src/serlogin/serlogin /usr/local/bin'
> +COPY frontend-install/setup/serial /setup/serial
> +WORKDIR /setup
> 
> -#
> ==========================================================
> ====================
> -# Post installation
> -#
> ==========================================================
> ====================
> +RUN git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc && \
> +    ./serial/setup-ttc.sh
> 
> -RUN source /etc/default/jenkins && \
> -	JENKINS_ARGS="$JENKINS_ARGS --prefix=/fuego" && \
> -	sed -i -e
> "s#JENKINS_ARGS.*#JENKINS_ARGS\=\"${JENKINS_ARGS}\"#g"
> /etc/default/jenkins
> -
> -RUN source /etc/default/jenkins && \
> -	JAVA_ARGS="$JAVA_ARGS -Djenkins.install.runSetupWizard=false"
> && \
> -	if [ -n "$HTTP_PROXY" ]; then \
> -		PROXYSERVER=$(echo $http_proxy | sed -E 's/^http://' | sed
> -E 's/\///g' | sed -E 's/(.*):(.*)/\1/') && \
> -		PROXYPORT=$(echo $http_proxy | sed -E 's/^http://' | sed -E
> 's/\///g' | sed -E 's/(.*):(.*)/\2/') && \
> -		JAVA_ARGS="$JAVA_ARGS -
> Dhttp.proxyHost="${PROXYSERVER}" -Dhttp.proxyPort="${PROXYPORT}" -
> Dhttps.proxyHost="${PROXYSERVER}" -Dhttps.proxyPort="${PROXYPORT}; \
> -	fi && \
> -	sed -i -e "s#^JAVA_ARGS.*#JAVA_ARGS\=\"${JAVA_ARGS}\"#g"
> /etc/default/jenkins;
> -
> -COPY frontend-install/plugins/flot-plotter-plugin/flot.hpi /tmp
> -
> -RUN service jenkins start && \
> -	sleep 30 && \
> -	sudo -u jenkins java -jar /var/cache/jenkins/war/WEB-INF/jenkins-
> cli.jar -s http://localhost:8080/fuego install-plugin description-setter && \
> -	sudo -u jenkins java -jar /var/cache/jenkins/war/WEB-INF/jenkins-
> cli.jar -s http://localhost:8080/fuego install-plugin pegdown-formatter && \
> -    sudo -u jenkins java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -
> s http://localhost:8080/fuego install-plugin /tmp/flot.hpi && \
> -    sleep 10
> -
> -# Let Jenkins install flot before making the symlink
> -RUN service jenkins restart && sleep 30 && \
> -    rm $JENKINS_HOME/plugins/flot/flot/mod.js && \
> -    ln -s /fuego-core/engine/scripts/mod.js
> $JENKINS_HOME/plugins/flot/flot/mod.js
> -
> -RUN ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
> -COPY docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-
> docs.pdf
> +RUN git clone https://github.com/frowand/serio.git /usr/local/src/serio &&
> \
> +    ./serial/setup-serio.sh
> 
> -RUN ln -s /fuego-core/engine/scripts/ftc /usr/local/bin/
> -COPY frontend-install/config.xml $JENKINS_HOME/config.xml
> -COPY frontend-install/jenkins.model.JenkinsLocationConfiguration.xml
> $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml
> +RUN git clone https://github.com/tbird20d/serlogin.git
> /usr/local/src/serlogin && \
> +    ./serial/setup-serlogin.sh
> 
> -RUN chown -R jenkins:jenkins $JENKINS_HOME/
> +COPY frontend-install/setup/lava /setup/lava
> +RUN ./lava/setup.sh
> 
> -#
> ==========================================================
> ====================
> -# Lava
> -#
> ==========================================================
> ====================
> -
> -RUN ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin
> -RUN ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin
> -# CONVENIENCE HACKS
> -# not mounted, yet
> -#RUN echo "fuego-create-node --board raspberrypi3" >> /root/firststart.sh
> -#RUN echo "fuego-create-jobs --board raspberrypi3 --testplan
> testplan_docker --distrib nosyslogd.dist" >> /root/firststart.sh
> +COPY docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-
> docs.pdf
> 
>  #
> ==========================================================
> ====================
>  # Setup startup command
> diff --git a/frontend-install/config.xml b/frontend-
> install/setup/jenkins/config.xml
> similarity index 100%
> rename from frontend-install/config.xml
> rename to frontend-install/setup/jenkins/config.xml
> diff --git a/frontend-install/jenkins.model.JenkinsLocationConfiguration.xml
> b/frontend-
> install/setup/jenkins/jenkins.model.JenkinsLocationConfiguration.xml
> similarity index 100%
> rename from frontend-
> install/jenkins.model.JenkinsLocationConfiguration.xml
> rename to frontend-
> install/setup/jenkins/jenkins.model.JenkinsLocationConfiguration.xml
> diff --git a/frontend-install/plugins/flot-plotter-plugin/.gitignore b/frontend-
> install/setup/jenkins/plugins/flot-plotter-plugin/.gitignore
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-plugin/.gitignore
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/.gitignore
> diff --git a/frontend-install/plugins/flot-plotter-plugin/flot.hpi b/frontend-
> install/setup/jenkins/plugins/flot-plotter-plugin/flot.hpi
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-plugin/flot.hpi
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-plugin/flot.hpi
> diff --git a/frontend-install/plugins/flot-plotter-plugin/pom.xml b/frontend-
> install/setup/jenkins/plugins/flot-plotter-plugin/pom.xml
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-plugin/pom.xml
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/pom.xml
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/java/flotile/ChartAction.java b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/java/flotile/ChartAction.java
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/java/flotile/ChartAction.java
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/java/flotile/ChartAction.java
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/java/flotile/FlotPublisher.java b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/java/flotile/FlotPublisher.java
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/java/flotile/FlotPublisher.java
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/java/flotile/FlotPublisher.java
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/resources/flotile/ChartAction/floatingBox.jelly b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/resources/flotile/ChartAction/floatingBox.jelly
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/resources/flotile/ChartAction/floatingBox.jelly
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/resources/flotile/ChartAction/floatingBox.jelly
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/resources/index.jelly b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/resources/index.jelly
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/resources/index.jelly
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/resources/index.jelly
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/.copyarea.db b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/.copyarea.db
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/.copyarea.db
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/.copyarea.db
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/API.txt b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/API.txt
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/API.txt
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/API.txt
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/FAQ.txt b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/FAQ.txt
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/FAQ.txt
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/FAQ.txt
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/LICENSE.txt b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/LICENSE.txt
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/LICENSE.txt
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/LICENSE.txt
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/PLUGINS.txt b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/PLUGINS.txt
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/PLUGINS.txt
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/PLUGINS.txt
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/README.txt b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/README.txt
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/README.txt
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/README.txt
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/base64.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/base64.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/base64.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/base64.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/canvas2image.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/canvas2image.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/canvas2image.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/canvas2image.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/excanvas.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/excanvas.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/excanvas.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/excanvas.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.colorhelpers.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.colorhelpers.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.colorhelpers.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.colorhelpers.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.crosshair.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.crosshair.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.crosshair.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.crosshair.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.fillbetween.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.fillbetween.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.fillbetween.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.fillbetween.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.image.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.image.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.image.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.image.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.navigate.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.navigate.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.navigate.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.navigate.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.pie.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.pie.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.pie.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.pie.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.resize.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.resize.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.resize.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.resize.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.selection.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.selection.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.selection.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.selection.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.stack.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.stack.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.stack.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.stack.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.symbol.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.symbol.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.symbol.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.symbol.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.threshold.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.threshold.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.threshold.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.flot.threshold.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.min.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.min.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.min.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/jquery.min.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/mod.js b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/mod.js
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/mod.js
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/mod.js
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/my.css b/frontend-
> install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/my.css
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/flot/my.css
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/flot/my.css
> diff --git a/frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/help-globalConfig.html b/frontend-
> install/setup/jenkins/plugins/flot-plotter-plugin/src/main/webapp/help-
> globalConfig.html
> similarity index 100%
> rename from frontend-install/plugins/flot-plotter-
> plugin/src/main/webapp/help-globalConfig.html
> rename to frontend-install/setup/jenkins/plugins/flot-plotter-
> plugin/src/main/webapp/help-globalConfig.html
> diff --git a/frontend-install/setup/jenkins/plugins/install.sh b/frontend-
> install/setup/jenkins/plugins/install.sh
> new file mode 100755
> index 0000000..0db8bf2
> --- /dev/null
> +++ b/frontend-install/setup/jenkins/plugins/install.sh
> @@ -0,0 +1,21 @@
> +#!/bin/bash
> +
> +set -e
> +
> +service jenkins start
> +sleep 30
> +sudo -u jenkins java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s
> http://localhost:8080/fuego install-plugin description-setter
> +sudo -u jenkins java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s
> http://localhost:8080/fuego install-plugin pegdown-formatter
> +sudo -u jenkins java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s
> http://localhost:8080/fuego install-plugin flot-plotter-plugin/flot.hpi
> +sleep 10
> +
> +# Let Jenkins install flot before making the symlink
> +service jenkins restart
> +sleep 30
> +rm $JENKINS_HOME/plugins/flot/flot/mod.js
> +ln -s /fuego-core/engine/scripts/mod.js
> $JENKINS_HOME/plugins/flot/flot/mod.js
> +ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs
> +ln -s /fuego-core/engine/scripts/ftc /usr/local/bin/
> +
> +chown -R jenkins:jenkins $JENKINS_HOME/
> +
> diff --git a/frontend-install/setup/jenkins/setup.sh b/frontend-
> install/setup/jenkins/setup.sh
> new file mode 100755
> index 0000000..c550862
> --- /dev/null
> +++ b/frontend-install/setup/jenkins/setup.sh
> @@ -0,0 +1,26 @@
> +#!/bin/bash
> +
> +set -e
> +
> +user=jenkins
> +group=jenkins
> +uid=1000
> +gid=${uid}
> +
> +# groupadd -g ${gid} ${group}
> +# useradd -l -m -d "${JENKINS_HOME}" -u ${uid} -g ${gid} -G sudo -s
> /bin/bash ${user}
> +
> +cp config.xml jenkins.model.JenkinsLocationConfiguration.xml
> ${JENKINS_HOME}
> +
> +source /etc/default/jenkins
> +JENKINS_ARGS="$JENKINS_ARGS --prefix=/fuego"
> +sed -i -e "s#JENKINS_ARGS.*#JENKINS_ARGS\=\"${JENKINS_ARGS}\"#g"
> /etc/default/jenkins
> +
> +JAVA_ARGS="$JAVA_ARGS -Djenkins.install.runSetupWizard=false"
> +if [ -n "$HTTP_PROXY" ]; then
> +	PROXYSERVER=$(echo $http_proxy | sed -E 's/^http://' | sed -E
> 's/\///g' | sed -E 's/(.*):(.*)/\1/');
> +	PROXYPORT=$(echo $http_proxy | sed -E 's/^http://' | sed -E
> 's/\///g' | sed -E 's/(.*):(.*)/\2/');
> +	JAVA_ARGS="$JAVA_ARGS -Dhttp.proxyHost=${PROXYSERVER} -
> Dhttp.proxyPort=${PROXYPORT} -Dhttps.proxyHost=${PROXYSERVER} -
> Dhttps.proxyPort=${PROXYPORT}";
> +fi
> +sed -i -e "s#^JAVA_ARGS.*#JAVA_ARGS\=\"${JAVA_ARGS}\"#g"
> /etc/default/jenkins
> +
> diff --git a/frontend-install/setup/lava/setup.sh b/frontend-
> install/setup/lava/setup.sh
> new file mode 100755
> index 0000000..86df49f
> --- /dev/null
> +++ b/frontend-install/setup/lava/setup.sh
> @@ -0,0 +1,11 @@
> +#!/bin/bash
> +
> +set -e
> +
> +# CONVENIENCE HACKS
> +# not mounted, yet
> +#RUN echo "fuego-create-node --board raspberrypi3" >> /root/firststart.sh
> +#RUN echo "fuego-create-jobs --board raspberrypi3 --testplan
> testplan_docker --distrib nosyslogd.dist" >> /root/firststart.sh
> +
> +ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin
> +ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin
> diff --git a/frontend-install/setup/serial/setup-serio.sh b/frontend-
> install/setup/serial/setup-serio.sh
> new file mode 100755
> index 0000000..7e25a96
> --- /dev/null
> +++ b/frontend-install/setup/serial/setup-serio.sh
> @@ -0,0 +1,8 @@
> +#!/bin/bash
> +
> +set -e
> +
> +chown -R jenkins:jenkins /usr/local/src/serio
> +cp /usr/local/src/serio/serio /usr/local/bin/
> +ln -s /usr/local/bin/serio /usr/local/bin/sercp
> +ln -s /usr/local/bin/serio /usr/local/bin/sersh
> diff --git a/frontend-install/setup/serial/setup-serlogin.sh b/frontend-
> install/setup/serial/setup-serlogin.sh
> new file mode 100755
> index 0000000..0de17ea
> --- /dev/null
> +++ b/frontend-install/setup/serial/setup-serlogin.sh
> @@ -0,0 +1,6 @@
> +#!/bin/bash
> +
> +set -e
> +
> +chown -R jenkins:jenkins /usr/local/src/serlogin
> +cp /usr/local/src/serlogin/serlogin /usr/local/bin
> diff --git a/frontend-install/setup/serial/setup-ttc.sh b/frontend-
> install/setup/serial/setup-ttc.sh
> new file mode 100755
> index 0000000..d32b73e
> --- /dev/null
> +++ b/frontend-install/setup/serial/setup-ttc.sh
> @@ -0,0 +1,7 @@
> +#!/bin/bash
> +
> +set -e
> +
> +/usr/local/src/ttc/install.sh /usr/local/bin
> +perl -p -i -e "s#config_dir = \"/etc\"#config_dir = \"/fuego-ro/conf\"#" \
> +    /usr/local/bin/ttc
> --
> 2.15.1


OK - applied, but with caveats mentioned above.
 -- Tim



More information about the Fuego mailing list