-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 젠킨스 to 깃헙액션 #430
Merged
Merged
feat: 젠킨스 to 깃헙액션 #430
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Mash-Up Admin Dev CD | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: '어드민 개발환경에 배포할 서비스 버전을 입력합니다.' | ||
required: true | ||
|
||
jobs: | ||
trigger: | ||
name: 개발 환경 ${{ inputs.tag }} 배포한다 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Custom Deployment Task | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
run: | | ||
echo "Image Name: $IMAGE_NAME" | ||
echo "Tag: $TAG" | ||
|
||
- name: Excuting remote ssh commands | ||
uses: appleboy/ssh-action@v1.0.3 | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.REMOTE_PRIVATE_KEY }} | ||
envs: TAG | ||
script: | | ||
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 321148231533.dkr.ecr.ap-northeast-2.amazonaws.com | ||
cd /home/ec2-user/mashup-server/docker/deploy/admin/dev | ||
sh ./deploy-admin.sh $TAG | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Mash-Up Member Dev CD | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: '멤버 개발환경에 배포할 서비스 버전을 입력합니다.' | ||
required: true | ||
|
||
jobs: | ||
trigger: | ||
name: 개발 환경 ${{ inputs.tag }} 배포한다 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Custom Deployment Task | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
run: | | ||
echo "Image Name: $IMAGE_NAME" | ||
echo "Tag: $TAG" | ||
|
||
- name: Excuting remote ssh commands | ||
uses: appleboy/ssh-action@v1.0.3 | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.REMOTE_PRIVATE_KEY }} | ||
envs: TAG | ||
script: | | ||
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 321148231533.dkr.ecr.ap-northeast-2.amazonaws.com | ||
cd /home/ec2-user/mashup-server/docker/deploy/member/dev | ||
sh ./deploy-member.sh $TAG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Mash-Up Recruit Dev CD | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: '리쿠르트 개발환경에 배포할 서비스 버전을 입력합니다.' | ||
required: true | ||
|
||
jobs: | ||
trigger: | ||
name: 개발 환경 ${{ inputs.tag }} 배포한다 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Custom Deployment Task | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
run: | | ||
echo "Image Name: $IMAGE_NAME" | ||
echo "Tag: $TAG" | ||
|
||
- name: Excuting remote ssh commands | ||
uses: appleboy/ssh-action@v1.0.3 | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.REMOTE_PRIVATE_KEY }} | ||
envs: TAG | ||
script: | | ||
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 321148231533.dkr.ecr.ap-northeast-2.amazonaws.com | ||
cd /home/ec2-user/mashup-server/docker/deploy/recruit/dev | ||
sh ./deploy-recruit.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Mash-Up Admin Real CD | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
trigger: | ||
name: 운영 환경 production 배포한다 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if actor is admin | ||
id: check-admin | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
user_login=${{ github.actor }} | ||
repo=${{ github.repository }} | ||
response=$(gh api repos/$repo/collaborators/$user_login/permission -q .permission) | ||
|
||
if [[ "$response" != "admin" ]]; then | ||
echo "이 워크플로우는 관리자만 실행할 수 있습니다." | ||
exit 1 | ||
fi | ||
|
||
- name: Excuting remote ssh commands | ||
uses: appleboy/ssh-action@v1.0.3 | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.REMOTE_PRIVATE_KEY }} | ||
envs: TAG | ||
script: | | ||
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 321148231533.dkr.ecr.ap-northeast-2.amazonaws.com | ||
cd /home/ec2-user/mashup-server/docker/deploy/admin/prod | ||
sh ./deploy-admin.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Mash-Up Member Real CD | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
trigger: | ||
name: 운영 환경 production 배포한다 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if actor is admin | ||
id: check-admin | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
user_login=${{ github.actor }} | ||
repo=${{ github.repository }} | ||
response=$(gh api repos/$repo/collaborators/$user_login/permission -q .permission) | ||
|
||
if [[ "$response" != "admin" ]]; then | ||
echo "이 워크플로우는 관리자만 실행할 수 있습니다." | ||
exit 1 | ||
fi | ||
|
||
- name: Excuting remote ssh commands | ||
uses: appleboy/ssh-action@v1.0.3 | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.REMOTE_PRIVATE_KEY }} | ||
envs: TAG | ||
script: | | ||
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 321148231533.dkr.ecr.ap-northeast-2.amazonaws.com | ||
cd /home/ec2-user/mashup-server/docker/deploy/member/prod | ||
sh ./deploy-member.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Mash-Up Recruit Real CD | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
trigger: | ||
name: 운영 환경 production 배포한다 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if actor is admin | ||
id: check-admin | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
user_login=${{ github.actor }} | ||
repo=${{ github.repository }} | ||
response=$(gh api repos/$repo/collaborators/$user_login/permission -q .permission) | ||
|
||
if [[ "$response" != "admin" ]]; then | ||
echo "이 워크플로우는 관리자만 실행할 수 있습니다." | ||
exit 1 | ||
fi | ||
|
||
- name: Excuting remote ssh commands | ||
uses: appleboy/ssh-action@v1.0.3 | ||
env: | ||
TAG: ${{ inputs.tag }} | ||
with: | ||
host: ${{ secrets.REMOTE_IP }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.REMOTE_PRIVATE_KEY }} | ||
envs: TAG | ||
script: | | ||
aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 321148231533.dkr.ecr.ap-northeast-2.amazonaws.com | ||
cd /home/ec2-user/mashup-server/docker/deploy/recruit/prod | ||
sh ./deploy-recruit.sh |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어떤건 TAG가 없는데 어떤 차인가요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금은 없지만, dev 나중에 develop 에 머지되어야지만 develop 으로 태그만들어지는 방식외에도 별도의 브렌치에서 태그 만드는 방식으로 가려면 스크립트에 태그를 추가하려고 넣어줬습니다!
현재는 태그 넣어도 develop 으로만 되기는 합니당~! sh, docer-compose 수정 필요합니다.
prod 는 master 에 머지되어야지만 태그 만들어지는 방식으로만 현상 유지할 것 같아서, 태그 없애놓은 건데 덜 지웠네요! prod 는 다 지워놓을게욧!