Gitlab CI operation sequence Git push || merge events occurs Start pipeline on Gitlab-Runner Pull images from docker hub Docker instantiate container according to image Git pull repository (target branch) Execute jobs on Gitlab-Runner Report the result to Gitlab-Server Why Gitlab-Runner use Docker as default? Isolation 실제 구동되고 있는 인스턴스와 무관하게 컨테이너에서 동작함. Flexibility Configuration 변경이 자유로움. Docker ..
gitlab
🎯 Goals gitlab-ci.yaml 파일 기본 설정을 해본다. gitlab 의 CI 모델의 개념을 파악한다. gitlab + AWS EC2 환경에서의 CI 전략을 세워본다. GitLab CI Models 하나의 리포지토리가 하나의 파이프라인을 갖는다. Pipeline 리포지토리의 루트에 존재하는 Yaml 설정 파일 다른 파이프라인에 알림을 보낼 수 있다. 하나의 파이프라인은 여러 스테이지를 가질 수 있다. Stage 작업의 단위로 '순차적'으로 실행된다. 여러 Job 을 갖는다. ex) Install, Build, Test, Deploy , Run Job 한 스테이지 내에서 작업의 단위. [CI 전략 수립] 브랜치마다 서로 다른 EC2 인스턴스에 배포한다. master => production in..
0. SSH KEY Pair 등록 gitlab이 github보다 앞서는 점은 private Repository에 명수제한이 없음 + RSA 비대칭키 암호화적용을 통한 보안성 보장이다. Public-Private Key를 생성해보자. Key 생성 구문 (cmd 명령 프롬프트 창에서) ssh keygen id_rsa (Private Key) id_rsa.pub(Public Key) 두개가 생성됨. 생성된 공개키 gitlab account SSH public 에 등록하기 cat ~/.ssh/id_rsa.pub public 키 내용이 출력됨 => Ctrl+C User Setting> SSH Keys > user@~~~~ Ctrl + V로 Public Key 등록! 1. Working Directory 생성 gi..
.gitignore 파일 형상관리시에 staging Area, Local, Remote Repository에 등록될 필요가 없는 파일을 자동으로 제외시켜주는 파일이다. ex. Log, Backup File, Compiled File gitignore 자동설정내역 생성페이지 를 들어가면 개발환경에 맞게 기본 설정된 gitignore 파일 내역을 출력해준다. add 취소 (File Staging Cancel) git reset "File name or Directory Name" default: File, Directory Name 생략시 add했던 모든 파일과 디렉토리. 최근 commit 취소 git reset [option] HEAD HEAD의 위치를 옮겨서 마지막 commit을 취소함. (HEAD는 현..