1
0
mirror of https://github.com/kochetkov-ma/allure-server.git synced 2024-11-24 08:22:37 +02:00

add docker build action / fix bugs

This commit is contained in:
Maxim Kochetkov 2020-04-21 16:07:57 +03:00
parent ebe78168ce
commit aba907144e
5 changed files with 28 additions and 7 deletions

View File

@ -51,4 +51,11 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/libs/allure-server-${{ env.RELEASE_VERSION }}.jar
asset_name: allure-server.jar
asset_content_type: application/jar
asset_content_type: application/jar
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: kochetkovma/allure-server
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ env.RELEASE_VERSION }}"

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM gradle:jdk11 as build
COPY . .
RUN gradle -Pversion=docker --no-daemon bootJar
FROM openjdk:11-jre-slim as production
COPY --from=build /home/gradle/build/libs/allure-server-docker.jar /allure-server-docker.jar
# Set port
EXPOSE 8080
# Run application
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=${PROFILE:-default}","/allure-server-docker.jar"]

View File

@ -1,3 +1,8 @@
# suppress inspection "UnusedProperty" for whole file
theGroup=ru.iopump.qa
theArchivesBaseName=allure-server
theArchivesBaseName=allure-server
# For build
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

View File

@ -1,15 +1,14 @@
package ru.iopump.qa.allure;
import lombok.experimental.UtilityClass;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
@UtilityClass
@SpringBootApplication
@EnableCaching
public class Application {
public void main(String[] args) { //NOPMD
public class Application { //NOPMD
public static void main(String[] args) { //NOPMD
SpringApplication.run(Application.class, args);
}
}

View File

@ -46,7 +46,7 @@ public class AllureResultController {
private final ResultService resultService;
@Operation(summary = "Delete all allure results")
@DeleteMapping(path = "/result")
@DeleteMapping
@CacheEvict(value = CACHE, allEntries = true) // clear cache
public Collection<ResultResponse> deleteAllResults() throws IOException {
var res = getAllResult();