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 {
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()) {
......@@ -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());
......@@ -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);
......@@ -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);
}
}
}
......
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