Migrate Jenkins CI/CD pipelines to GitHub Actions#97
Open
devin-ai-integration[bot] wants to merge 2 commits intoDevOpsfrom
Open
Migrate Jenkins CI/CD pipelines to GitHub Actions#97devin-ai-integration[bot] wants to merge 2 commits intoDevOpsfrom
devin-ai-integration[bot] wants to merge 2 commits intoDevOpsfrom
Conversation
Co-Authored-By: Angela Lin <angela.lin@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…configured Co-Authored-By: Angela Lin <angela.lin@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate Jenkins CI/CD pipelines to GitHub Actions
Summary
Adds two GitHub Actions workflow files that replicate the existing Jenkins CI and CD pipelines. The original Jenkins files (
Jenkinsfile,GitOps/Jenkinsfile,vars/*.groovy) are not modified or removed.CI workflow (
ci.yml) maps the 8-stage Jenkins pipeline:code_checkout())actions/checkout@v4trivy_scan())aquasecurity/trivy-action@masterowasp_dependency())dependency-check/Dependency-Check_Action@mainsonarqube_analysis())sonarsource/sonarqube-scan-action@v6sonarqube_code_quality())sonarsource/sonarqube-quality-gate-action@masterdocker_build())docker/build-push-action@v5docker_push())push: trueCD workflow (
cd.yml) maps the GitOps Jenkins pipeline: checkout → update K8s manifest viased→ commit & push → email notification. Chained from CI viaworkflow_call, also triggerable viaworkflow_dispatch.Graceful secret handling
SonarQube and Docker Hub steps are guarded with
if: ${{ secrets.SECRET != '' }}conditions so they skip gracefully when the corresponding secrets are not yet configured, rather than failing the entire workflow. This allows the pipeline to run partially (checkout, Trivy, OWASP) even before all secrets are set up.Required Secrets to Configure
DOCKERHUB_USERNAMEDOCKERHUB_TOKENSONAR_TOKENSONAR_HOST_URLMAIL_SERVERMAIL_PORTMAIL_USERNAMEMAIL_PASSWORDNOTIFICATION_EMAILReview & Testing Checklist for Human
buildjob (which includes Docker image push) runs onpull_requestevents. This means PR builds will attempt to push images to Docker Hub when secrets are configured. Confirm whether Docker build+push should be gated topush/dispatchevents only, or split into separate build-only and push steps.kubernetes/bankapp-deployment.ymlusingGITHUB_TOKEN. Verify that branch protection rules allowgithub-actions[bot]to push, or consider switching to a PAT / bot-branch + PR pattern.dawidd6/action-send-mail@v3) runs withif: always()but has no guard checking if mail secrets are configured. It will error ifMAIL_SERVER/MAIL_USERNAME/MAIL_PASSWORDare not set. Decide whether to add anifguard or accept the failure.continue-on-error: true): This matches the original JenkinsabortPipeline: falsebehavior. Confirm this is intentional—if you want the gate to block, removecontinue-on-error.sedcommand in CD usestrainwithshubham/bankapp-eksfrom the original pipeline. Verify this is the correct image reference for this fork.workflow_dispatchwith a testDOCKER_TAGvalue. Verify each step executes and the CD workflow updates the K8s manifest correctly.Notes
Link to Devin run: https://app.devin.ai/sessions/cf8756bc6d934ddaad02be9952d78c16
Requested by: @angelalincog