diff --git a/README.md b/README.md index d3075b3..201d143 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,13 @@ cd mrls 2. Dockerイメージ作成 -> `./gradlew bootBuildImage` 3. コンテナ起動 - -> `docker run --name mrls --env GITLAB_PROJECT_ID=xxxx --env GITLAB_ACCESS_TOKEN=xxxx -it -p 8888:8080 mrls` +```bash +docker run --name mrls --env GITLAB_PROJECT_ID=xxxx --env GITLAB_ACCESS_TOKEN=xxxx --env GITLAB_HOST=xxx -it -p 8888:8080 mrls +``` + +- GITLAB_HOST + - GitLabのhost - GITLAB_PROJECT_ID - GitLabのプロジェクトID - GITLAB_ACCESS_TOKEN diff --git a/build.gradle b/build.gradle index 47e1224..3d58aa7 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'io.github.tttol' -version = '1.1.0' +version = '1.1.1' sourceCompatibility = '17' configurations { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 6448320..181d36c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,10 +1,11 @@ app: gitlab: + host: ${GITLAB_HOST} project: id: ${GITLAB_PROJECT_ID} accessToken: ${GITLAB_ACCESS_TOKEN} api: - endpoint: https://gitlab.com/api/v4/projects/${app.gitlab.project.id}/merge_requests + endpoint: https://${app.gitlab.host}/api/v4/projects/${app.gitlab.project.id}/merge_requests logging: level: root: INFO diff --git a/src/test/java/io/github/tttol/mrls/MrlsApplicationTests.java b/src/test/java/io/github/tttol/mrls/MrlsApplicationTests.java index f0ed4c7..85f5dd1 100644 --- a/src/test/java/io/github/tttol/mrls/MrlsApplicationTests.java +++ b/src/test/java/io/github/tttol/mrls/MrlsApplicationTests.java @@ -4,12 +4,13 @@ import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest(properties = {"GITLAB_PROJECT_ID=dummy", - "GITLAB_ACCESS_TOKEN=dummy"}) + "GITLAB_ACCESS_TOKEN=dummy", + "GITLAB_HOST=dummy"}) class MrlsApplicationTests { - @Test - void contextLoads() { + @Test + void contextLoads() { - } + } }