Change Gradle build
This commit is contained in:
Vendored
+14
-20
@@ -1,29 +1,23 @@
|
|||||||
// Build and test project generations with documentation
|
properties([
|
||||||
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '5', artifactNumToKeepStr: '5', daysToKeepStr: '5', numToKeepStr: '5'))])
|
gitLabConnection('IBTP'),
|
||||||
|
])
|
||||||
|
|
||||||
node {
|
node {
|
||||||
stage("Build") {
|
stage("Checkout") {
|
||||||
deleteDir()
|
|
||||||
checkout scm
|
checkout scm
|
||||||
withCredentials([usernamePassword(credentialsId: '201ea374-bda3-4a38-a18a-ccc9c39fb3ff', passwordVariable: 'ORG_GRADLE_PROJECT_nexusPassword', usernameVariable: 'ORG_GRADLE_PROJECT_nexusUsername')]) {
|
|
||||||
sh "chmod +x gradlew"
|
|
||||||
sh "./gradlew clean build asciidoctor -PnexusUrl=https://nexus.ingenieurbuero-peetz.de"
|
|
||||||
}
|
}
|
||||||
withCredentials([usernamePassword(credentialsId: 'IBTPJenkinsBot', passwordVariable: 'TOKEN', usernameVariable: 'CHAT')]) {
|
gitlabBuilds(builds: ["build", "publish"]) {
|
||||||
sh script:"curl -s -X POST https://api.telegram.org/bot$TOKEN/sendMessage -d chat_id=$CHAT -d text='Job ${env.BUILD_TAG} ended successfully, ${env.BUILD_URL}' > /dev/null", returnStatus: true
|
stage("Build") {
|
||||||
|
gitlabCommitStatus("build") {
|
||||||
|
sh "chmod +x gradlew"
|
||||||
|
sh "./gradlew clean build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("Publish Build Results") {
|
stage("Publish Build Results") {
|
||||||
junit allowEmptyResults: true, testResults: '**/build/test-results/**/*.xml'
|
gitlabCommitStatus("publish") {
|
||||||
openTasks canComputeNew: false, defaultEncoding: 'UTF-8', excludePattern: '', healthy: '', high: '', ignoreCase: true, low: '', normal: '', pattern: '*.gradle,**/*.java,**/*.adoc', unHealthy: ''
|
archiveArtifacts allowEmptyArchive: true, artifacts: "build/asciidoc/pdf/*.pdf"
|
||||||
archiveArtifacts allowEmptyArchive: true, artifacts: "build/asciidoc/pdf/generations.pdf"
|
scanForIssues sourceCodeEncoding: 'UTF-8', tool: taskScanner(highTags: 'FIXME', ignoreCase: true, includePattern: 'src/**/*.adoc', normalTags: 'TODO')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stage("Publish HTML") {
|
|
||||||
publishHTML(target: [
|
|
||||||
allowMissing: true,
|
|
||||||
alwaysLinkToLastBuild: true,
|
|
||||||
keepAll: false, reportDir: 'build/asciidoc/html5',
|
|
||||||
reportFiles: "generations.html",
|
|
||||||
reportName: "generations"
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-69
@@ -1,86 +1,49 @@
|
|||||||
buildscript {
|
plugins {
|
||||||
repositories {
|
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
|
||||||
jcenter()
|
id 'org.asciidoctor.jvm.gems' version '3.1.0'
|
||||||
maven {
|
|
||||||
url "https://plugins.gradle.org/m2/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7'
|
|
||||||
//classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.6'
|
|
||||||
classpath ('org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16') {
|
|
||||||
exclude group: 'org.jruby'
|
|
||||||
}
|
|
||||||
classpath 'org.jruby:jruby:9.1.17.0'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'org.asciidoctor.convert'
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
|
||||||
apply plugin: 'checkstyle'
|
description = 'Introduction to documentation'
|
||||||
apply plugin: 'pmd'
|
version = '1.0.0-SNAPSHOT'
|
||||||
apply plugin: 'project-report'
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
|
||||||
jcenter()
|
jcenter()
|
||||||
|
ruby.gems()
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.8
|
|
||||||
group = 'com.ibtp'
|
|
||||||
version = '0.0.1-SNAPSHOT'
|
|
||||||
description = 'Project Generations: Generative Programmierung in Java'
|
|
||||||
|
|
||||||
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
|
|
||||||
|
|
||||||
asciidoctorj {
|
|
||||||
version = '1.6.0-alpha.7'
|
|
||||||
}
|
|
||||||
|
|
||||||
asciidoctor {
|
|
||||||
backends 'html5', 'pdf'
|
|
||||||
attributes 'build-gradle': file('build.gradle'),
|
|
||||||
'source-highlighter': 'coderay',
|
|
||||||
'toc': 'left',
|
|
||||||
'toc-title': 'Inhaltsverzeichnis',
|
|
||||||
'revdate': BUILD_DATE,
|
|
||||||
'revnumber': version,
|
|
||||||
'idprefix': 'id_',
|
|
||||||
'chapter-label': '',
|
|
||||||
'icons': 'font',
|
|
||||||
'setanchors': '',
|
|
||||||
'idseparator': '-',
|
|
||||||
'endpoint-url': 'http://www.ingenieurbuero-peetz.de',
|
|
||||||
'imagesdir': './images',
|
|
||||||
'docinfo1': ''
|
|
||||||
}
|
|
||||||
|
|
||||||
build.dependsOn(['asciidoctor'])
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'org.slf4j:slf4j-api:1.7.22'
|
asciidoctorGems 'rubygems:rouge:3.15.0'
|
||||||
testCompile 'junit:junit:4.12'
|
|
||||||
testCompile 'org.mockito:mockito-all:1.9.5'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkstyle {
|
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
|
||||||
ignoreFailures = true
|
final DOK_VERSION = version
|
||||||
showViolations = false
|
|
||||||
}
|
|
||||||
|
|
||||||
pmd {
|
asciidoctorPdf {
|
||||||
ignoreFailures = true
|
dependsOn asciidoctorGemsPrepare
|
||||||
ruleSets = ["basic", "braces", "junit"]
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
baseDirFollowsSourceFile()
|
||||||
manifest {
|
|
||||||
attributes 'Implementation-Title': 'Generations', 'Implementation-Version': version
|
asciidoctorj {
|
||||||
|
attributes 'build-gradle': file('build.gradle'),
|
||||||
|
'revdate': BUILD_DATE,
|
||||||
|
'revnumber': DOK_VERSION,
|
||||||
|
'endpoint-url': 'http://www.ingenieurbuero-peetz.de',
|
||||||
|
'imagesdir': './images',
|
||||||
|
'toc-title': 'Inhaltsverzeichnis',
|
||||||
|
'chapter-label': '',
|
||||||
|
'icons': 'font',
|
||||||
|
'idprefix': 'id_',
|
||||||
|
'idseparator': '-',
|
||||||
|
'setanchors': '',
|
||||||
|
'docinfo1': ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper {
|
task asciidoctor(dependsOn: asciidoctorPdf)
|
||||||
gradleVersion = "5.6.1"
|
build.dependsOn(['asciidoctor'])
|
||||||
}
|
|
||||||
|
|
||||||
|
wrapper {
|
||||||
|
gradleVersion = "6.3"
|
||||||
|
}
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|||||||
else
|
else
|
||||||
eval `echo args$i`="\"$arg\""
|
eval `echo args$i`="\"$arg\""
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=`expr $i + 1`
|
||||||
done
|
done
|
||||||
case $i in
|
case $i in
|
||||||
(0) set -- ;;
|
0) set -- ;;
|
||||||
(1) set -- "$args0" ;;
|
1) set -- "$args0" ;;
|
||||||
(2) set -- "$args0" "$args1" ;;
|
2) set -- "$args0" "$args1" ;;
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -175,14 +175,9 @@ save () {
|
|||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
echo " "
|
echo " "
|
||||||
}
|
}
|
||||||
APP_ARGS=$(save "$@")
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
Vendored
+3
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
|||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
= Entwicklungshandbuch: Projekt generations
|
||||||
|
:author: Thomas Peetz
|
||||||
|
:email: <thomas.peetz@ingenieurbuero-peetz.de>
|
||||||
|
:doctype: article
|
||||||
|
:toc:
|
||||||
|
:sectnums:
|
||||||
|
|
||||||
|
== Allgemeines
|
||||||
|
|
||||||
|
=== Zweck des Dokumentes
|
||||||
|
|
||||||
|
Das Entwicklungshandbuch beschreibt die Werkzeuge und die Vorgehensweise bei der Entwicklung
|
||||||
|
im Projekt generations und der Erstellung der Dokumentation.
|
||||||
|
|
||||||
|
=== Verwendete Tools
|
||||||
|
|
||||||
|
==== Gitlab
|
||||||
|
|
||||||
|
Für die Verwaltung des Sourcecode kommt ((Gitlab))<<2>> zum Einsatz.
|
||||||
|
Mit Gitlab werden auch die Projektaufgaben verwaltet.
|
||||||
|
|
||||||
|
Das Projekt und das dazugehörige Git Repository sind unter der Adresse
|
||||||
|
|
||||||
|
https://gitlab.ingenieurbuero-peetz.de/tpeetz/generations
|
||||||
|
|
||||||
|
zu finden.
|
||||||
|
|
||||||
|
==== Jenkins
|
||||||
|
|
||||||
|
Zur automatischen Erstellung der Dokumentation und Anwendung wird ((Jenkins))<<4>> als Buildserver integriert.
|
||||||
|
|
||||||
|
Zur Ermittlung der Projekte und Branches ist das Plugin `Gitlab Branch Source` installiert und für die Gruppe `tpeetz` konfiguriert.
|
||||||
|
Die Konfiguration des Jenkins Jobs wird über ein `Jenkinsfile` gesteuert.
|
||||||
|
Für jeden Branch der Projekte, das ein Jenkinsfile enthält, wird ein Jenkins Job erzeugt.
|
||||||
|
Merge Requests und Tags erzeugen ebenfalls Jenkins Jobs.
|
||||||
|
|
||||||
|
Das Projekt kann unter
|
||||||
|
|
||||||
|
https://jenkins.ingenieurbuero-peetz.de/job/its-people/job/its-people%252Fdevops-ki-playground/
|
||||||
|
|
||||||
|
gefunden werden.
|
||||||
|
|
||||||
|
== Erstellung der Dokumentation
|
||||||
|
|
||||||
|
Die Dokumentation des Projektes wird mit ((Asciidoctor))<<1>> geschrieben.
|
||||||
|
Die Dokumente erhalten ihre Namen nach dem jeweiligen Hauptdokument.
|
||||||
|
|
||||||
|
=== Quellcode Verwaltung
|
||||||
|
|
||||||
|
Die Asciidoctor-Dateien haben die Endung `.adoc`.
|
||||||
|
|
||||||
|
=== Buildsystem
|
||||||
|
|
||||||
|
Zur Erstellung der PDF-Dateien aus den Asciidoctor-Dateien wird das Buildsystem ((Gradle))<<3>> verwendet.
|
||||||
|
Die Dateien für die Dokumente liegen im Verzeichnis `src/docs/asciidoc`.
|
||||||
|
|
||||||
|
Der Gradle Build wird über die Datei `build.gradle` definiert.
|
||||||
|
|
||||||
|
[index]
|
||||||
|
== Index
|
||||||
|
|
||||||
|
[bibliography]
|
||||||
|
== Referenzen
|
||||||
|
|
||||||
|
- [[[phb]]] Thomas Peetz. Projekthandbuch: Projekt generations. 2020.
|
||||||
|
- [[[1]]] http://asciidoctor.org
|
||||||
|
- [[[2]]] http://www.gitlab.org
|
||||||
|
- [[[3]]] http://www.gradle.org
|
||||||
|
- [[[4]]] http://jenkins-ci.org
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
= Projekthandbuch: Projekt generations
|
||||||
|
:author: Thomas Peetz
|
||||||
|
:email: <thomas.peetz@ingenieurbuero-peetz.de>
|
||||||
|
:doctype: book
|
||||||
|
:toc: left
|
||||||
|
:sectnums:
|
||||||
|
|
||||||
|
== Zweck des Dokumentes
|
||||||
|
|
||||||
|
Das Projekthandbuch beinhaltet die Informationen zum Projekt generations.
|
||||||
|
|
||||||
|
== Projektbeschreibung
|
||||||
|
|
||||||
|
=== Ausgangslage
|
||||||
|
|
||||||
|
|
||||||
|
//==== Rechtliche Vorgaben und Rahmenbedingungen
|
||||||
|
//=== Rahmenbedingungen
|
||||||
|
|
||||||
|
//==== Vorhandene Regelungen
|
||||||
|
|
||||||
|
=== Projektziele
|
||||||
|
|
||||||
|
=== Projektabgrenzung
|
||||||
|
|
||||||
|
//=== Voraussichtliche Kosten
|
||||||
|
|
||||||
|
//=== Projektrisiken
|
||||||
|
|
||||||
|
//==== Produktivität
|
||||||
|
|
||||||
|
//==== Finanzielle Risiken
|
||||||
|
|
||||||
|
//==== Akzeptanz
|
||||||
|
|
||||||
|
== Projektorganisation
|
||||||
|
|
||||||
|
=== Projekt-Aufbauorganisation
|
||||||
|
|
||||||
|
=== Rollendefinition
|
||||||
|
|
||||||
|
//==== Projektauftraggeber
|
||||||
|
|
||||||
|
//==== Projektausschuss
|
||||||
|
|
||||||
|
//==== Beratung / Qualitätssicherung
|
||||||
|
|
||||||
|
==== Projekteiter
|
||||||
|
|
||||||
|
==== Projektteam
|
||||||
|
|
||||||
|
==== Liste der Stakeholder
|
||||||
|
|
||||||
|
=== Projektablauforganisation
|
||||||
|
|
||||||
|
==== Projekt-Phasen
|
||||||
|
|
||||||
|
===== Erstellung der Projektdokumentation
|
||||||
|
|
||||||
|
|
||||||
|
== Verschiedenes
|
||||||
|
|
||||||
|
=== Erreichbarkeiten
|
||||||
|
|
||||||
|
[glossary]
|
||||||
|
== Glossar
|
||||||
|
|
||||||
|
KI:: Künstliche Intelligenz
|
||||||
|
ML:: Machine Learning
|
||||||
|
|
||||||
|
[index]
|
||||||
|
== Index
|
||||||
|
|
||||||
|
[bibliography]
|
||||||
|
== Referenzen
|
||||||
|
|
||||||
|
- [[[ehb]]] Thomas Peetz. Entwicklungshandbuch: Projekt Generations. 2020.
|
||||||
|
- [[[1]]] http://asciidoctor.org
|
||||||
|
- [[[2]]] http://www.gitlab.org
|
||||||
|
- [[[3]]] http://www.gradle.org
|
||||||
Reference in New Issue
Block a user