mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Some scripts for a banana image
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Alfresco Solr 6 Docker image with banana
|
||||
#
|
||||
# To build your own banana image:
|
||||
# export bamboo_planRepository_1_branch=local
|
||||
# Change line 15 in buildandTest.sh to point to your local banana (hint: line starts: cp -rf /home/gethin/)
|
||||
# ./buildandTest.sh
|
||||
#
|
||||
FROM docker-internal.alfresco.com/search-services:develop-latest
|
||||
MAINTAINER Gethin James, gethin.james@alfresco.com
|
||||
|
||||
COPY banana-jetty-context.xml $DIST_DIR/solr/server/contexts/
|
||||
COPY banana-dist $DIST_DIR/solr/server/solr-webapp/banana
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
|
||||
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
||||
<Set name="contextPath"><Property name="hostContext" default="/banana"/></Set>
|
||||
<Set name="war"><Property name="jetty.base"/>/solr-webapp/banana</Set>
|
||||
<Set name="defaultsDescriptor"><Property name="jetty.base"/>/etc/webdefault.xml</Set>
|
||||
<Set name="tempDirectory"><Property name="jetty.home" default="."/>/banana-webapp</Set>
|
||||
<Set name="extractWAR">false</Set>
|
||||
</Configure>
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
[ "$DEBUG" ] && set -x
|
||||
|
||||
# set current working directory to the directory of the script
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
nicebranch=`echo "$bamboo_planRepository_1_branch" | sed 's/\//_/'`
|
||||
dockerImage="docker-internal.alfresco.com/search-services-banana:${nicebranch}-latest"
|
||||
|
||||
echo "Building $dockerImage..."
|
||||
|
||||
rm -rf ./banana-dist
|
||||
cp -rf /home/gethin/covodev/source/banana/dist ./banana-dist
|
||||
docker build -t $dockerImage .
|
||||
|
||||
# running tests
|
||||
docker run --rm "$dockerImage" [ -d /opt/alfresco-solr/solr/server/solr-webapp/banana ] || (echo "banana dir does not exist" && exit 1)
|
||||
docker run --rm "$dockerImage" [ -e /opt/alfresco-solr//solr/server/contexts/banana-jetty-context.xml ] || (echo "banana context does not exist" && exit 1)
|
||||
|
||||
if [ "${nicebranch}" == "local" ]
|
||||
then
|
||||
echo "Skipping docker publish for local build"
|
||||
else
|
||||
echo "Publishing $dockerImage..."
|
||||
docker push "$dockerImage"
|
||||
fi
|
||||
|
||||
echo "Docker banana SUCCESS"
|
||||
Reference in New Issue
Block a user