Skip to content

Commit 47fdc40

Browse files
authored
Merge pull request #340 from OPUS4/4.7
Release OPUS 4.7
2 parents e63a976 + 4c984d0 commit 47fdc40

File tree

1,473 files changed

+74300
-29026
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,473 files changed

+74300
-29026
lines changed

.github/workflows/php.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: PHP Composer
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-16.04
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Change to PHP7.0
14+
run: sudo update-alternatives --set php /usr/bin/php7.0
15+
16+
- name: Install Composer and Dependencies
17+
run: sudo apt-get update && curl -s http://getcomposer.org/installer | php && php composer.phar self-update && php composer.phar install
18+
19+
- name: Install additional Software
20+
run: sudo apt-get install libxml2-utils
21+
22+
- name: Solr
23+
run: sudo bash bin/install_solr_docker.sh
24+
25+
- name: MySQL
26+
run: sudo bash bin/install_mysql_docker.sh
27+
28+
- name: Prepare
29+
run: ant prepare-workspace prepare-test-workspace prepare-javascript prepare-config lint reset-testdata -DdbUserPassword=root -DdbAdminPassword=root
30+
31+
- name: Mail-Server
32+
run: php scripts/opus-smtp-dumpserver.php 2>&1 >> tests/workspace/log/opus-smtp-dumpserver.log &
33+
34+
- name: Coding-Style
35+
run: php composer.phar cs-check
36+
37+
- name: Test-library
38+
run: php composer.phar test -- --testsuite library
39+
40+
- name: Test-modules
41+
run: php composer.phar test -- --testsuite modules
42+
43+
- name: Test-admin
44+
run: php composer.phar test -- --testsuite admin
45+
46+
- name: Test-security
47+
run: php composer.phar test -- --testsuite security
48+
49+
- name: Test-scripts
50+
run: php composer.phar test -- --testsuite scripts

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ opus4-solr-jetty.conf
3939

4040
# IDE files
4141
.idea
42+
out
4243
*.iml
4344
nbproject

.travis.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,28 @@ script:
2525
- mysql --version
2626
- java -version
2727
- ant -version
28+
- travis_fold start "prepare_dependencies"
2829
- ant prepare-test-workspace prepare-workspace prepare-config -DdbUserName=root -DdbAdminName=root
29-
- php db/createdb.php
30-
- mysql opusdb -u root --password='' -e 'SELECT * FROM schema_version'
31-
- ant download-solr -DsolrVersion=5.5.5
32-
- cd solr-5.5.5
30+
- ant download-solr -DsolrVersion=7.7.2 -DdownloadDir=$HOME/downloads
31+
- cd solr-7.7.2
3332
- ./bin/solr start
3433
- ./bin/solr create -c opus4
3534
- cd server/solr/opus4/conf
3635
- rm -f managed-schema schema.xml solrconfig.xml
37-
- ln -s ../../../../../vendor/opus4-repo/search/schema-5.xml schema.xml
38-
- ln -s ../../../../../vendor/opus4-repo/search/solrconfig-5.xml solrconfig.xml
36+
- ln -s "$TRAVIS_BUILD_DIR/vendor/opus4-repo/search/conf/schema.xml" schema.xml
37+
- ln -s "$TRAVIS_BUILD_DIR/vendor/opus4-repo/search/conf/solrconfig.xml" solrconfig.xml
3938
- cd ../../../../
4039
- ./bin/solr restart
4140
- cd ..
41+
- travis_fold end "prepare_dependencies"
42+
- travis_fold start "prepare_testing"
4243
- ant reset-testdata
43-
- ./vendor/bin/phpunit --configuration ./tests/phpunit.xml ./tests/modules
44+
- travis_fold end "prepare_testing"
45+
- mysql opusdb -u root --password='' -e 'SELECT * FROM schema_version'
46+
- composer cs-check
47+
- ./vendor/bin/phpunit --configuration ./tests/phpunit.xml --no-coverage --testsuite library
48+
- ./vendor/bin/phpunit --configuration ./tests/phpunit.xml --no-coverage --testsuite modules
49+
- ./vendor/bin/phpunit --configuration ./tests/phpunit.xml --no-coverage --testsuite admin
50+
- ./vendor/bin/phpunit --configuration ./tests/phpunit.xml --no-coverage --testsuite security
51+
- php ./scripts/opus-smtp-dumpserver.php 2>&1 >>./opus-smtp-dumpserver.log &
52+
- ./vendor/bin/phpunit --configuration ./tests/phpunit.xml --no-coverage --testsuite scripts

CHANGES.md

Lines changed: 301 additions & 0 deletions
Large diffs are not rendered by default.

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM ubuntu:16.04
2+
3+
# Add opus4 user, because in the Jenkinsfile we are root. Some tests dont work with root, so we need to start them with opus4-user
4+
RUN useradd opus4
5+
6+
# The parts of the script are combined by &&. If something changes, always the update of the system is done, to find new packages or versions.
7+
# Update Ubuntu
8+
RUN apt-get update\
9+
10+
# Install system-packages
11+
&& apt-get install -y debconf-utils\
12+
composer\
13+
curl\
14+
openjdk-8-jdk\
15+
wget\
16+
unzip\
17+
ant\
18+
apache2\
19+
libxml2-utils\
20+
libapache2-mod-php7.0\
21+
sudo \
22+
23+
# Install PHP
24+
&& apt-get install -y php\
25+
php-cli\
26+
php-dev\
27+
php-mbstring\
28+
php-mysql\
29+
php-curl\
30+
php-gd\
31+
php-common\
32+
php-intl\
33+
php-zip\
34+
php-uuid\
35+
php-xsl\
36+
php-log\
37+
php-mcrypt

Jenkinsfile

Lines changed: 117 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,134 @@
1-
#!groovy
1+
// Jenkinsfile for the application
22

3+
// Define the project name and the build type. A short build dispenses with coverage, since coverage is very time-consuming
4+
def jobNameParts = JOB_NAME.tokenize('/') as String[]
5+
def projectName = jobNameParts[0]
6+
def buildType = "short"
7+
8+
// If the project has "night" in its name and the master branch or the development branch is present, the build is defined as a long build
9+
if (projectName.contains('night') && (env.BRANCH_NAME == '4.7' || env.BRANCH_NAME == 'master')) {
10+
buildType = "long"
11+
}
312
pipeline {
4-
agent any
13+
/*
14+
Agent (location where the pipeline is executed) is the docker file.
15+
This must have root privileges, because MySQL and Solr must be installed.
16+
Also, creating a docker on the server requires root privileges.
17+
Furthermore, the docker socket of the server must be connected to the docker socket of the docker.
18+
*/
19+
agent { dockerfile {args "-u root -v /var/run/docker.sock:/var/run/docker.sock"}}
20+
environment {XML_CATALOG_FILES = "${WORKSPACE}/tests/resources/opus4-catalog.xml"}
21+
22+
/*
23+
A long build will not be built on every commit because of the long duration, but will be time-triggered.
24+
Coverage takes so long that it is only built once a week for the development branch and the master branch
25+
*/
26+
triggers {
27+
cron( buildType.equals('long') ? 'H 21 * * 5' : '')
28+
}
529

630
stages {
7-
stage('prepare') {
31+
stage('Composer') {
32+
steps {
33+
// Update Operating system
34+
sh 'sudo apt-get update'
35+
36+
// Install and update Composer. Additionally install dependencies of OPUS4-Application
37+
sh 'curl -s http://getcomposer.org/installer | php && php composer.phar self-update && php composer.phar install'
38+
}
39+
}
40+
41+
stage('Install Solr') {
42+
steps {
43+
sh 'sudo bash bin/install_solr_docker.sh'
44+
}
45+
}
46+
47+
stage('Install MySQL') {
48+
steps {
49+
sh 'sudo bash bin/install_mysql_docker.sh'
50+
}
51+
}
52+
53+
stage('Prepare Opus4') {
854
steps {
9-
echo 'TODO - Configure database'
10-
echo 'TODO - Configure Solr core'
55+
// Prepare OPUS4 with ant using standard passwords (only test-system)
56+
sh 'ant prepare-workspace prepare-test-workspace prepare-javascript prepare-config lint -DdbUserPassword=root -DdbAdminPassword=root'
57+
58+
// Install XDebug with Pecl -> Using apt-get would install a old version
59+
sh 'pecl install xdebug-2.8.0 && echo "zend_extension=/usr/lib/php/20151012/xdebug.so" >> /etc/php/7.0/cli/php.ini'
60+
61+
// Install Mail-Server for mailing-tests
62+
sh 'php ${WORKSPACE}/scripts/opus-smtp-dumpserver.php 2>&1 >> ${WORKSPACE}/tests/workspace/log/opus-smtp-dumpserver.log &'
63+
sh 'chown -R opus4:opus4 .'
1164
}
1265
}
1366

14-
stage('build') {
67+
stage('Analyse') {
1568
steps {
16-
echo 'TODO - Run unit tests'
69+
script{
70+
sh 'php composer.phar analysis'
71+
}
1772
}
1873
}
1974

20-
stage('publish') {
75+
stage('Test') {
2176
steps {
22-
echo 'TODO - Publish results'
77+
script{
78+
sh 'ant reset-testdata'
79+
if (buildType == 'long'){
80+
sh 'php composer.phar test-coverage'
81+
} else {
82+
sh 'php composer.phar test'
83+
}
84+
}
2385
}
2486
}
2587
}
88+
89+
post {
90+
always {
91+
/*
92+
For the cleanup the entire workspace is deleted.
93+
This reduces the server load, since Jenkins does not track the workspaces unnecessarily.
94+
It may be possible to turn off tracking, but I couldn't find an option.
95+
Jenkins must have permissions to delete the workspaces.
96+
*/
97+
sh "chmod -R 777 ."
98+
99+
// Publishing test-results (unit-tests)
100+
step([
101+
$class: 'JUnitResultArchiver',
102+
testResults: 'build/phpunit.xml'
103+
])
104+
105+
// Publishing checkstyle-results (coding-style)
106+
step([
107+
$class: 'hudson.plugins.checkstyle.CheckStylePublisher',
108+
pattern: 'build/checkstyle.xml'
109+
])
110+
111+
// Publishing CPD-results (find duplicated code-fragments)
112+
step([
113+
$class: 'hudson.plugins.dry.DryPublisher',
114+
pattern: 'build/pmd-cpd.xml'
115+
])
116+
117+
// Publishing PMD-results (static codeanalysis)
118+
step([
119+
$class: 'hudson.plugins.pmd.PmdPublisher',
120+
pattern: 'build/pmd.xml'
121+
])
122+
123+
// Publishing coverage-report if exists
124+
step([
125+
$class: 'CloverPublisher',
126+
cloverReportDir: 'build',
127+
cloverReportFileName: 'clover.xml"'
128+
])
129+
130+
// Cleanup
131+
step([$class: 'WsCleanup', externalDelete: 'rm -rf *'])
132+
}
133+
}
26134
}

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,46 @@ redevelopment that was created as part of a DFG ([Deutsche Forschungsgemeinschaf
77
Since then the development has been continued at KOBV ([Kooperativer Bibliotheksverbund Berlin-Brandenburg][KOBV])
88
mostly.
99

10-
## OPUS 4 at GitHub
10+
## OPUS 4.7-RC (Release Candidate)
1111

12-
In 2015 the development was moved to GitHub in order to better support collaboration in the continued development
13-
efforts. The first OPUS 4 version developed at GitHub is 4.5. Starting with this version OPUS 4 should be installed
14-
using Git, since this will make updates for bug fixes and new features easier. More information can be found online.
12+
The release candidate should be used to test updating OPUS 4 instances and giving feedback to the developers
13+
[here][ISSUES] or using the OPUS 4 [tester mailing list][OPUSTESTER]. Thank you very much!
14+
15+
The release candidate is available on the [4.7-RC][BRANCH47RC] branch.
16+
17+
Depending on the level of customization of your instance the update might require some work. A lot of files were
18+
changed and the list of new features and modifications is long.
19+
20+
We are still working on a number of issues before we can release the final version of OPUS 4.7. Here some of the
21+
most important points.
22+
23+
- Configuration of search facettes for enrichments
24+
- Translation management in Setup area of administration
25+
- Update issues (?)
26+
- Documentation is outdated and needs to be updated (especially customizing translations)
1527

16-
The current version of OPUS is 4.5. It is available using the 4.5 tag and on the master branch. The master branch
17-
will be updated for releases or if urgent bugs have been fixed.
28+
## Current Version - OPUS 4.6.3
29+
30+
The current version of OPUS 4 is 4.6.3. It is available on the [master][MASTER] branch.
1831

1932
[Documentation][DOC]
2033
: Information on setting up a repository, for users and administrators.
2134

2235
[Developers][DEVDOC]
2336
: Information for developers.
2437

38+
## OPUS 4 at GitHub
39+
40+
In 2015 the development was moved to GitHub in order to better support collaboration in the continued development
41+
efforts. The first OPUS 4 version developed at GitHub is 4.5. Starting with this version OPUS 4 should be installed
42+
using Git, since this will make updates for bug fixes and new features easier. More information can be found online.
43+
2544
## Previous (non-GitHub) Version:
2645

2746
The last non-Git release of OPUS 4 is Version 4.4.5 and can be [downloaded][OPUS445] from the
2847
[OPUS 4 Homepage][OPUS4] as a tarball. The [documentation][OPUS445DOC] for this version can
29-
be found there as well.
48+
be found there as well. This version is no longer supported.
49+
3050
Version 4.4.5 can be installed without Git. It is recommended to use the GitHub version of
3151
OPUS 4 for setting up new repositories. However if you are looking at migrating an existing OPUS 3
3252
repository to OPUS 4 using this version would currently be a necessary step since there is at the moment
@@ -39,3 +59,7 @@ no working migration script for the Git version.
3959
[DFG]: http://www.dfg.de
4060
[OPUS445]: https://www.kobv.de/entwicklung/software/opus-4/download/
4161
[OPUS445DOC]: https://www.kobv.de/entwicklung/software/opus-4/dokumentation/
62+
[OPUSTESTER]: http://listserv.zib.de/mailman/listinfo/kobv-opus-tester/
63+
[ISSUES]: http://github.com/OPUS4/application/issues
64+
[BRANCH47RC]: https://github.com/OPUS4/application/tree/4.7-RC
65+
[MASTER]: https://github.com/OPUS4/application/tree/master

0 commit comments

Comments
 (0)