Skip to content

📝[Docs]: 회고록 추가 #104

📝[Docs]: 회고록 추가

📝[Docs]: 회고록 추가 #104

Workflow file for this run

name: glass-bottle CI/CD
# S3 Upload를 위한 환경설정
env:
S3_BUCKET_NAME: glaas-bottle-s3-bucket
AWS_REGION: ap-northeast-2
on:
push:
branches:
- main
pull_request:
branches:
- main
- staging
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
jobs:
cd:
name: CD with Gradle
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_TOKEN }}
submodules: true
- name: Grant execute permission for gradle
run: git update-index --add --chmod=+x gradlew
shell: bash
- name: Setup jdk 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew clean build
shell: bash
- name: Run a one-line script
run: echo ${{ github.job }}
- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip .
shell: bash
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Upload to S3
run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME/$GITHUB_SHA.zip
- name: Code Deploy
run: aws deploy create-deployment --application-name glass-bottle-app --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name glass-bottle-group --s3-location bucket=glaas-bottle-s3-bucket,bundleType=zip,key=$GITHUB_SHA.zip