-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OING-16] chore: 프로젝트 CD 파이프라인 추가 (#4)
* docs: create github pr template * feat: add jib to build.gradle * feat: add ci script * chore: 환경변수 출력 코드 추가 * fix: input 경로 변경 * fix: fix nullable issue * fix: move tags to to closure * chore: add production manifest * chore: add invoke rule * chore: pass docker credentials to build * chore: add docker credentials 2 * feat: ci 테스트 * feat: add deploy script * chore: add image-name variable * chore: fix typo * chore: change stage name * chore: passphrase to password * chore: fix image name * chore: remove test branch * chore: add development stage * chore: remove test stage * debug: remove debug code * �[OING-7] chore: CI 파이프라인 추가 (#3) * docs: create github pr template * feat: add jib to build.gradle * feat: add ci script * chore: 환경변수 출력 코드 추가 * fix: input 경로 변경 * fix: fix nullable issue * fix: move tags to to closure * chore: add production manifest * chore: add invoke rule * chore: pass docker credentials to build * chore: add docker credentials 2 * feat: add jib to build.gradle * feat: add ci script * fix: fix nullable issue * fix: move tags to to closure * feat: ci 테스트 * feat: add deploy script * chore: add image-name variable * chore: fix typo * chore: change stage name * chore: passphrase to password * chore: fix image name * chore: remove test branch * chore: add development stage * chore: remove test stage * debug: remove debug code
- Loading branch information
Showing
5 changed files
with
156 additions
and
32 deletions.
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
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
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,79 @@ | ||
name: 데브 워크플로우 | ||
on: | ||
push: | ||
branches: [ 'dev' ] | ||
paths: | ||
- 'config/**' # Config 모듈 변경 | ||
- 'member/**' # Member 모듈 변뚶 | ||
- '.github/workflows/**' # 워크플로우와 관련된 파일이 변경된 경우 | ||
- 'build.gradle' # Parent Gradle 모듈 설정이 변경된 경우 | ||
- 'settings.gradle' # Parent Gradle 설정이 변경된 경우 | ||
|
||
env: | ||
SPRING_PROFILE: dev | ||
ENVIRONMENT: development | ||
IMAGE_NAME: no5ing/spring-was-dev | ||
SERVICE_NAME: be-dev-was | ||
|
||
concurrency: | ||
group: development | ||
|
||
jobs: | ||
prepare-variables: | ||
name: 환경변수 준비하기 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
image-tag: ${{ steps.setup-env.outputs.image-tag }} | ||
spring-profile: ${{ steps.setup-env.outputs.spring-profile }} | ||
environment: ${{ steps.setup-env.outputs.environment }} | ||
image-name: ${{ steps.setup-env.outputs.image-name }} | ||
service-name: ${{ steps.setup-env.outputs.service-name }} | ||
steps: | ||
- name: GitHub 에서 레포 받아오기 | ||
uses: actions/checkout@v3 | ||
|
||
- name: 환경변수 출력하기 | ||
id: setup-env | ||
run: | | ||
echo "image-tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
echo "spring-profile=$SPRING_PROFILE" >> $GITHUB_OUTPUT | ||
echo "environment=$ENVIRONMENT" >> $GITHUB_OUTPUT | ||
echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT | ||
echo "service-name=$SERVICE_NAME" >> $GITHUB_OUTPUT | ||
call-build-workflow: | ||
if: github.event_name == 'push' | ||
needs: [ prepare-variables ] | ||
name: 이미지 빌드 | ||
uses: ./.github/workflows/build.yaml | ||
permissions: | ||
id-token: write | ||
contents: read | ||
with: | ||
image-tag: ${{ needs.prepare-variables.outputs.image-tag }} | ||
spring-profile: ${{ needs.prepare-variables.outputs.spring-profile }} | ||
image-name: ${{ needs.prepare-variables.outputs.image-name }} | ||
secrets: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
call-deploy-workflow: | ||
if: github.event_name == 'push' | ||
needs: [ prepare-variables, call-build-workflow ] | ||
name: 서비스 배포 | ||
uses: ./.github/workflows/deploy.yaml | ||
permissions: | ||
id-token: write | ||
contents: read | ||
secrets: | ||
REMOTE_SSH_HOST: ${{ secrets.REMOTE_SSH_HOST }} | ||
REMOTE_SSH_USERNAME: ${{ secrets.REMOTE_SSH_USERNAME }} | ||
REMOTE_SSH_KEY: ${{ secrets.REMOTE_SSH_KEY }} | ||
REMOTE_SSH_PASSPHRASE: ${{ secrets.REMOTE_SSH_PASSPHRASE }} | ||
REMOTE_SSH_PORT: ${{ secrets.REMOTE_SSH_PORT }} | ||
with: | ||
image-tag: ${{ needs.prepare-variables.outputs.image-tag }} | ||
spring-profile: ${{ needs.prepare-variables.outputs.spring-profile }} | ||
environment: ${{ needs.prepare-variables.outputs.environment }} | ||
image-name: ${{ needs.prepare-variables.outputs.image-name }} | ||
service-name: ${{ needs.prepare-variables.outputs.service-name }} |
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
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