Change Gradle build
This commit is contained in:
Vendored
+14
-20
@@ -1,29 +1,23 @@
|
||||
// Build and test project generations with documentation
|
||||
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '5', artifactNumToKeepStr: '5', daysToKeepStr: '5', numToKeepStr: '5'))])
|
||||
properties([
|
||||
gitLabConnection('IBTP'),
|
||||
])
|
||||
|
||||
node {
|
||||
stage("Build") {
|
||||
deleteDir()
|
||||
stage("Checkout") {
|
||||
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')]) {
|
||||
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
|
||||
gitlabBuilds(builds: ["build", "publish"]) {
|
||||
stage("Build") {
|
||||
gitlabCommitStatus("build") {
|
||||
sh "chmod +x gradlew"
|
||||
sh "./gradlew clean build"
|
||||
}
|
||||
}
|
||||
stage("Publish Build Results") {
|
||||
junit allowEmptyResults: true, testResults: '**/build/test-results/**/*.xml'
|
||||
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/generations.pdf"
|
||||
gitlabCommitStatus("publish") {
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: "build/asciidoc/pdf/*.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 {
|
||||
repositories {
|
||||
jcenter()
|
||||
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'
|
||||
}
|
||||
plugins {
|
||||
id 'org.asciidoctor.jvm.pdf' version '3.1.0'
|
||||
id 'org.asciidoctor.jvm.gems' version '3.1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'org.asciidoctor.convert'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'checkstyle'
|
||||
apply plugin: 'pmd'
|
||||
apply plugin: 'project-report'
|
||||
|
||||
description = 'Introduction to documentation'
|
||||
version = '1.0.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
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 {
|
||||
compile 'org.slf4j:slf4j-api:1.7.22'
|
||||
testCompile 'junit:junit:4.12'
|
||||
testCompile 'org.mockito:mockito-all:1.9.5'
|
||||
asciidoctorGems 'rubygems:rouge:3.15.0'
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
ignoreFailures = true
|
||||
showViolations = false
|
||||
}
|
||||
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
|
||||
final DOK_VERSION = version
|
||||
|
||||
pmd {
|
||||
ignoreFailures = true
|
||||
ruleSets = ["basic", "braces", "junit"]
|
||||
}
|
||||
asciidoctorPdf {
|
||||
dependsOn asciidoctorGemsPrepare
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'Generations', 'Implementation-Version': version
|
||||
baseDirFollowsSourceFile()
|
||||
|
||||
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 {
|
||||
gradleVersion = "5.6.1"
|
||||
}
|
||||
task asciidoctor(dependsOn: asciidoctorPdf)
|
||||
build.dependsOn(['asciidoctor'])
|
||||
|
||||
wrapper {
|
||||
gradleVersion = "6.3"
|
||||
}
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
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
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -175,14 +175,9 @@ save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# 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"
|
||||
|
||||
# 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" "$@"
|
||||
|
||||
Vendored
+3
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
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.
|
||||
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