Skip to content

Commit 1f9ddeb

Browse files
authored
Merge pull request #2 from jfcanaveral/master
update squash-tm to version 1.14
2 parents 0dc7035 + e810b6a commit 1f9ddeb

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ RUN yum -y install postgresql
55

66
# java7
77
RUN cd /opt && \
8-
(curl -L -k -b "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz | gunzip -c | tar x) \
9-
&& ln -s /opt/jdk1.7.0_79 /opt/jdk7
8+
(curl -L -k -b "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz | gunzip -c | tar x) \
9+
&& ln -s /opt/jdk1.8.0_111 /opt/jdk8
1010

11-
ENV JAVA_HOME /opt/jdk7
11+
ENV JAVA_HOME /opt/jdk8
1212
ENV JRE_HOME $JAVA_HOME/jre
1313
ENV PATH $PATH:$JAVA_HOME/bin
1414

1515
USER app
1616
RUN cd /srv \
17-
&& (curl -L http://www.squashtest.org/downloads/send/13-version-stable/199-sqaushtm-1122-targz-2?lang=en | gunzip -c | tar x)
17+
&& (curl -L http://www.squashtest.org/downloads/send/13-version-stable-tm/241-stm-1141-targz?lang=en | gunzip -c | tar x)
1818

1919
COPY startup.sh /srv/squash-tm/bin/startup.sh
2020
COPY conf /srv/squash-tm/bin/conf

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ docker run --rm -it logicify/squash-tm /bin/bash
3737
and issue the following:
3838

3939
```
40-
psql -h <DBHOST HERE> --user $DB_USER $DB_NAME < ../database-scripts/postgresql-full-install-version-1.12.0.RELEASE.sql
40+
psql -h <DBHOST HERE> --user $DB_USER $DB_NAME < ../database-scripts/postgresql-full-install-version-1.14.0.RELEASE.sql
4141
```
4242

4343
## Docker compose example

startup.sh

+14-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /bin/sh
22
#
33
# This file is part of the Squashtest platform.
44
# Copyright (C) 2010 - 2012 Henix, henix.fr
@@ -28,27 +28,25 @@
2828

2929

3030
# Default variables
31-
JAR_NAME="org.apache.felix.main-4.2.1.jar" # Java main library
31+
JAR_NAME="squash-tm.war" # Java main library
3232
HTTP_PORT=8080 # Port for HTTP connector (default 8080; disable with -1)
3333
# Directory variables
34-
TMP_DIR=../tmp # Jetty tmp and work directory
34+
TMP_DIR=../tmp # Tmp and work directory
3535
BUNDLES_DIR=../bundles # Bundles directory
36-
CACHE_DIR=.. # Cache directory
3736
CONF_DIR=../conf # Configurations directory
3837
LOG_DIR=../logs # Log directory
39-
JETTY_HOME=../jettyhome # Jetty home directory
38+
TOMCAT_HOME=../tomcat-home # Tomcat home directory
4039
LUCENE_DIR=../luceneindexes # Lucene indexes directory
4140
PLUGINS_DIR=../plugins # Plugins directory
4241
# DataBase parameters
43-
DB_URL=${DB_URL:-"jdbc:h2:../data/squash-tm"} # DataBase URL
44-
DB_DRIVER=${DB_DRIVER:-"org.h2.Driver"} # DataBase driver
45-
DB_USERNAME=${DB_USERNAME:-"sa"} # DataBase username
46-
DB_PASSWORD=${DB_PASSWORD:-"sa"} # DataBase password
47-
DB_DIALECT=${DB_DIALECT:-"org.hibernate.dialect.H2Dialect"} # DataBase dialect
42+
DB_TYPE=h2 # DAtabase type, one of h2, mysql, postgresql
43+
DB_URL=jdbc:h2:../data/squash-tm # DataBase URL
44+
DB_USERNAME=sa # DataBase username
45+
DB_PASSWORD=sa # DataBase password
4846
## Do not configure a third digit here
49-
REQUIRED_VERSION=1.6
47+
REQUIRED_VERSION=1.7
5048
# Extra Java args
51-
JAVA_ARGS=${JAVA_ARGS:-"-Xms128m -Xmx512m -XX:MaxPermSize=192m -server"}
49+
JAVA_ARGS="-Xms128m -Xmx512m -XX:MaxPermSize=192m -server"
5250

5351

5452
# Tests if java exists
@@ -94,12 +92,11 @@ echo "done";
9492

9593

9694
# Let's go !
97-
echo "$0 : starting Felix... ";
95+
echo "$0 : starting Squash TM... ";
9896

99-
export _JAVA_OPTIONS="-Ddb.driver=${DB_DRIVER} -Ddb.url=${DB_URL} -Ddb.username=${DB_USERNAME} -Ddb.password=${DB_PASSWORD} -Ddb.dialect=${DB_DIALECT} -Duser.language=en"
100-
DAEMON_ARGS="${JAVA_ARGS} -Dbundles.dir=${BUNDLES_DIR} -Dcache.dir=${CACHE_DIR} -Dconf.dir=${CONF_DIR} -Dlog.dir=${LOG_DIR} -Dplugins.dir=${PLUGINS_DIR} -Djetty.logs=${LOG_DIR} -Dbundles.configuration.location=${CONF_DIR} -Dfelix.config.properties=file:${CONF_DIR}/felix.config.properties -Dfelix.system.properties=file:${CONF_DIR}/felix.system.properties -Djetty.port=${HTTP_PORT} -Djetty.home=${JETTY_HOME} -Dlucene.dir=${LUCENE_DIR} -Dgosh.args=--noi -Djava.io.tmpdir=${TMP_DIR} -Dlog4j.configuration=file:./conf/log4j.properties -jar ${JAR_NAME}"
101-
102-
find ${TMP_DIR} -delete > /dev/null 2>&1
97+
export _JAVA_OPTIONS="-Dspring.datasource.url=${DB_URL} -Dspring.datasource.username=${DB_USERNAME} -Dspring.datasource.password=${DB_PASSWORD} -Duser.language=en"
98+
DAEMON_ARGS="${JAVA_ARGS} -Djava.io.tmpdir=${TMP_DIR} -Dlogging.dir=${LOG_DIR} -jar ${BUNDLES_DIR}/${JAR_NAME} --spring.profiles.active=${DB_TYPE} --spring.config.location=${CONF_DIR}/squash.tm.cfg.properties --logging.config=${CONF_DIR}/log4j.properties --squash.path.bundles-path=${BUNDLES_DIR} --squash.path.plugins-path=${PLUGINS_DIR} --hibernate.search.default.indexBase=${LUCENE_DIR} --server.port=${HTTP_PORT} --server.tomcat.basedir=${TOMCAT_HOME} "
10399

104100
exec java ${DAEMON_ARGS}
105101

102+

0 commit comments

Comments
 (0)