Skip to content

Commit 6d7ae4e

Browse files
committed
๐Ÿ‘ท CICD(Refactor) : CI.yml ๋ฐ CICD.yml์— ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์ถ”๊ฐ€
1 parent 5fa1072 commit 6d7ae4e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

โ€Ž.github/workflows/CI.ymlโ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
sleep 10
4242
4343
- name: Build and Test with Gradle Wrapper
44+
env:
45+
SPRING_DATA_MONGODB_URI: "mongodb://test:testPW@localhost:27017/testdb"
46+
FASTAPI_BASE_URL: ${{ secrets.FASTAPI_BASE_URL }}
4447
run: |
45-
export SPRING_DATA_MONGODB_URI=mongodb://test:testPW@localhost:27017/testdb
4648
./gradlew build test

โ€Ž.github/workflows/CICD.ymlโ€Ž

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
DOCKERHUB_REPOSITORY: ${{ secrets.DOCKER_REPOSITORY }}
11+
FASTAPI_BASE_URL: ${{ secrets.FASTAPI_BASE_URL }}
1112

1213
jobs:
1314
CI:
@@ -44,8 +45,10 @@ jobs:
4445
run: sleep 10
4546

4647
- name: Build and Test with Gradle Wrapper
48+
env:
49+
SPRING_DATA_MONGODB_URI: "mongodb://test:testPW@localhost:27017/testdb"
50+
FASTAPI_BASE_URL: ${{ secrets.FASTAPI_BASE_URL }}
4751
run: |
48-
export SPRING_DATA_MONGODB_URI=mongodb://test:testPW@localhost:27017/testdb
4952
./gradlew build test
5053
5154
- name: Upload jar file to Artifact
@@ -96,6 +99,7 @@ jobs:
9699
env:
97100
USERNAME: ${{ secrets.DOCKER_USERNAME }}
98101
IMAGE_TAG: ${{ steps.slug.outputs.sha7 }}
102+
FASTAPI_BASE_URL: ${{ secrets.FASTAPI_BASE_URL }}
99103

100104
run: |
101105
docker build -t $USERNAME/$DOCKERHUB_REPOSITORY:$IMAGE_TAG -t $USERNAME/$DOCKERHUB_REPOSITORY:latest .
@@ -123,6 +127,7 @@ jobs:
123127
script: |
124128
export DOCKER_IMAGE="${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}:latest"
125129
export DOCKER_COMPOSE_PATH="${{ secrets.DOCKER_COMPOSE_PATH }}"
130+
export FASTAPI_BASE_URL="${{ secrets.FASTAPI_BASE_URL }}"
126131
127132
cd /home/ubuntu/scripts
128133
./rolling-update.sh

0 commit comments

Comments
ย (0)