remove old packaging

This commit is contained in:
Sebastian Sdorra
2020-05-17 12:43:56 +02:00
parent 9bbb26d774
commit 01a2d6c33a
13 changed files with 13 additions and 970 deletions

View File

@@ -1,44 +0,0 @@
#
# MIT License
#
# Copyright (c) 2020-present Cloudogu GmbH and Contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
FROM openjdk:8u212-alpine3.9
ENV SCM_HOME=/var/lib/scm
RUN set -x \
&& apk add --no-cache mercurial bash \
&& addgroup -S -g 1000 scm \
&& adduser -S -s /bin/false -G scm -h /opt/scm-server -D -H -u 1000 scm \
&& mkdir ${SCM_HOME} \
&& chown scm:scm ${SCM_HOME}
ADD scm-server/target/scm-server-app.tar.gz /opt
RUN chown -R scm:scm /opt/scm-server
WORKDIR /opt/scm-server
VOLUME [ "${SCM_HOME}", "/opt/scm-server/var/log" ]
EXPOSE 8080
USER scm
ENTRYPOINT [ "/opt/scm-server/bin/scm-server" ]

39
Jenkinsfile vendored
View File

@@ -110,17 +110,14 @@ node('docker') {
imageVersion = imageVersion.replace('-SNAPSHOT', "-${commitHash.substring(0,7)}-${BUILD_NUMBER}")
}
stage('Archive') {
archiveArtifacts 'scm-webapp/target/scm-webapp.war'
archiveArtifacts 'scm-server/target/scm-server-app.*'
}
stage('Maven Deployment') {
// TODO why is the server recreated
// delete appassembler target, because the maven plugin fails to recreate the tar
sh "rm -rf scm-server/target/appassembler"
// configuration for docker deployment
mvn.useRepositoryCredentials([
id: 'docker.io',
credentialsId: 'hub.docker.com-cesmarvin'
])
// deploy java artifacts
// configuration for maven deployment
mvn.useDeploymentRepository([
id: 'packages-test.scm-manager.org',
url: 'https://packages-test.scm-manager.org/nexus',
@@ -150,24 +147,14 @@ node('docker') {
}
}
stage('Docker') {
docker.withRegistry('', 'hub.docker.com-cesmarvin') {
// push to cloudogu repository for internal usage
def image = docker.build('cloudogu/scm-manager')
image.push(imageVersion)
if (isReleaseBranch()) {
// push to official repository
image = docker.build('scmmanager/scm-manager')
image.push(imageVersion)
}
}
}
stage('Presentation Environment') {
build job: 'scm-manager/next-scm.cloudogu.com', propagate: false, wait: false, parameters: [
string(name: 'changeset', value: commitHash),
string(name: 'imageTag', value: imageVersion)
]
/**
* TODO does not match docker version (scm-packaging/docker)
* build job: 'scm-manager/next-scm.cloudogu.com', propagate: false, wait: false, parameters: [
* string(name: 'changeset', value: commitHash),
* string(name: 'imageTag', value: imageVersion)
* ]
*/
}
if (isReleaseBranch()) {

View File

@@ -68,272 +68,8 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>sonia.maven</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.2.2.0</version>
<executions>
<execution>
<id>scm-app</id>
<phase>package</phase>
<goals>
<goal>create-repository</goal>
<goal>generate-daemons</goal>
</goals>
<configuration>
<target>${project.build.directory}/appassembler</target>
<assembleDirectory>${exploded.directory}</assembleDirectory>
<repoPath>lib</repoPath>
<repositoryLayout>flat</repositoryLayout>
<daemons>
<daemon>
<id>scm-server</id>
<version>${commons.daemon.native.version}</version>
<mainClass>sonia.scm.server.ScmServerDaemon</mainClass>
<platforms>
<platform>commons-daemon</platform>
</platforms>
<jvmSettings>
<systemProperties>
<arg>java.awt.headless=true</arg>
<arg>logback.configurationFile=logging.xml</arg>
<arg>ClassLoaderLeakPreventor.threadWaitMs=100</arg>
</systemProperties>
</jvmSettings>
<generatorConfigurations>
<generatorConfiguration>
<generator>commons-daemon</generator>
<configuration>
<property>
<name>configuration.directory</name>
<value>conf</value>
</property>
<property>
<name>darwin.arch.enable</name>
<value>false</value>
</property>
<property>
<name>windows.service.dependencies</name>
<value>Tcpip</value>
</property>
</configuration>
</generatorConfiguration>
</generatorConfigurations>
</daemon>
</daemons>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>scm-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
<outputDirectory>${exploded.directory}/var/webapp</outputDirectory>
<destFileName>scm-webapp.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/scm-server-app.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>scm-server</finalName>
</build>
<profiles>
<profile>
<id>nativepkg</id>
<build>
<plugins>
<plugin>
<groupId>com.github.sdorra</groupId>
<artifactId>nativepkg-maven-plugin</artifactId>
<version>1.1.4</version>
<executions>
<execution>
<goals>
<goal>deb</goal>
<goal>rpm</goal>
</goals>
<!--
disabled for pre releases.
TODO enable for ga.
-->
<phase>none</phase>
</execution>
</executions>
<configuration>
<name>${project.name}-2</name>
<attach>true</attach>
<classifier>all</classifier>
<release>${maven.build.timestamp}</release>
<section>devel</section>
<group>Development/Tools</group>
<vendor>SCM-Manager</vendor>
<license>MIT</license>
<url>www.scm-manager.org</url>
<summary>${project.description}</summary>
<packager>Sebastian Sdorra &lt;s.sdorra@gmail.com&gt;</packager>
<platform>
<architecture>noarch</architecture>
<os>linux</os>
</platform>
<scripts>
<preInstall>${project.basedir}/src/main/nativepkg/create-user</preInstall>
<postInstall>${project.basedir}/src/main/nativepkg/clear-cache</postInstall>
</scripts>
<mappings>
<files>
<file>
<path>/opt/scm-server/bin/scm-server</path>
<source>${exploded.directory}/bin/scm-server</source>
<mode>0744</mode>
</file>
<file>
<path>/opt/scm-server/conf/server-config.xml</path>
<source>${project.basedir}/src/main/conf/server-config.xml</source>
<config>true</config>
</file>
<file>
<path>/opt/scm-server/conf/logging.xml</path>
<source>${project.basedir}/src/main/nativepkg/logging.xml</source>
<config>true</config>
</file>
<file>
<path>/opt/scm-server/libexec/jsvc-linux-i686</path>
<source>${exploded.directory}/libexec/jsvc-linux-i686</source>
<mode>0744</mode>
</file>
<file>
<path>/opt/scm-server/libexec/jsvc-linux-x86_64</path>
<source>${exploded.directory}/libexec/jsvc-linux-x86_64</source>
<mode>0744</mode>
</file>
<file>
<path>/opt/scm-server/var/webapp/scm-webapp.war</path>
<source>${exploded.directory}/var/webapp/scm-webapp.war</source>
</file>
<file>
<path>/opt/scm-server/var/webapp/docroot/index.html</path>
<source>${basedir}/src/main/docroot/index.html</source>
</file>
<file>
<path>/etc/default/scm-server</path>
<source>${project.basedir}/src/main/nativepkg/default</source>
<mode>0644</mode>
<config>true</config>
</file>
<file>
<path>/etc/init.d/scm-server</path>
<source>${project.basedir}/src/main/nativepkg/init-script</source>
<mode>0755</mode>
</file>
</files>
<links>
<link>
<source>/opt/scm-server/var/log</source>
<target>/var/log/scm</target>
</link>
<link>
<source>/opt/scm-server/work</source>
<target>/var/cache/scm/work</target>
</link>
</links>
<directories>
<directory>
<path>/opt/scm-server/lib</path>
<source>${exploded.directory}/lib</source>
</directory>
<directory>
<path>/var/cache/scm</path>
<uname>scm</uname>
<gname>scm</gname>
<dirMode>0700</dirMode>
<addParents>false</addParents>
</directory>
<directory>
<path>/var/cache/scm/work</path>
<uname>scm</uname>
<gname>scm</gname>
<dirMode>0700</dirMode>
<addParents>false</addParents>
</directory>
<directory>
<path>/var/log/scm</path>
<uname>scm</uname>
<gname>scm</gname>
<dirMode>0770</dirMode>
<addParents>false</addParents>
</directory>
<directory>
<path>/var/lib/scm</path>
<uname>scm</uname>
<gname>scm</gname>
<dirMode>0700</dirMode>
<addParents>false</addParents>
</directory>
</directories>
</mappings>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<commons.daemon.version>1.2.2</commons.daemon.version>
<commons.daemon.native.version>1.1.0</commons.daemon.native.version>
<exploded.directory>${project.build.directory}/appassembler/commons-daemon/scm-server</exploded.directory>
</properties>
</project>

View File

@@ -1,13 +0,0 @@
SCM-Manager Version ${project.version}
================================================================================
First Access:
URL: http://localhost:8080
Username: scmadmin
Password: scmadmin
Further reading:
Release notes: https://bitbucket.org/sdorra/scm-manager/wiki/release-notes
Getting started: https://bitbucket.org/sdorra/scm-manager/wiki/getting-started

View File

@@ -1,5 +0,0 @@
This directory is the temp directory for the SCM-Manager webapp.
Further reading on jetty temp directories:
- http://wiki.eclipse.org/Jetty/Reference/Temporary_Directories

View File

@@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
MIT License
Copyright (c) 2020-present Cloudogu GmbH and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>app</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>target/appassembler/commons-daemon/scm-server/bin</directory>
<filtered>false</filtered>
<outputDirectory>bin</outputDirectory>
<directoryMode>0755</directoryMode>
</fileSet>
<fileSet>
<directory>target/appassembler/commons-daemon/scm-server</directory>
<filtered>false</filtered>
<outputDirectory></outputDirectory>
</fileSet>
<fileSet>
<directory>src/main/conf</directory>
<filtered>false</filtered>
<outputDirectory>conf</outputDirectory>
</fileSet>
<fileSet>
<directory>src/main/docroot</directory>
<filtered>false</filtered>
<outputDirectory>var/webapp/docroot</outputDirectory>
</fileSet>
</fileSets>
<files>
<file>
<source>src/main/assembly/README.txt</source>
<destName>README.txt</destName>
<filtered>true</filtered>
</file>
<!--
copy release logging configuration to config directory
-->
<file>
<source>../scm-webapp/src/main/resources/logback.release.xml</source>
<outputDirectory>conf</outputDirectory>
<destName>logging.xml</destName>
</file>
<!--
create work directory, see
https://bitbucket.org/sdorra/scm-manager/issue/464/scmserver-login-page-fails-to-render
-->
<file>
<source>src/main/assembly/WORKDIR.txt</source>
<outputDirectory>work</outputDirectory>
</file>
</files>
</assembly>

View File

@@ -1,197 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
MIT License
Copyright (c) 2020-present Cloudogu GmbH and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
<Configure id="ScmServer" class="org.eclipse.jetty.server.Server">
<New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
<!-- increase header size for mercurial -->
<Set name="requestHeaderSize">16384</Set>
<Set name="responseHeaderSize">16384</Set>
<Call name="addCustomizer">
<Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg>
</Call>
</New>
<!--
Connectors
-->
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ServerConnector">
<Arg name="server">
<Ref refid="ScmServer" />
</Arg>
<Arg name="factories">
<Array type="org.eclipse.jetty.server.ConnectionFactory">
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg name="config">
<Ref refid="httpConfig" />
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="port">
<SystemProperty name="jetty.port" default="8080" />
</Set>
</New>
</Arg>
</Call>
<New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/scm</Set>
<Set name="war">
<SystemProperty name="basedir" default="."/>/var/webapp/scm-webapp.war</Set>
<!-- disable directory listings -->
<Call name="setInitParameter">
<Arg>org.eclipse.jetty.servlet.Default.dirAllowed</Arg>
<Arg>false</Arg>
</Call>
<Set name="tempDirectory">
<SystemProperty name="basedir" default="."/>/work/scm
</Set>
</New>
<New id="docroot" class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="baseResource">
<New class="org.eclipse.jetty.util.resource.ResourceCollection">
<Arg>
<Array type="java.lang.String">
<Item>
<SystemProperty name="basedir" default="."/>/var/webapp/docroot</Item>
</Array>
</Arg>
</New>
</Set>
<Set name="tempDirectory">
<SystemProperty name="basedir" default="."/>/work/docroot
</Set>
</New>
<Set name="handler">
<New class="org.eclipse.jetty.server.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.eclipse.jetty.server.Handler">
<Item>
<Ref id="scm-webapp" />
</Item>
<Item>
<Ref id="docroot" />
</Item>
</Array>
</Set>
</New>
</Set>
<!-- TODO fix for jetty 9.2.x -->
<!-- request logging -->
<!--
<Ref id="RequestLog">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
<Arg><SystemProperty name="basedir" default="."/>/var/log/yyyy_mm_dd.request.log</Arg>
<Set name="retainDays">90</Set>
<Set name="append">true</Set>
<Set name="extended">false</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
</Ref>
-->
<!-- mod_proxy_ajp or mod_jk -->
<!--
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.ajp.Ajp13SocketConnector">
<Set name="port">8009</Set>
</New>
</Arg>
</Call>
-->
<!-- SSL-Connector -->
<!--
Documentation for the SSL-Connector:
http://wiki.eclipse.org/Jetty/Reference/SSL_Connectors
-->
<!--
Besure SSLv3 protocol is excluded to avoid POODLE vulnerability.
See https://groups.google.com/d/msg/scmmanager/sX_Ydy-wAPA/-Dvs5i7RHtQJ
-->
<!--
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<Arg>
<New class="org.eclipse.jetty.http.ssl.SslContextFactory">
<Set name="excludeProtocols">
<Array type="java.lang.String">
<Item>SSLv2Hello</Item>
<Item>SSLv3</Item>
</Array>
</Set>
</New>
</Arg>
<Set name="Port">8181</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="requestHeaderSize">16384</Set>
<Set name="keystore"><SystemProperty name="basedir" default="." />/conf/keystore.jks</Set>
<Set name="password">OBF:xxx</Set>
<Set name="keyPassword">OBF:xxx</Set>
<Set name="truststore"><SystemProperty name="basedir" default="." />/conf/keystore.jks</Set>
<Set name="trustPassword">OBF:xxx</Set>
</New>
</Arg>
</Call>
-->
<!-- JMX support -->
<!--
<Call id="MBeanServer" class="java.lang.management.ManagementFactory"
name="getPlatformMBeanServer" />
<New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer">
<Arg>
<Ref id="MBeanServer" />
</Arg>
</New>
<Get id="Container" name="container">
<Call name="addEventListener">
<Arg>
<Ref id="MBeanContainer" />
</Arg>
</Call>
</Get>
-->
</Configure>

View File

@@ -1,35 +0,0 @@
<!--
MIT License
Copyright (c) 2020-present Cloudogu GmbH and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SCM-Server</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="0;url=/scm">
</head>
<body>
</body>
</html>

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# clear workdir after upgrade
# https://bitbucket.org/sdorra/scm-manager/issues/923/scmmanager-installed-from-debian-package
WORKDIR="/var/cache/scm/work/webapp"
if [ -d "${WORKDIR}" ]; then
rm -rf "${WORKDIR}"
fi

View File

@@ -1,6 +0,0 @@
#!/bin/sh
getent group scm >/dev/null || groupadd -r scm
getent passwd scm >/dev/null || \
useradd -r -g scm -M -s /sbin/nologin \
-c "user for the scm-server process" scm
exit 0

View File

@@ -1,51 +0,0 @@
#!/bin/sh
#
# MIT License
#
# Copyright (c) 2020-present Cloudogu GmbH and Contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# scm-server host interface
HOST=0.0.0.0
# scm-server port
PORT=8080
# change user
USER=scm
# home of scm-manager
export SCM_HOME=/var/lib/scm
# force jvm path
# JAVA_HOME="/usr/lib/jvm/jre"
# path to pid
PIDFILE=/var/run/scm.pid
# path to log directory
LOGDIR=/var/log/scm
# increase memory
# EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -Xms1g -Xmx1g"
# pass extra jvm arguments
EXTRA_JVM_ARGUMENTS="$EXTRA_JVM_ARGUMENTS -Djetty.host=$HOST -Djetty.port=$PORT"

View File

@@ -1,128 +0,0 @@
#!/bin/sh
#
# SCM-Server start script
#
#
# MIT License
#
# Copyright (c) 2020-present Cloudogu GmbH and Contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# chkconfig: 35 35 65
# description: SCM-Server
#
### BEGIN INIT INFO
# Provides: scm-server
# Required-Start: $local_fs $remote_fs $network $time $named
# Required-Stop: $local_fs $remote_fs $network $time $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: SCM-Server
### END INIT INFO
# start script is based on the one posted from JavaNode to SCM-Manager mailing
# list: https://groups.google.com/d/msg/scmmanager/-wNjenUbl0Q/CkELJ6fLMHsJ
# Source function library.
if [ -x /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi
# Check for and source configuration file otherwise set defaults
RETVAL=0
appname=ScmServerDaemon
# See how we were called.
start() {
if [ $(ps aux | grep java | grep ${appname} | wc -l) = 0 ]
then
echo "SCM-Server will now be started"
/opt/scm-server/bin/scm-server start
else
echo "SCM-Server already running"
status
fi
}
stop() {
if [ ! $(ps aux | grep java | grep ${appname} | wc -l) = 0 ]
then
echo "SCM-Server will now be stopped"
/opt/scm-server/bin/scm-server stop
else
echo "SCM-Server is not running"
fi
}
status() {
if [ "$(ps auxwww | grep java | grep ${appname} | awk '{ print $1 " PID:" $2 }')" ]; then
echo "SCM-Server is running"
ps auxwww | grep java | grep ${appname} | awk '{ print " PID: " $2 }'
else
echo "SCM-Server is not running"
fi
}
restart() {
stop
SECONDS=0
STAT=$( ps auxwww | grep java | grep ${appname} | wc -l )
while [ $STAT -ne 0 ]
do
echo -n .
sleep 3
if [ $SECONDS -gt 300 ]
then
SCM_PID=$( ps auxwww | grep java | grep ${appname} | awk '{ print $2 }' )
kill -9 $SCM_PID
fi
STAT=$( ps auxwww | grep java | grep ${appname} | wc -l )
done
status
start
status
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL

View File

@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
MIT License
Copyright (c) 2020-present Cloudogu GmbH and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!--
Document : logback.release.xml
Created on : May 9, 2014, 8:36 PM
Author : sdorra
Description:
Purpose of the document follows.
-->
<configuration>
<jmxConfigurator />
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/scm/scm-manager.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>/var/log/scm/scm-manager-%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<append>true</append>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<logger name="sonia.scm" level="INFO" />
<!-- suppress massive gzip logging -->
<logger name="sonia.scm.filter.GZipFilter" level="WARN" />
<logger name="sonia.scm.filter.GZipResponseStream" level="WARN" />
<logger name="sonia.scm.util.ServiceUtil" level="WARN" />
<!-- aether -->
<!--
<logger name="org.sonatype.aether" level="TRACE" />
<logger name="com.ning.http.client" level="DEBUG" />
-->
<!-- svnkit -->
<!--
<logger name="svnkit" level="WARN" />
<logger name="svnkit.network" level="DEBUG" />
<logger name="svnkit.fsfs" level="WARN" />
-->
<!-- javahg -->
<!--
<logger name="com.aragost.javahg" level="DEBUG" />
-->
<!-- ehcache -->
<!--
<logger name="net.sf.ehcache" level="DEBUG" />
-->
<root level="WARN">
<appender-ref ref="FILE" />
</root>
</configuration>