Skip to content

Commit

Permalink
feature: cicd test
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroom1324 committed Aug 29, 2024
1 parent 67aa007 commit 794dfb8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ permissions:
contents: read

jobs:
# build:
# name: CI
# runs-on: ubuntu-latest
# environment: production
#
# steps:
# - name: Checkout
# uses: actions/checkout@v4
build:
name: CI
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout
uses: actions/checkout@v4
#
# - name: Make application-secret.yml and set secrets
# run: |
Expand Down Expand Up @@ -64,16 +64,16 @@ jobs:
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY .
# docker push $ECR_REGISTRY/$ECR_REPOSITORY
#
# - name: Zip deployment files
# run: |
# zip -r ${{ env.ZIP_FILE_NAME }} ./aws/
#
# - name: Upload AppSpec and scripts to S3
# run: |
# aws s3 cp ${{ env.ZIP_FILE_NAME }} s3://${{ secrets.S3_BUCKET }}/${{ env.ZIP_FILE_NAME }}
- name: Zip deployment files
run: |
zip -r ${{ env.ZIP_FILE_NAME }} ./aws/
- name: Upload AppSpec and scripts to S3
run: |
aws s3 cp ${{ env.ZIP_FILE_NAME }} s3://${{ secrets.S3_BUCKET }}/${{ env.ZIP_FILE_NAME }}
deploy:
# needs: build
needs: build
name: Trigger CD (CodeDeploy)
runs-on: ubuntu-latest

Expand Down
10 changes: 9 additions & 1 deletion aws/kill_process.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/bin/bash

sudo docker rm -f $(docker ps -qa)
# ์‹คํ–‰ ์ค‘์ด๊ฑฐ๋‚˜ ์ค‘์ง€๋œ ์ปจํ…Œ์ด๋„ˆ ๋ชฉ๋ก์„ ๊ฐ€์ ธ์˜ด
containers=$(docker ps -qa)

# ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์กด์žฌํ•˜๋ฉด ์‚ญ์ œ
if [ -n "$containers" ]; then
sudo docker rm -f $containers
else
echo "No containers to remove."
fi

0 comments on commit 794dfb8

Please sign in to comment.