Skip to content

Commit eb2a129

Browse files
committed
path fixes
1 parent 19857a4 commit eb2a129

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/redhat/labs/omp/service/ConfigService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ void onStart(@Observes StartupEvent event) {
5555
if (null != content) {
5656
configuration = File.builder().filePath(configFile).content(content).build();
5757
}
58+
LOGGER.debug("Config File {}", configuration);
5859
}
5960

6061
public File getConfigFile() {
@@ -63,7 +64,8 @@ public File getConfigFile() {
6364
return configuration;
6465
}
6566

66-
Optional<File> optional = fileService.getFile(configRepositoryId, configFile, gitRef);
67+
String gitLabConfigFile = configFile.charAt(0) == '/' ? configFile.substring(1) : configFile;
68+
Optional<File> optional = fileService.getFile(configRepositoryId, gitLabConfigFile, gitRef);
6769

6870
if (!optional.isPresent()) {
6971
throw new FileNotFoundException("the configured file was not found in the gitlab repository.");

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ gitlab.deploy.key=${DEPLOY_KEY:0}
2626

2727
# config
2828
config.repository.id=${CONFIG_REPOSITORY_ID:1}
29-
config.file=${CONFIG_FILE:schema/config.yml}
29+
config.file=${CONFIG_FILE:/schema/config.yml}
3030
webhook.file=${WEBHOOK_FILE:/schema/webhooks.yaml}
3131
webhook.default.token=${WEBHOOK_DEFAULT_TOKEN:tolkien}
3232
config.gitlab.ref=${CONFIG_GITLAB_REF:master}

0 commit comments

Comments
 (0)