Skip to content
Snippets Groups Projects
Commit edafed48 authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' of git.ozg-sh.de:mgm/pluto

parents 5c54a066 5f380e2b
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,10 @@ pipeline {
}
}
environment {
BLUE_OCEAN_URL = "https://jenkins.ozg-sh.de/blue/organizations/jenkins/pluto/detail/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/pipeline"
}
options {
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds()
......@@ -23,7 +27,7 @@ pipeline {
sh 'mvn --version'
dir('pluto-interface') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS clean install'
sh 'mvn -s $MAVEN_SETTINGS clean install -DskipTests -Dmaven.wagon.http.retryHandler.count=3'
}
}
}
......@@ -60,7 +64,7 @@ pipeline {
sh 'mvn --version'
dir('pluto-server') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS clean install spring-boot:build-image -Dspring-boot.build-image.imageName=docker.ozg-sh.de/pluto:build-latest'
sh 'mvn -s $MAVEN_SETTINGS clean install -DskipTests spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3'
}
}
}
......@@ -119,11 +123,46 @@ pipeline {
}
}
}
stage('Deploy Pluto') {
when {
anyOf {
branch 'master'
branch 'release'
}
}
steps {
script {
FAILED_STAGE = env.STAGE_NAME
}
container("kubectl"){
script {
if (env.BRANCH_NAME == 'release') {
sh 'kubectl rollout restart deployment/pluto -n sh-kiel-test'
sh 'kubectl rollout status deployment/pluto -n sh-kiel-test'
}
if (env.BRANCH_NAME == 'master') {
sh 'kubectl rollout restart deployment/pluto -n sh-kiel-dev'
sh 'kubectl rollout status deployment/pluto -n sh-kiel-dev'
}
}
}
}
}
}
post {
always{
junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
// always{
// junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
// }
failure {
script {
if (env.BRANCH_NAME == 'master') {
slackSend(color: "danger", message: "Pluto: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <${BLUE_OCEAN_URL}|${env.BUILD_NUMBER}>")
}
}
}
}
}
\ No newline at end of file
......@@ -26,6 +26,8 @@
<lorem.version>2.1</lorem.version>
<faker.version>1.0.2</faker.version>
<spring-admin.version>2.3.1</spring-admin.version>
<spring-boot.build-image.imageName>docker.ozg-sh.de/pluto:build-latest</spring-boot.build-image.imageName>
</properties>
<dependencies>
......
......@@ -30,7 +30,7 @@ public class Vorgang {
private long version;
@Builder.Default
private ZonedDateTime createdAt = ZonedDateTime.now(ZoneId.of("UTC")).withNano(0);
private ZonedDateTime createdAt = ZonedDateTime.now(ZoneId.of("UTC"));
private String name;
@Builder.Default
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment