{"id":20136138,"url":"https://github.com/zkfmapf123/cicd-pipeline","last_synced_at":"2025-08-13T23:04:40.791Z","repository":{"id":174344881,"uuid":"652097662","full_name":"zkfmapf123/cicd-pipeline","owner":"zkfmapf123","description":"cicd-pipeline","archived":false,"fork":false,"pushed_at":"2023-06-15T14:53:59.000Z","size":950,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T22:42:13.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkfmapf123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-11T04:35:17.000Z","updated_at":"2023-06-11T04:35:57.000Z","dependencies_parsed_at":"2025-01-13T09:34:36.076Z","dependency_job_id":"b90a9ec7-8fcc-480a-beca-e7949d68be34","html_url":"https://github.com/zkfmapf123/cicd-pipeline","commit_stats":null,"previous_names":["zkfmapf123/cicd-pipeline"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zkfmapf123/cicd-pipeline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcicd-pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcicd-pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcicd-pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcicd-pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkfmapf123","download_url":"https://codeload.github.com/zkfmapf123/cicd-pipeline/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcicd-pipeline/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270330595,"owners_count":24565816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T21:17:50.412Z","updated_at":"2025-08-13T23:04:40.730Z","avatar_url":"https://github.com/zkfmapf123.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CICD-pipeline\n\n![vpc](./public/vpc.png)\n\n![pipeline](./public/cicd-pipeline.png)\n\n## Todo\n\n- [x] GitHub -\u003e Jenkins -\u003e Push ECR -\u003e EventBridge -\u003e Lambda\n\n- [x] EventBridge에서 Lambda에 함수전달\n\n![9](./public/9.png)\n![10](./public/10.png)\n\n- [ ] Lambda는 오래된 이미지 삭제하고, ECS에 배포\n  - [ ] aws-cli를 활용해서 오래된 이미지 삭제\n  - [ ] 최근 이미지를 ecs에 배포\n\n## Jenkins install\n\n```\n    host에 Docker에 접근하는 방식 (DooD)을 사용하기 때문에,\n    host에 user, group을 먼저 설정해줘야 함\n\n    useradd ...\n    groupadd ...\n```\n\n- install docker (util_file/docker.sh)\n- build docker images (util_file/Dockerfil.jenkins)\n\n```\n    docker build -f Dockerfile.jenkins -t jenkins:1.0\n```\n\n- run jenkins container\n\n```\n    docker run -d --name jenkins_container \\\n    -v /var/run/docker.sock:/var/run/docker.sock \\\n    -v jenkins_volume:/var/jenkins_home \\\n    --restart=always \\\n    -p 8080:8080 jenkins:1.0\n\n    chmod 777 /var/run/docker.sock\n```\n\n## Slack 추가하는 법\n\n### 1. Slack에서 App 추가 (Admin이 해줘야 함)\n\n![1](./public/1.png)\n\n### 2. Slack Channel 추가 (Admin이 해줘야 함)\n\n![2](./public/2.png)\n\n### 3. Jenkins Plugin 추가 (Slack Notification)\n\n![3](./public/3.png)\n\n### 4. Jenkins Management -\u003e System Setting\n\n![4](./public/4.png)\n\n### 5. Slack 추가 \u0026 Credential 설정\n\n![5](./public/5.png)\n\n![6](./public/6.png)\n\n### 6. Test Connection\n\n![7](./public/7.png)\n\n### 7. Check To Notification\n\n![8](./public/8.png)\n\n## Reference\n\n- t2.micro로 하니까 Docker가 못버텨주네... -\u003e t3.small 정도는 해야함 (시간 애뺐김)\n- \u003ca href=\"https://plugins.jenkins.io/amazon-ecr/\"\u003eJenkins AmazonECR Registry 입력하는 법\u003c/a\u003e\n- \u003ca href=\"https://tech.cloud.nongshim.co.kr/2021/08/30/hands-on-ci-cd-jenkins-pipeline%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%9C-ecs-%EB%B0%B0%ED%8F%AC/\"\u003eJenkins Credentials withAWS 설정\u003c/a\u003e\n- \u003ca href=\"https://teichae.tistory.com/entry/Jenkins-Pipeline%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%9C-Docker-Image%EB%A5%BC-ECR%EB%A1%9C-Push\"\u003eJenkins Registry 설정 -\u003e AWS Credentials (Global) Plugin 설정해야 함\u003c/a\u003e\n- \u003ca href=\"https://plugins.jenkins.io/slack/\"\u003e Slack Notification \u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fcicd-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkfmapf123%2Fcicd-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fcicd-pipeline/lists"}