directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1770580 - in /directory/buildtools/docker/studio-build: Dockerfile README.md build-studio-with-ui-tests.sh entrypoint.sh
Date Sun, 20 Nov 2016 19:28:12 GMT
Author: seelmann
Date: Sun Nov 20 19:28:12 2016
New Revision: 1770580

URL: http://svn.apache.org/viewvc?rev=1770580&view=rev
Log:
Refactor and add build script

Added:
    directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh   (with props)
Modified:
    directory/buildtools/docker/studio-build/Dockerfile
    directory/buildtools/docker/studio-build/README.md
    directory/buildtools/docker/studio-build/entrypoint.sh

Modified: directory/buildtools/docker/studio-build/Dockerfile
URL: http://svn.apache.org/viewvc/directory/buildtools/docker/studio-build/Dockerfile?rev=1770580&r1=1770579&r2=1770580&view=diff
==============================================================================
--- directory/buildtools/docker/studio-build/Dockerfile (original)
+++ directory/buildtools/docker/studio-build/Dockerfile Sun Nov 20 19:28:12 2016
@@ -24,20 +24,23 @@ RUN apt-get update
 RUN apt-get install -y --no-install-recommends xvfb
 RUN apt-get install -y --no-install-recommends krb5-config krb5-user
 
-RUN mkdir /home/studio && chmod 777 /home/studio
-WORKDIR /home/studio
-
-ADD entrypoint.sh /usr/local/bin
-RUN chmod 755 /usr/local/bin/entrypoint.sh
-
-ADD mvn /usr/local/bin
-RUN chmod 755 /usr/local/bin/mvn
+# Create home directory
+RUN mkdir /home/hnelson && chmod 777 /home/hnelson
+WORKDIR /home/hnelson
 
+# Add krb5.conf with EXAMPLE.COM domain
 ADD krb5.conf /etc/
 
-# Make /etc/passwd writeable to be able to inject username
+# Make /etc/passwd writeable to be able to inject username with dynamic uid/gid
 RUN chmod 666 /etc/passwd
 
+# Add and configure entrypoint script
+ADD entrypoint.sh /usr/local/bin
+RUN chmod 755 /usr/local/bin/entrypoint.sh
 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
-CMD "/bin/bash"
+
+# Add build script and make it the default command
+ADD build-studio-with-ui-tests.sh /usr/local/bin
+RUN chmod 755 /usr/local/bin/build-studio-with-ui-tests.sh
+CMD "/usr/local/bin/build-studio-with-ui-tests.sh"
 

Modified: directory/buildtools/docker/studio-build/README.md
URL: http://svn.apache.org/viewvc/directory/buildtools/docker/studio-build/README.md?rev=1770580&r1=1770579&r2=1770580&view=diff
==============================================================================
--- directory/buildtools/docker/studio-build/README.md (original)
+++ directory/buildtools/docker/studio-build/README.md Sun Nov 20 19:28:12 2016
@@ -40,15 +40,27 @@ It contains all requirements:
 
 ## Usage
 
+Local
+
     PATH_TO_STUDIO_SRC=...
     docker run -it --rm \
         -u $(id -u):$(id -g) \
-        -e HOME=/home/studio \
-        -v ~/.m2:/home/studio/.m2 \
-        -v $PATH_TO_STUDIO_SRC:/home/studio/src \
+        -e HOME=/home/hnelson \
+        -v ~/.m2:/home/hnelson/.m2 \
+        -v $PATH_TO_STUDIO_SRC:/home/hnelson/studio \
         apachedirectory/studio-build bash
 
-    cd /home/studio/src
+    cd /home/hnelson/studio
+    mvn -f pom-first.xml clean install
     mvn clean install -Denable-ui-tests
 
 
+On Jenkins
+
+    docker run -i --rm \
+        -u $(id -u):$(id -g) \
+        -e HOME=/home/hnelson \
+        -v $(pwd):/home/hnelson/studio \
+        apachedirectory/studio-build
+
+

Added: directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh
URL: http://svn.apache.org/viewvc/directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh?rev=1770580&view=auto
==============================================================================
--- directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh (added)
+++ directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh Sun Nov 20 19:28:12
2016
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# stop execution if any command fails (i.e. exits with status code > 0)
+set -e
+
+# trace commands
+set -x
+
+cd /home/hnelson/studio
+mvn -V -f pom-first.xml clean install
+mvn -V clean install -Denable-ui-tests
+

Propchange: directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/buildtools/docker/studio-build/build-studio-with-ui-tests.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: directory/buildtools/docker/studio-build/entrypoint.sh
URL: http://svn.apache.org/viewvc/directory/buildtools/docker/studio-build/entrypoint.sh?rev=1770580&r1=1770579&r2=1770580&view=diff
==============================================================================
--- directory/buildtools/docker/studio-build/entrypoint.sh (original)
+++ directory/buildtools/docker/studio-build/entrypoint.sh Sun Nov 20 19:28:12 2016
@@ -4,7 +4,7 @@ set -e
 export DISPLAY=:99
 Xvfb :99 -screen 0 1024x768x16 &
 
-echo "hnelson:x:$(id -u):$(id -g)::/home/studio:/bin/bash" >> /etc/passwd
+echo "hnelson:x:$(id -u):$(id -g)::/home/hnelson:/bin/bash" >> /etc/passwd
 
 exec "$@"
 



Mime
View raw message