Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
saref-pipeline
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SAREF
saref-pipeline
Commits
8e71e102
Commit
8e71e102
authored
Jun 13, 2020
by
Maxime Lefrançois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pipeline, snapshot, staging
parent
a2cde1df
Pipeline
#3829
passed with stage
in 2 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
Main.java
src/main/java/fr/emse/gitlab/saref/Main.java
+14
-6
No files found.
src/main/java/fr/emse/gitlab/saref/Main.java
View file @
8e71e102
...
...
@@ -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,15 +107,18 @@ public class Main {
if
(
CAN_BROWSE
)
{
Desktop
.
getDesktop
().
browse
(
documentationHTML
.
toURI
());
}
else
if
(
isGitLabCI
)
{
String
link
=
String
.
format
(
"%s
jobs/%s/%s/%s/%s.html"
,
SAREF
.
BASE
,
CI_JOB
_ID
,
target
.
getRepository
().
getProject
().
getPath
(),
target
.
getCurrentVersionName
(),
target
.
getRepository
().
getProject
().
getOntologyFileName
());
String
link
=
String
.
format
(
"%s
snapshot/%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
);
}
else
{
System
.
out
.
println
(
String
.
format
(
"\nDocumentation for %s %s: %s\n"
,
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
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment