Scheduled maintenance on April 15, 14:00 - 19:00 CET.

Commit 8e71e102 authored by Maxime Lefrançois's avatar Maxime Lefrançois

pipeline, snapshot, staging

parent a2cde1df
Pipeline #3829 passed with stage
in 2 minutes and 2 seconds
...@@ -55,8 +55,8 @@ public class Main { ...@@ -55,8 +55,8 @@ public class Main {
private static final String CI_SERVER_HOST = System.getenv("CI_SERVER_HOST"); 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_PROJECT_PATH = System.getenv("CI_PROJECT_PATH");
private static final String CI_JOB_ID = System.getenv("CI_JOB_ID"); 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_JOB_ID != null; private static final boolean isGitLabCI = CI_SERVER_HOST != null && CI_PROJECT_PATH != null && CI_PIPELINE_ID != null;
public static void main(String[] args) { public static void main(String[] args) {
if (args.length == 0 && !GraphicsEnvironment.isHeadless()) { if (args.length == 0 && !GraphicsEnvironment.isHeadless()) {
...@@ -86,7 +86,12 @@ public class Main { ...@@ -86,7 +86,12 @@ public class Main {
if (CAN_BROWSE) if (CAN_BROWSE)
Desktop.getDesktop().browse(reportHTML.toURI()); Desktop.getDesktop().browse(reportHTML.toURI());
else if (isGitLabCI) { 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); System.out.println("\n\n\nSAREF pipeline HTML report:\n" + link);
} else { } else {
System.out.println("\n\n\nSAREF pipeline HTML report:\n" + reportHTML.getCanonicalPath()); System.out.println("\n\n\nSAREF pipeline HTML report:\n" + reportHTML.getCanonicalPath());
...@@ -102,15 +107,18 @@ public class Main { ...@@ -102,15 +107,18 @@ public class Main {
if (CAN_BROWSE) { if (CAN_BROWSE) {
Desktop.getDesktop().browse(documentationHTML.toURI()); Desktop.getDesktop().browse(documentationHTML.toURI());
} else if (isGitLabCI) { } 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.getCurrentVersionName(),
target.getRepository().getProject().getOntologyFileName()); target.getRepository().getProject().getOntologyFileName());
System.out.println("\n\n\nHTML documentation:\n" + link); System.out.println("\n\n\nHTML documentation:\n" + link);
} else { } else {
System.out.println(String.format("\nDocumentation for %s %s: %s\n", System.out.println(String.format("\nDocumentation for %s %s: %s\n",
target.getRepository().getProject(), target.getCurrentVersionName(), target.getRepository().getProject(), target.getCurrentVersionName(),
documentationHTML.getCanonicalPath())); documentationHTML.getCanonicalPath()));
} }
} else {
String link = String.format("%sstaging/%s/", SAREF.BASE, CI_PIPELINE_ID);
System.out.println("\n\n\nHTML documentation:\n" + link);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment