{"id":49533242,"url":"https://github.com/khanmaster/sre_jenkins_cicd","last_synced_at":"2026-05-02T08:36:30.696Z","repository":{"id":37467031,"uuid":"404319286","full_name":"khanmaster/sre_jenkins_cicd","owner":"khanmaster","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-09T14:18:06.000Z","size":664,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-03-05T03:32:08.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/khanmaster.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}},"created_at":"2021-09-08T11:20:29.000Z","updated_at":"2021-12-08T17:28:40.000Z","dependencies_parsed_at":"2023-01-21T12:00:34.178Z","dependency_job_id":null,"html_url":"https://github.com/khanmaster/sre_jenkins_cicd","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/khanmaster/sre_jenkins_cicd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanmaster%2Fsre_jenkins_cicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanmaster%2Fsre_jenkins_cicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanmaster%2Fsre_jenkins_cicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanmaster%2Fsre_jenkins_cicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khanmaster","download_url":"https://codeload.github.com/khanmaster/sre_jenkins_cicd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khanmaster%2Fsre_jenkins_cicd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32528602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":"2026-05-02T08:36:29.771Z","updated_at":"2026-05-02T08:36:30.599Z","avatar_url":"https://github.com/khanmaster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Let's build a Continuous Integration and Continuous Delivery/Deployment (CICD) Pipeline\n## Jenkins CI job Testing\n### Webhooks with Git-hub\n#### Automated Testing using Jenkins\n#### Automated Deployment on AWS EC2 for 2Tier architecture - Nodejs app and Mongodb  \n- \n- CI test wtih Eng130 - 100\n- testing CI  from localhost\n- git flow test 1\n- Jenkins Workflow\n- feature added from localhost  new attempt\n![](images/jenkins.png)\n\n  ##### Contiounus Integration Continuous Delivery/Deployment \n![](images/CICD.png)\n\n###### Let's break it down \n  ![](images/cicd_jenkins.png)\n\n### For deployment job in Jenkins\n- In the execute shell of CD job\n- new webhook testing\n```\n# we need to by pass the key asking stage with below command:\nssh -A -o \"StrictHostKeyChecking=no\" ubuntu@ec2-ip \u003c\u003c EOF\t\n# copy the the code\n# run your provision.sh to install node with required dependencies for app instance - same goes for db instance (ensure to double check if node and db are actively running)\n\n# create an env to connect to db\n# navigate to app folder\n# kill any existing pm2 process just in case\n# launch the app\nnohup node app.js \u003e /dev/null 2\u003e\u00261 \u0026 - use this command to run node app in the background\n\n# To debug ssh into your ec2 and run the above commands\n    \n\nEOF\n```\n## Jenkins CI Lab - Solution\n\n##### Steps\n\n##### Source Code Management\n\n1. Set Branches to Build to develop\n2. Under additional behaviours click add and \"Merge before build\"\n3. name of repo \"origin\"\n4. branch to merge \"main\"\n\n### Post-Build Actions\n\n#### Git Publisher\n\n1. Add Post Build Action\n2. Git Publisher\n3. Push Only if Build Succeeds\n4. Merge Results\n5. change made on dev brance\n\n--- \nTigger deployment job if the merge was successfull\n- Testing webhook in bootcamp test3\n- -testing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanmaster%2Fsre_jenkins_cicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhanmaster%2Fsre_jenkins_cicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhanmaster%2Fsre_jenkins_cicd/lists"}