misc fixes
parent
760a03846b
commit
55b3d70a2d
|
@ -25,6 +25,12 @@
|
|||
</fileSet>
|
||||
<fileSet filtered="true">
|
||||
<directory>docs</directory>
|
||||
<excludes>
|
||||
<exclude>assets/**</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>docs/assets</directory>
|
||||
</fileSet>
|
||||
<fileSet filtered="true">
|
||||
<directory></directory>
|
||||
|
|
|
@ -2,6 +2,7 @@ FROM adoptopenjdk/openjdk11:alpine-slim
|
|||
WORKDIR /app
|
||||
ADD target/${artifactId}-service.jar /app/service.jar
|
||||
ADD src/main/resources/application.yaml /app/application.yaml
|
||||
ADD src/test/resources/application-test.yaml /app/application-test.yaml
|
||||
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["java", "-jar", "service.jar"]
|
|
@ -23,7 +23,7 @@ pipeline {
|
|||
stage('Prepare') {
|
||||
steps {
|
||||
script {
|
||||
VERSION = sh (
|
||||
env.VERSION = sh (
|
||||
script: "mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
|
@ -58,7 +58,8 @@ pipeline {
|
|||
exclusionPattern: '**/models/**, ' +
|
||||
'**/*Controller.class, ' +
|
||||
'**/*Application.class, ' +
|
||||
'**/*Configuration.class,',
|
||||
'**/*Configuration.class,' +
|
||||
'**/internal/**',
|
||||
minimumInstructionCoverage: '50',
|
||||
maximumInstructionCoverage: '50',
|
||||
minimumClassCoverage: '100',
|
||||
|
@ -96,8 +97,8 @@ pipeline {
|
|||
stage('Build and Deploy Documentation') {
|
||||
when {
|
||||
anyOf {
|
||||
{ branch 'master' }
|
||||
{ branch 'dev' }
|
||||
branch 'master'
|
||||
branch 'dev'
|
||||
}
|
||||
}
|
||||
agent {
|
||||
|
@ -108,7 +109,8 @@ pipeline {
|
|||
withCredentials([sshUserPrivateKey(credentialsId: "static_deploy", keyFileVariable: 'keyfile')]) {
|
||||
sh 'ssh -i ${keyfile} provision@www01.nclazz.de mkdir -p /srv/docs/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}'
|
||||
sh 'scp -r -i ${keyfile} site/* provision@www01.nclazz.de:/srv/docs/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}'
|
||||
sh 'ssh -i ${keyfile} provision@www01.nclazz.de cp -r /srv/docs/${GROUP_ID}/${ARTIFACT_ID}/${NAMED_TAG}'
|
||||
sh 'ssh -i ${keyfile} provision@www01.nclazz.de mkdir -p /srv/docs/${GROUP_ID}/${ARTIFACT_ID}/${NAMED_TAG}'
|
||||
sh 'ssh -i ${keyfile} provision@www01.nclazz.de cp -r /srv/docs/${GROUP_ID}/${ARTIFACT_ID}/${VERSION}/* /srv/docs/${GROUP_ID}/${ARTIFACT_ID}/${NAMED_TAG}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<!-- Checks whether files end with a new line. -->
|
||||
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
<!-- <module name="NewlineAtEndOfFile"/>-->
|
||||
|
||||
<!-- Checks that property files contain the same keys. -->
|
||||
<!-- See https://checkstyle.org/config_misc.html#Translation -->
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.springframework.security.config.http.SessionCreationPolicy;
|
|||
@EnableGlobalMethodSecurity(
|
||||
prePostEnabled = true
|
||||
)
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
|
@ -11,6 +11,8 @@ import org.springframework.stereotype.Service;
|
|||
@RequiredArgsConstructor
|
||||
public class ServiceHealthService {
|
||||
|
||||
private static final long SECOND_MILLIS = 1000;
|
||||
|
||||
private final long startTime = System.currentTimeMillis();
|
||||
private final List<TimedException> exceptions = new LinkedList<>();
|
||||
|
||||
|
@ -30,7 +32,7 @@ public class ServiceHealthService {
|
|||
|
||||
public ServiceHealth getHealth() {
|
||||
return new ServiceHealth(
|
||||
(System.currentTimeMillis() - this.startTime) / 1000,
|
||||
(System.currentTimeMillis() - this.startTime) / SECOND_MILLIS,
|
||||
this.exceptions
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue