Chore: dev만 임시 테스트 제거 #125
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
name: Feature Branch CI | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-and-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Create and configure application.yml | |
run: | | |
mkdir -p baebae-BE/src/main/resources | |
mkdir -p baebae-BE/src/test/resources | |
echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml | |
echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml | |
echo "${{ secrets.APPLICATION_TEST_YML }}" > baebae-BE/src/test/resources/application-test.yml | |
- name: create-json | |
id: create-json | |
uses: jsdaniell/[email protected] | |
with: | |
name: "baebae-BE/src/main/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json" | |
json: ${{ secrets.FCM_CERTIFICATION }} | |
cat baebae-BE/src/main/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json | |
- name: Print firebase-admin-sdk file | |
run: cat baebae-BE/src/main/resources/baebae-ff525-firebase-adminsdk-zbc8h-7fd10e518b.json | |
- name: Build with Gradle | |
run: | | |
cd baebae-BE | |
chmod +x ./gradlew | |
./gradlew build -x test | |
- name: Create deployment package | |
run: | | |
zip -r test-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar | |
- name: Configure AWS CLI && Upload file to Object Storage | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.NAVER_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.NAVER_SECRET_KEY }} | |
AWS_DEFAULT_REGION: 'us-east-2' | |
run: | | |
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp test-package.zip s3://baebae-bucket/test-package --content-type application/zip | |
- name : Start Deploy Using SourceDeploy | |
env: | |
PROJECT_ID: ${{ secrets.PROJECT_ID }} | |
STAGE_ID: ${{ secrets.STAGE_ID }} | |
SCENARIO_ID: ${{ secrets.SCENARIO_ID }} | |
ACCESS_KEY: ${{ secrets.NAVER_ACCESS_KEY }} | |
SECRET_KEY: ${{ secrets.NAVER_SECRET_KEY }} | |
run: | | |
cd baebae-BE | |
chmod +x request_source_deploy_start.sh | |
./request_source_deploy_start.sh |