사용자 도구

사이트 도구


git:gitlab:ci

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
git:gitlab:ci [2022/02/16 10:58]
kwon37xi
git:gitlab:ci [2022/10/13 16:22] (현재)
kwon37xi [Merge Request 가 진행중인 Branch 에 대한 신규 commit 발생시 중복 pipeline 실행 방지]
줄 13: 줄 13:
 ===== Docker in Docker ===== ===== Docker in Docker =====
   * [[https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-the-docker-executor-with-the-docker-image-docker-in-docker|Use Docker to build Docker images | GitLab]]   * [[https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-the-docker-executor-with-the-docker-image-docker-in-docker|Use Docker to build Docker images | GitLab]]
 +
 +===== Merge Request 가 진행중인 Branch 에 대한 신규 commit 발생시 중복 pipeline 실행 방지 =====
 +  * [[https://stackoverflow.com/questions/67819012/ci-pipeline-run-only-when-merge-request-has-new-push-commit-and-to-specific-bran|continuous integration - CI pipeline run only when Merge Request has new push commit and to specific branch - Stack Overflow]]
 +
 +<code yml>
 +workflow:
 +  rules:
 +    - if: '$CI_COMMIT_BRANCH' # All branches
 +    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' # Merge requests 에 대해서 pipeline 실행
 +    # 브랜치에 커밋이 추가 발생했으나 이미 MR이 존재하면 BRANCH 에 
 +    # 대해서는 piple라인 실행안함.
 +    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
 +      when: never
 +</code>
  
 ===== 참조 ===== ===== 참조 =====
   * [[https://linux.systemv.pe.kr/gitlab-ci-cd-%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%b4-docker-%ec%9d%b4%eb%af%b8%ec%a7%80-%ec%83%9d%ec%84%b1%ed%95%98%ea%b8%b0/|Gitlab CI/CD 를 이용해 Docker 이미지 생성하기 - Voyager of Linux]]   * [[https://linux.systemv.pe.kr/gitlab-ci-cd-%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%b4-docker-%ec%9d%b4%eb%af%b8%ec%a7%80-%ec%83%9d%ec%84%b1%ed%95%98%ea%b8%b0/|Gitlab CI/CD 를 이용해 Docker 이미지 생성하기 - Voyager of Linux]]
 +  * [[https://linux.systemv.pe.kr/gitlab-runner-%ec%84%a4%ec%b9%98-%eb%b0%8f-%ec%84%a4%ec%a0%95/|gitlab-runner 설치 및 설정 - Voyager of Linux]] 
 +  * [[https://medium.com/devops-with-valentine/fix-gitlab-ci-duplicate-pipelines-in-merge-requests-when-using-rules-9a1486994f3a|Fix GitLab CI Duplicate Pipelines in Merge Requests when Using rules: | by Valentin Despa | DevOps with Valentine | Medium]]
git/gitlab/ci.1644976727.txt.gz · 마지막으로 수정됨: 2022/02/16 10:58 저자 kwon37xi