====== gitlab ci ====== ===== AWS EC2 runner ===== * [[aws:ec2|AWS EC2]] 를 이용한 CI 실행 * [[https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/|Autoscaling GitLab Runner on AWS EC2 | GitLab]] * [[https://insight.infograb.net/blog/2021/02/05/aws-spot-instance-runner/|AWS Spot Instance로 Gitlab Runner 비용 절감하기 | DevSecOps 구축 컨설팅, 교육, 기술지원 서비스 제공]] ===== AWS Fargate ===== * [[aws:fargate|AWS Fargate]] 를 이용한 CI 실행 * [[https://docs.gitlab.com/runner/configuration/runner_autoscale_aws_fargate/|Autoscaling GitLab CI on AWS Fargate | GitLab]] ===== 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]] ===== 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]] 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 ===== 참조 ===== * [[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]]