Skip to content

Commit

Permalink
Merge branch 'be-develop' of https://github.com/Kernel360/F2-TECHPICK
Browse files Browse the repository at this point in the history
…into be-develop
  • Loading branch information
sangwonsheep committed Jan 10, 2025
2 parents 99ba2dc + 866c5de commit c4a857a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 28 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/baguni.test.api.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
branches:
- 'be-develop' # 배포 대상 브랜치
paths:
- 'backend/baguni-core/**'
- 'backend/baguni-common/**'
- 'backend/baguni-domain/**'
- 'backend/baguni-api/**'
workflow_dispatch:

Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
- name: Build and Deploy ${{ env.module-name }} Module
run: |
./backend/gradlew -p backend/${{ env.module-name }} clean build -x test
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} backend/${{ env.module-name }}
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }} backend/${{ env.module-name }}
- # Docker hub 로그인
name: Login to Docker Hub
Expand All @@ -47,7 +48,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }}
- # Docker hub 업로드
name: Publish to docker hub
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}

- name: Deploy on Test-Server
uses: appleboy/ssh-action@master
Expand All @@ -61,10 +62,7 @@ jobs:
echo ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }} | docker login -u ${{ env.docker-hub-username }} --password-stdin
echo "docker - pulling..."
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
echo "docker - changing image name and tag ..."
docker tag ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} ${{ env.docker-hub-repo }}:${{ env.module-name }}-staging
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}
echo "moving to project directory..."
cd /home/project/baguni/develop
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/baguni.test.batch.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
branches:
- 'be-develop' # 배포 대상 브랜치
paths:
- 'backend/baguni-core/**'
- 'backend/baguni-common/**'
- 'backend/baguni-domain/**'
- 'backend/baguni-batch/**'
workflow_dispatch:

Expand Down Expand Up @@ -37,7 +38,7 @@ jobs:
- name: Build and Deploy ${{ env.module-name }} Module
run: |
./backend/gradlew -p backend/${{ env.module-name }} clean build -x test
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} backend/${{ env.module-name }}
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }} backend/${{ env.module-name }}
- # Docker hub 로그인
name: Login to Docker Hub
Expand All @@ -47,7 +48,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }}
- # Docker hub 업로드
name: Publish to docker hub
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}

- name: Deploy on Test-Server
uses: appleboy/ssh-action@master
Expand All @@ -61,10 +62,7 @@ jobs:
echo ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }} | docker login -u ${{ env.docker-hub-username }} --password-stdin
echo "docker - pulling..."
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
echo "docker - changing image name and tag ..."
docker tag ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} ${{ env.docker-hub-repo }}:${{ env.module-name }}-staging
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}
echo "moving to project directory..."
cd /home/project/baguni/develop
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/baguni.test.client.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- # Docker image 빌드
name: Build docker image
run: |
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} frontend
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }} frontend
- # Docker hub 로그인
name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -52,7 +52,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }}
- # Docker hub 업로드
name: Publish to docker hub
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}
- # 서버 ssh 접속 후 방금 올린 이미지 pull 받고 실행
name: Deploy on Test-Server
uses: appleboy/ssh-action@master
Expand All @@ -67,11 +67,8 @@ jobs:
echo ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }} | docker login -u ${{ env.docker-hub-username }} --password-stdin
echo "docker - pulling..."
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
echo "docker - changing image name and tag ..."
docker tag ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} ${{ env.docker-hub-repo }}:${{ env.module-name }}-staging
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}
echo "moving to project directory..."
cd /home/project/baguni/develop

Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/baguni.test.ranking.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- 'be-develop' # 배포 대상 브랜치
paths:
- 'backend/baguni-core/**'
- 'backend/baguni-common/**'
- 'backend/baguni-ranking/**'
workflow_dispatch:

Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Build and Deploy ${{ env.module-name }} Module
run: |
./backend/gradlew -p backend/${{ env.module-name }} clean build -x test
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} backend/${{ env.module-name }}
docker build -t ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }} backend/${{ env.module-name }}
- # Docker hub 로그인
name: Login to Docker Hub
Expand All @@ -47,7 +47,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }}
- # Docker hub 업로드
name: Publish to docker hub
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
run: docker push ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}

- name: Deploy on Test-Server
uses: appleboy/ssh-action@master
Expand All @@ -61,10 +61,7 @@ jobs:
echo ${{ secrets.DOCKERHUB_REPO_BAGUNI_TOKEN }} | docker login -u ${{ env.docker-hub-username }} --password-stdin
echo "docker - pulling..."
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }}
echo "docker - changing image name and tag ..."
docker tag ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}-${{ github.sha }} ${{ env.docker-hub-repo }}:${{ env.module-name }}-staging
docker pull ${{ env.docker-hub-username }}/${{ env.docker-hub-repo }}:${{ env.module-name }}
echo "moving to project directory..."
cd /home/project/baguni/develop
Expand Down

0 comments on commit c4a857a

Please sign in to comment.