Loading src/main/java/fr/emse/gitlab/saref/CLIExecution.java +1 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ public class CLIExecution implements SAREFCredentialsProvider { if (console != null) { return console.readPassword(SAREF.getMessage(MESSAGE.account_password.toString(), hostName)); } else if (System.getenv("GITLAB_CI") != null) { LOG.info("using password environment variable GITLAB_CI"); return System.getenv("CI_JOB_TOKEN").toCharArray(); } else { LOG.warn(SAREF.getMessage(MESSAGE.account_password_empty.toString(), hostName)); Loading src/main/java/fr/emse/gitlab/saref/SAREF.java +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class SAREF { public static final String SAREF_PORTAL_STATIC_GIT = "https://gitlab.emse.fr/saref/saref-portal-static.git"; // public static final String SAREF_PORTAL_STATIC_GIT = "https://forge.etsi.org/rep/SAREF/saref-portal-static.git"; // uncomment when the project is public public static final String LOGGER_BASE = "saref.pipeline"; public static final String LOGGER_BASE = "SAREF Pipeline: "; public static final String NAME_SITE = "site"; Loading src/main/java/fr/emse/gitlab/saref/managers/RepositoryFactory.java +7 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ public class RepositoryFactory extends SAREFErrorLogger { final SAREFProject project; final String name = directory.getName(); LOG.trace("name " + name); final Matcher matcher = PATTERN.matcher(name); if (!matcher.find()) { if (isTarget) { Loading @@ -106,6 +107,7 @@ public class RepositoryFactory extends SAREFErrorLogger { } } final String acronym = matcher.group(SAREF.REGEX_ACRONYM_VAR); LOG.trace("acronym " + acronym); if (acronym == null) { project = SAREFCore.INSTANCE; } else { Loading @@ -114,15 +116,17 @@ public class RepositoryFactory extends SAREFErrorLogger { try (Git git = Git.open(directory)) { final boolean isClean = git.status().call().isClean(); LOG.trace("isClean " + isClean); if (!isClean) { final String msg = getMessage(MESSAGE.not_clean, project.getName()); errorLogger.warn(msg); } String originalBranch = git.getRepository().getBranch(); LOG.trace("originalBranch " + originalBranch); if (isTarget && System.getenv("CI_COMMIT_REF_NAME") != null) { originalBranch = System.getenv("CI_COMMIT_REF_NAME"); System.out.println("CI_COMMIT_REF_NAME is set to " + originalBranch); LOG.trace("CI_COMMIT_REF_NAME is set to " + originalBranch); } final SAREFVersionName originalVersionName; Loading @@ -148,6 +152,8 @@ public class RepositoryFactory extends SAREFErrorLogger { int patch = Integer.parseInt(m.group(SAREF.REGEX_VERSION_PATCH_VAR)); originalVersionName = new SAREFVersionName(major, minor, patch); } LOG.trace("originalVersionName " + originalVersionName); SAREFRepository repository = new SAREFRepository(directory, project, isClean, originalVersionName, originalBranch); if(isTarget) { Loading src/main/resources/log4j.properties +4 −2 Original line number Diff line number Diff line log4j.rootLogger=WARN, stdout log4j.logger.com.jayway.jsonpath.internal.path=OFF log4j.logger.fr.emse.gitlab=DEBUG log4j.logger.fr.emse.gitlab=TRACE log4j.logger.saref.pipeline=DEBUG #log4j.logger.fr.emse.ci.sparqlext=TRACE log4j.logger.SAREF=WARN log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%l - %-5p - %c - %m%n log4j.appender.stdout.layout.ConversionPattern=## %-5p in %c%n%n%m%n%n src/main/resources/messages/SAREF.properties +2 −2 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ start=SAREF Pipeline execution in %s clause=%s %s - Issues in TS 103 673 Clause %s clause_for=%s %s for %s - Issues in TS 103 673 Clause %s loading=Loading %s account_name=Please enter your account username for %s account_name=Please enter your account username for %s (optional for public repositories) account_name_empty=using empty username account_password=Please enter your account password for %s account_password=Please enter your account password for %s (optional for public repositories) account_password_empty=using empty password open_report=The report has been generated at %s Would you like to open it? open_doc=The report has been generated at %s Would you like to open it? Loading Loading
src/main/java/fr/emse/gitlab/saref/CLIExecution.java +1 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,7 @@ public class CLIExecution implements SAREFCredentialsProvider { if (console != null) { return console.readPassword(SAREF.getMessage(MESSAGE.account_password.toString(), hostName)); } else if (System.getenv("GITLAB_CI") != null) { LOG.info("using password environment variable GITLAB_CI"); return System.getenv("CI_JOB_TOKEN").toCharArray(); } else { LOG.warn(SAREF.getMessage(MESSAGE.account_password_empty.toString(), hostName)); Loading
src/main/java/fr/emse/gitlab/saref/SAREF.java +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public class SAREF { public static final String SAREF_PORTAL_STATIC_GIT = "https://gitlab.emse.fr/saref/saref-portal-static.git"; // public static final String SAREF_PORTAL_STATIC_GIT = "https://forge.etsi.org/rep/SAREF/saref-portal-static.git"; // uncomment when the project is public public static final String LOGGER_BASE = "saref.pipeline"; public static final String LOGGER_BASE = "SAREF Pipeline: "; public static final String NAME_SITE = "site"; Loading
src/main/java/fr/emse/gitlab/saref/managers/RepositoryFactory.java +7 −1 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ public class RepositoryFactory extends SAREFErrorLogger { final SAREFProject project; final String name = directory.getName(); LOG.trace("name " + name); final Matcher matcher = PATTERN.matcher(name); if (!matcher.find()) { if (isTarget) { Loading @@ -106,6 +107,7 @@ public class RepositoryFactory extends SAREFErrorLogger { } } final String acronym = matcher.group(SAREF.REGEX_ACRONYM_VAR); LOG.trace("acronym " + acronym); if (acronym == null) { project = SAREFCore.INSTANCE; } else { Loading @@ -114,15 +116,17 @@ public class RepositoryFactory extends SAREFErrorLogger { try (Git git = Git.open(directory)) { final boolean isClean = git.status().call().isClean(); LOG.trace("isClean " + isClean); if (!isClean) { final String msg = getMessage(MESSAGE.not_clean, project.getName()); errorLogger.warn(msg); } String originalBranch = git.getRepository().getBranch(); LOG.trace("originalBranch " + originalBranch); if (isTarget && System.getenv("CI_COMMIT_REF_NAME") != null) { originalBranch = System.getenv("CI_COMMIT_REF_NAME"); System.out.println("CI_COMMIT_REF_NAME is set to " + originalBranch); LOG.trace("CI_COMMIT_REF_NAME is set to " + originalBranch); } final SAREFVersionName originalVersionName; Loading @@ -148,6 +152,8 @@ public class RepositoryFactory extends SAREFErrorLogger { int patch = Integer.parseInt(m.group(SAREF.REGEX_VERSION_PATCH_VAR)); originalVersionName = new SAREFVersionName(major, minor, patch); } LOG.trace("originalVersionName " + originalVersionName); SAREFRepository repository = new SAREFRepository(directory, project, isClean, originalVersionName, originalBranch); if(isTarget) { Loading
src/main/resources/log4j.properties +4 −2 Original line number Diff line number Diff line log4j.rootLogger=WARN, stdout log4j.logger.com.jayway.jsonpath.internal.path=OFF log4j.logger.fr.emse.gitlab=DEBUG log4j.logger.fr.emse.gitlab=TRACE log4j.logger.saref.pipeline=DEBUG #log4j.logger.fr.emse.ci.sparqlext=TRACE log4j.logger.SAREF=WARN log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%l - %-5p - %c - %m%n log4j.appender.stdout.layout.ConversionPattern=## %-5p in %c%n%n%m%n%n
src/main/resources/messages/SAREF.properties +2 −2 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ start=SAREF Pipeline execution in %s clause=%s %s - Issues in TS 103 673 Clause %s clause_for=%s %s for %s - Issues in TS 103 673 Clause %s loading=Loading %s account_name=Please enter your account username for %s account_name=Please enter your account username for %s (optional for public repositories) account_name_empty=using empty username account_password=Please enter your account password for %s account_password=Please enter your account password for %s (optional for public repositories) account_password_empty=using empty password open_report=The report has been generated at %s Would you like to open it? open_doc=The report has been generated at %s Would you like to open it? Loading