Skip to content

Commit

Permalink
Merge pull request 'release_1.0.0' (#2) from release_1.0.0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Aug 20, 2024
2 parents a595432 + 9da2d21 commit 1b0a1e4
Show file tree
Hide file tree
Showing 208 changed files with 8,199 additions and 2,588 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/develop-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Development Build

permissions:
contents: write

on:
push:
branches:
- 'develop'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Maven cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean verify -U -P snapshot-build
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %Z')"
- name: Create tag name from date
id: tagdate
run: echo "::set-output name=tagdate::$(date +'%Y-%m-%d_%H-%M-%S_%Z')"
- name: Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.date.outputs.date }}
tag_name: ${{ steps.tagdate.outputs.tagdate }}
generate_release_notes: true
draft: false
prerelease: true
files: |
module-*/target/*.jar
module-core/src/main/resources/application.properties
install/*
migration/**
42 changes: 42 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Release Build

permissions:
contents: write

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Maven cache
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean verify -U -P release-build
- name: Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
generate_release_notes: true
draft: false
prerelease: false
files: |
module-*/target/*.jar
module-core/src/main/resources/application.properties
install/*
migration/**
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
*.log

### STS ###
.apt_generated
Expand Down Expand Up @@ -35,3 +36,4 @@ build/

### Python ###
/migration/vmenv
__pycache__/
144 changes: 144 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
pipeline {

agent {
docker {
/* using a custom build image with a defined home directory for UID 1000 among other things */
image 'nexus.intranda.com:4443/maven:3.9.3-eclipse-temurin-17'
registryUrl 'https://nexus.intranda.com:4443'
registryCredentialsId 'jenkins-docker'
args '-v $HOME/.m2:/var/maven/.m2:z -v $HOME/.config:/var/maven/.config -v $HOME/.sonar:/var/maven/.sonar -u 1000 -ti -e _JAVA_OPTIONS=-Duser.home=/var/maven -e MAVEN_CONFIG=/var/maven/.m2'
}
}

options {
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '15', daysToKeepStr: '90', numToKeepStr: '')
disableConcurrentBuilds()
}

stages {
stage('prepare') {
steps {
sh 'git reset --hard HEAD && git clean -fdx'
}
}
stage('build-snapshot') {
when {
not {
anyOf {
branch 'master'
branch 'release_*'
branch 'hotfix_release_*'
allOf {
branch 'PR-*'
expression { env.CHANGE_BRANCH.startsWith("release_") }
}
}
}
}
steps {
sh 'mvn clean verify -U -P snapshot-build'
}
}
stage('build-release') {
when {
anyOf {
branch 'master'
branch 'release_*'
branch 'hotfix_release_*'
allOf {
branch 'PR-*'
expression { env.CHANGE_BRANCH.startsWith("release_") }
}
}
}
steps {
sh 'mvn clean verify -U -P release-build'
}
}
/*stage('sonarcloud') {
when {
anyOf {
branch 'master'
branch 'release_*'
branch 'hotfix_release_*'
branch 'sonar_*'
allOf {
branch 'PR-*'
expression { env.CHANGE_BRANCH.startsWith("release_") }
}
}
}
steps {
withCredentials([string(credentialsId: 'jenkins-sonarcloud', variable: 'TOKEN')]) {
sh 'mvn verify sonar:sonar -Dsonar.token=$TOKEN -U'
}
}
}*/
stage('deploy') {
when {
anyOf {
branch 'master'
branch 'develop'
branch 'hotfix_release_*'
}
}
steps {
sh 'mvn -f module-exchange/pom.xml deploy -U'
}
}
stage('tag release') {
when {
anyOf {
branch 'master'
branch 'hotfix_release_*'
}
}
steps {
withCredentials([gitUsernamePassword(credentialsId: '93f7e7d3-8f74-4744-a785-518fc4d55314',
gitToolName: 'git-tool')]) {
sh '''#!/bin/bash -xe
projectversion=$(mvn org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate -Dexpression=project.version -q -DforceStdout)
if [ $? != 0 ]
then
exit 1
elif [[ "${projectversion}" =~ "SNAPSHOT" ]]
then
echo "This is a SNAPSHOT version"
exit 1
fi
echo "${projectversion}"
git tag -a "v${projectversion}" -m "releasing v${projectversion}" && git push origin v"${projectversion}"
'''
}
}
}
}
post {
always {
junit "**/target/surefire-reports/*.xml"
step([
$class : 'JacocoPublisher',
execPattern : 'target/jacoco.exec',
classPattern : 'target/classes/',
sourcePattern : 'src/main/java',
exclusionPattern : '**/*Test.class'
])
recordIssues (
enabledForFailure: true, aggregatingResults: false,
tools: [checkStyle(pattern: 'target/checkstyle-result.xml', reportEncoding: 'UTF-8')]
)
}
success {
archiveArtifacts artifacts: 'module-*/target/*.jar, install/*, module-core/src/main/resources/application.properties, migration/**', fingerprint: true
}
changed {
emailext(
subject: '${DEFAULT_SUBJECT}',
body: '${DEFAULT_CONTENT}',
recipientProviders: [requestor(),culprits()],
attachLog: true
)
}
}
}
/* vim: set ts=2 sw=2 tw=120 et :*/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Vocabulary Server

The documentation for the vocabulary server can be found here:

- [English Documentation](docs/en/README.md)
- [German Documentation](docs/de/README.md)
11 changes: 11 additions & 0 deletions docs/de/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Dokumentation
Dieses Dokument beschreibt alles Wichtige rund um den neuen Vokabularserver. Früher waren Vokabulare Teil von Goobi Workflow und wurden in der Datenbank `goobi` gespeichert. Jetzt ist alles, was mit Vokabularen zu tun hat, in eine neue, eigenständige Anwendung, den Vokabularserver, umgezogen. Der Vokabularserver benötigt eine eigene Datenbank, um alle Daten zu speichern, und ermöglicht den Zugriff auf die Vokabulare und Datensätze über eine REST-API. Goobi Workflow wurde aktualisiert, um den neuen Vokabularserver anstelle seiner eigenen, eingebetteten Vokabulare zu verwenden. Falls gewünscht, kann der Vokabularserver im Gegensatz zur Goobi Workflow-Instanz öffentlich zugänglich sein. Wenn Sie bereits vorher Vokabulare verwendet haben, lesen Sie bitte die Migrationsanleitung in dieser Dokumentation, um Ihre Daten auf den neuen Vokabularserver zu übertragen.

## Installation
Bevor Sie den neuen Vokabularserver nutzen können, folgen Sie den [Installations Anweisungen](setup.md).

## Vokabularerstellung
Vokabulare und Vokabularschemata sind ein komplexes Thema für sich, daher wird die [Dokumentation der Erstellung von Vokabularen, Schemata und Feldtypen](creation.md) separat behandelt.

## Datenmigration existierender Vokabulare
Wenn Sie bestehende Vokabulare aus früheren Versionen von Goobi migrieren wollen, folgen Sie bitte der [Dokumentation der Datenmigration](migration.md).
7 changes: 7 additions & 0 deletions docs/de/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Table of contents
* [Übersicht](README.md)

## Administration <a id="administration"></a>
* [Installation](setup.md)
* [Datenmigration](migration.md)
* [Vocabular- und Schemaerstellung](creation.md)
Loading

0 comments on commit 1b0a1e4

Please sign in to comment.