Skip to content

Commit

Permalink
Test: CI 파이프라인 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
tioon committed Apr 23, 2024
1 parent 87fd9bc commit e62c3df
Showing 1 changed file with 4 additions and 48 deletions.
52 changes: 4 additions & 48 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,59 +35,15 @@ jobs:
- name: Create deployment package
run: |
zip -r deployment-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar
zip -r test-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar
- name: Set up AWS CLI Environment
- name: Set up AWS CLI Environment With Naver Key
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 ls s3://baebae-bucket
- name: Set up AWS CLI Environment
run: |
aws configure
${{ secrets.AWS_ACCESS_KEY }}
${{ secrets.AWS_SECRET_KEY }}
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 ls s3://baebae-bucket
AWS_DEFAULT_REGION: 'us-east-2'

- name: Upload files to Naver Cloud Object Storage
run: |
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 ls s3://baebae-bucket
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp test-package.zip s3://baebae-bucket/test-package
- name: Deploy to Naver Cloud Object Storage
env:
NAVER_ACCESS_KEY: ${{ secrets.NAVER_ACCESS_KEY }}
NAVER_SECRET_KEY: ${{ secrets.NAVER_SECRET_KEY }}
run: |
python upload_to_ncloud.py
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.NAVER_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NAVER_SECRET_KEY }}
run: |
aws --endpoint-url=https://kr.object.ncloudstorage.com
s3 cp deployment-package.zip
s3://baebae-bucket

- name: Install Naver Cloud CLI
run: |
wget https://files.pythonhosted.org/packages/3d/90/3eadc98b356ae462d2deb16715eafb8b3fa4b0707c56b6413632c1d687e2/awscli-1.15.85.tar.gz
tar -xzvf awscli-1.15.85.tar.gz
cd awscli-1.15.85
sudo python setup.py install
- name: Configure NAVER CLI credentials
run: aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} && aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}


- name: Upload to Naver Cloud Object Storage
run: |
./ncloud/bin/ncloud object-storage upload --bucket-name baebae-bucket --source ./deployment-package.zip --object-name deployment-package.zip

0 comments on commit e62c3df

Please sign in to comment.