Skip to content
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

ci: tag 추가 #443

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd-dev-recruit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
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
sh ./deploy-recruit.sh $TAG
38 changes: 38 additions & 0 deletions .github/workflows/ci-dev-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Mash-Up Tag Dev CI

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: 'gradle'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build Jib
run: |
chmod +x gradlew
./gradlew :mashup-member:jib -PbuildPhase=develop -PencryptorPassword=${{ secrets.ENCRYPTOR_PASSWORD }} -Ptag=$GITHUB_REF_NAME
./gradlew :mashup-admin:jib -PbuildPhase=develop -PencryptorPassword=${{ secrets.ENCRYPTOR_PASSWORD }} -Ptag=$GITHUB_REF_NAME
./gradlew :mashup-recruit:jib -PbuildPhase=develop -PencryptorPassword=${{ secrets.ENCRYPTOR_PASSWORD }} -Ptag=$GITHUB_REF_NAME
4 changes: 2 additions & 2 deletions mashup-admin/jib.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jib {
}
to {
image = "321148231533.dkr.ecr.ap-northeast-2.amazonaws.com/${project.name}"
tags = ["${buildPhase}"]
tags = ["${project.findProperty('tag') ?: buildPhase}"]
println "to image : ${image}:${tags}"
}
container {
Expand All @@ -28,4 +28,4 @@ jib {
]
ports = ["8080"]
}
}
}
4 changes: 2 additions & 2 deletions mashup-member/jib.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jib {
}
to {
image = "321148231533.dkr.ecr.ap-northeast-2.amazonaws.com/${project.name}"
tags = ["${buildPhase}"]
tags = ["${project.findProperty('tag') ?: buildPhase}"]
println "to image : ${image}:${tags}"
}
container {
Expand All @@ -28,4 +28,4 @@ jib {
]
ports = ["8080"]
}
}
}
4 changes: 2 additions & 2 deletions mashup-recruit/jib.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jib {
}
to {
image = "321148231533.dkr.ecr.ap-northeast-2.amazonaws.com/${project.name}"
tags = ["${buildPhase}"]
tags = ["${project.findProperty('tag') ?: buildPhase}"]
println "to image : ${image}:${tags}"
}
container {
Expand All @@ -28,4 +28,4 @@ jib {
]
ports = ["8080"]
}
}
}
Loading