From 9acb4b1e0d63cb2136b7189417ae43c6a87a35c6 Mon Sep 17 00:00:00 2001 From: TOL Date: Mon, 30 Jan 2023 22:29:00 +0900 Subject: [PATCH] =?UTF-8?q?gitlab=E3=81=AEhost=E3=82=92=E7=92=B0=E5=A2=83?= =?UTF-8?q?=E5=A4=89=E6=95=B0=E6=8C=87=E5=AE=9A=E3=81=AB=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=20(#12)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++++- build.gradle | 2 +- src/main/resources/application.yml | 3 ++- .../java/io/github/tttol/mrls/MrlsApplicationTests.java | 9 +++++---- 4 files changed, 14 insertions(+), 7 deletions(-) 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() { - } + } }