Loading src/main/java/fr/emse/gitlab/saref/Main.java +14 −6 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ public class Main { private static final String CI_SERVER_HOST = System.getenv("CI_SERVER_HOST"); private static final String CI_PROJECT_PATH = System.getenv("CI_PROJECT_PATH"); private static final String CI_JOB_ID = System.getenv("CI_JOB_ID"); private static final boolean isGitLabCI = CI_SERVER_HOST != null && CI_PROJECT_PATH != null && CI_JOB_ID != null; private static final String CI_PIPELINE_ID = System.getenv("CI_PIPELINE_ID"); private static final boolean isGitLabCI = CI_SERVER_HOST != null && CI_PROJECT_PATH != null && CI_PIPELINE_ID != null; public static void main(String[] args) { if (args.length == 0 && !GraphicsEnvironment.isHeadless()) { Loading Loading @@ -86,7 +86,12 @@ public class Main { if (CAN_BROWSE) Desktop.getDesktop().browse(reportHTML.toURI()); else if (isGitLabCI) { String link = String.format("%sjobs/%s/report.html", SAREF.BASE, CI_JOB_ID); String link; if(pipeline.mode == Mode.DEVELOP || pipeline.mode == Mode.RELEASE) { link = String.format("%ssnapshot/%s/report.html", SAREF.BASE, CI_PIPELINE_ID); } else { link = String.format("%sstaging/%s/report.html", SAREF.BASE, CI_PIPELINE_ID); } System.out.println("\n\n\nSAREF pipeline HTML report:\n" + link); } else { System.out.println("\n\n\nSAREF pipeline HTML report:\n" + reportHTML.getCanonicalPath()); Loading @@ -102,7 +107,7 @@ public class Main { if (CAN_BROWSE) { Desktop.getDesktop().browse(documentationHTML.toURI()); } else if (isGitLabCI) { String link = String.format("%sjobs/%s/%s/%s/%s.html", SAREF.BASE, CI_JOB_ID, target.getRepository().getProject().getPath(), String link = String.format("%ssnapshot/%s/%s/%s/%s.html", SAREF.BASE, CI_PIPELINE_ID, target.getRepository().getProject().getPath(), target.getCurrentVersionName(), target.getRepository().getProject().getOntologyFileName()); System.out.println("\n\n\nHTML documentation:\n" + link); Loading @@ -111,6 +116,9 @@ public class Main { target.getRepository().getProject(), target.getCurrentVersionName(), documentationHTML.getCanonicalPath())); } } else { String link = String.format("%sstaging/%s/", SAREF.BASE, CI_PIPELINE_ID); System.out.println("\n\n\nHTML documentation:\n" + link); } } } Loading Loading
src/main/java/fr/emse/gitlab/saref/Main.java +14 −6 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ public class Main { private static final String CI_SERVER_HOST = System.getenv("CI_SERVER_HOST"); private static final String CI_PROJECT_PATH = System.getenv("CI_PROJECT_PATH"); private static final String CI_JOB_ID = System.getenv("CI_JOB_ID"); private static final boolean isGitLabCI = CI_SERVER_HOST != null && CI_PROJECT_PATH != null && CI_JOB_ID != null; private static final String CI_PIPELINE_ID = System.getenv("CI_PIPELINE_ID"); private static final boolean isGitLabCI = CI_SERVER_HOST != null && CI_PROJECT_PATH != null && CI_PIPELINE_ID != null; public static void main(String[] args) { if (args.length == 0 && !GraphicsEnvironment.isHeadless()) { Loading Loading @@ -86,7 +86,12 @@ public class Main { if (CAN_BROWSE) Desktop.getDesktop().browse(reportHTML.toURI()); else if (isGitLabCI) { String link = String.format("%sjobs/%s/report.html", SAREF.BASE, CI_JOB_ID); String link; if(pipeline.mode == Mode.DEVELOP || pipeline.mode == Mode.RELEASE) { link = String.format("%ssnapshot/%s/report.html", SAREF.BASE, CI_PIPELINE_ID); } else { link = String.format("%sstaging/%s/report.html", SAREF.BASE, CI_PIPELINE_ID); } System.out.println("\n\n\nSAREF pipeline HTML report:\n" + link); } else { System.out.println("\n\n\nSAREF pipeline HTML report:\n" + reportHTML.getCanonicalPath()); Loading @@ -102,7 +107,7 @@ public class Main { if (CAN_BROWSE) { Desktop.getDesktop().browse(documentationHTML.toURI()); } else if (isGitLabCI) { String link = String.format("%sjobs/%s/%s/%s/%s.html", SAREF.BASE, CI_JOB_ID, target.getRepository().getProject().getPath(), String link = String.format("%ssnapshot/%s/%s/%s/%s.html", SAREF.BASE, CI_PIPELINE_ID, target.getRepository().getProject().getPath(), target.getCurrentVersionName(), target.getRepository().getProject().getOntologyFileName()); System.out.println("\n\n\nHTML documentation:\n" + link); Loading @@ -111,6 +116,9 @@ public class Main { target.getRepository().getProject(), target.getCurrentVersionName(), documentationHTML.getCanonicalPath())); } } else { String link = String.format("%sstaging/%s/", SAREF.BASE, CI_PIPELINE_ID); System.out.println("\n\n\nHTML documentation:\n" + link); } } } Loading