-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raphael Pionke
authored and
Raphael Pionke
committed
Dec 13, 2018
0 parents
commit 3b72390
Showing
98 changed files
with
14,329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
|
||
[*.{java,xml}] | ||
indent_size = 4 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
target/* | ||
.settings/* | ||
.classpath | ||
.project | ||
.idea | ||
*.iml | ||
/target | ||
.sts4-cache/ | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
_site/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
language: java | ||
jdk: oraclejdk8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "Debug (Launch)-PetClinicApplication<spring-petclinic>", | ||
"request": "launch", | ||
"cwd": "${workspaceFolder}", | ||
"console": "internalConsole", | ||
"stopOnEntry": false, | ||
"mainClass": "org.springframework.samples.petclinic.PetClinicApplication", | ||
"projectName": "spring-petclinic", | ||
"args": "" | ||
}, | ||
{ | ||
"type": "java", | ||
"name": "Debug (Attach)", | ||
"request": "attach", | ||
"hostName": "localhost", | ||
"port": 0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"java.configuration.updateBuildConfiguration": "interactive" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "verify", | ||
"type": "shell", | ||
"command": "mvn -B verify", | ||
"group": "build" | ||
}, | ||
{ | ||
"label": "test", | ||
"type": "shell", | ||
"command": "mvn -B test", | ||
"group": "test" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM openjdk:8-jre-slim | ||
MAINTAINER T-Systems-MMS APM | ||
|
||
COPY /target/spring-petclinic-2.0.0.BUILD-SNAPSHOT.jar /opt/spring-petclinic.jar | ||
CMD ["java","-jar","/opt/spring-petclinic.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
#!/usr/bin/env groovy | ||
def dockerImage | ||
|
||
def tagMatchRules = [ | ||
[ | ||
meTypes: [ | ||
[meType: 'SERVICE'] | ||
], | ||
tags : [ | ||
[context: 'CONTEXTLESS', key: 'Frontend'] | ||
] | ||
], [ | ||
meTypes: [ | ||
[meType: 'SERVICE'] | ||
], | ||
tags : [ | ||
[context: 'CONTEXTLESS', key: 'Database'] | ||
] | ||
] | ||
] | ||
|
||
pipeline { | ||
agent { | ||
label 'docker' | ||
} | ||
options { | ||
ansiColor('xterm') | ||
timestamps() | ||
timeout(30) | ||
disableConcurrentBuilds() | ||
buildDiscarder logRotator(numToKeepStr: '25') | ||
} | ||
triggers { | ||
cron '@daily' | ||
} | ||
|
||
stages { | ||
stage('Maven Build') { | ||
steps { | ||
script { | ||
docker.image('maven:3-jdk-8-slim').inside { | ||
sh 'mvn clean package --batch-mode' | ||
} | ||
} | ||
// publishCoverage adapters: [jacocoAdapter('target/jacoco.exec')] | ||
// findbugs pattern: '**/target/findbugsXml.xml' | ||
// checkstyle pattern: '**/target/checkstyle-result.xml' | ||
// junit allowEmptyResults: true, testResults: '**/target/surefire-reports/**/*.xml' | ||
archiveArtifacts artifacts: '**/target/*.jar,**/target/*.war', fingerprint: true | ||
} | ||
} | ||
stage('Docker Build') { | ||
steps { | ||
script { | ||
dockerImage = docker.build('spring-petclinic:latest') | ||
} | ||
} | ||
} | ||
stage('Deploy to Staging Server') { | ||
steps { | ||
createDynatraceDeploymentEvent(envId: 'Dynatrace Demo Environment', tagMatchRules: tagMatchRules) { | ||
sh 'docker-compose down' | ||
sh 'docker-compose up -d' | ||
} | ||
} | ||
} | ||
stage('Performance Test') { | ||
steps { | ||
recordDynatraceSession(envId: 'Dynatrace Demo Environment', testCase: 'loadtest', tagMatchRules: tagMatchRules) { | ||
performanceTest(readFile('performanceTest.json')) | ||
} | ||
perfSigDynatraceReports envId: 'Dynatrace Demo Environment', specFile: 'specfile.json', nonFunctionalFailure: 2 | ||
} | ||
} | ||
stage('Docker Push') { | ||
steps { | ||
script { | ||
docker.withRegistry('https://hub.docker.com', 'dockerHubCredentials') { | ||
dockerImage.push('latest') | ||
} | ||
} | ||
} | ||
} | ||
stage('deploy to Production') { | ||
steps { | ||
echo 'deploy to Production!' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'notify@me', sendToIndividuals: false]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: "3.5" | ||
services: | ||
petclinic: | ||
image: spring-petclinic:latest | ||
ports: | ||
- "8080:8080" | ||
links: | ||
- mysql | ||
mysql: | ||
image: mysql:5.7 | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=petclinic | ||
- MYSQL_DATABASE=petclinic | ||
volumes: | ||
- "./conf.d:/etc/mysql/conf.d:ro" |
Oops, something went wrong.