Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ci-cd 설정 #2

Closed
wants to merge 10 commits into from
Closed

feat: ci-cd 설정 #2

wants to merge 10 commits into from

Conversation

iamjooon2
Copy link
Contributor

  • 잘 배포되는지 테스트용 API 하나 추가했어요! [GET] /ping
  • 시크릿 관리용 env 패키지 추가헀어요 (우선 github action으로 관리중)
  • 공용 계정으로 Docker Hub 계정 만들어뒀습니다

더 늦어질 것 같아서 일단 PR 생성부터~!

@iamjooon2 iamjooon2 requested a review from pilyang September 23, 2024 08:18
@iamjooon2 iamjooon2 marked this pull request as draft September 23, 2024 08:26
Copy link
Member

@pilyang pilyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와우 굳굳 일단 몇가지 리뷰 남겨봄요

Comment on lines +3 to +5
on:
push:
branches: [ "main" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트 할 수 있는 꿀팁!!

Suggested change
on:
push:
branches: [ "main" ]
on:
push:
branches:
- main
- chore/ci-cd

위처럼 해두면 이거 테스트한다고 계속 main에 머지해보고 할 필요 없이 해당 브렌치에 테스트로 계속 푸시해보면서 해당 워크플로우 동작시켜서 배포 테스트 할 수 있어용

테스트 다 되고 마지막에 이거 머지시키기 전에 해당부분 -chore/ci-cd 부분 제거하고 머지시키면 되고용

Comment on lines +3 to +18
FROM golang:1.22.5

# Set destination for COPY
WORKDIR /app

# Download Go modules
COPY go.mod go.sum ./
RUN go mod download

# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/reference/dockerfile/#copy
COPY *.go ./

# Build
RUN CGO_ENABLED=0 GOOS=linux go build -o /techbloghub-server

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그 스테이지라고 하던가 분리해서 빌드용 배포용 베이스 이미지 다르게 하는것도 후에 찾아보면 좋을듯?

일단 위에서 내가 코멘트 남긴것처럼 해당 브렌치에서 배포 동작시켜보고 배포 잘 되는거 확인 된 다음에 도커 이미지파일 수정해가면서 잘 되나 안되나 테스트 하는 방향으로?

나중에 나도 어케하나 더 찾아보게되면 코멘트로 추가 남기거나 디코에 올려둠요

@iamjooon2 iamjooon2 marked this pull request as ready for review November 8, 2024 07:31
@iamjooon2 iamjooon2 closed this Dec 27, 2024
@iamjooon2 iamjooon2 deleted the chore/ci-cd branch January 3, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants