Open PESolut opened 1 month ago
completed tasks:
1) create a backend workflow
2) Configure the workflow to trigger on pushes to dev
3) Set up a job to install dependencies and run tests.
time to test to see if changes run the workflow....
edit:
it seems that we forgot to change our biild from react build to just a node build and we dont have any test script so lets just create a basic test suite and correct our build for our env.
Update build step
npm run build
command to match backend build processAdd basic test suite
backend.test.js
)package.json
to include a test scriptUpdate CI/CD workflow
.github/workflows/backend-ci-cd.yml
Test and verify
Documentation
task one completed ,testing:
needed to remove the test script within our package.json...
new blocker: push to main;
output from github actions fail:
Switched to a new branch 'main'
branch 'main' set up to track 'origin/main'.
Updating b33a916..55ac857
Fast-forward
backend/app.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
remote: Permission to PESolut/leaf-me.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/PESolut/leaf-me/': The requested URL returned error: 403
changed workflow permissions. https://github.com/PESolut/leaf-me/settings/actions
testing...
task 3: Implement a deployment job that runs only on pushes to main
This will require three prerequisite task done before I can start to implement it
1) install docker onto the backends ec2 instance 2) create a dockerhub repo for leafme's backend 3) in the Leafme repo share all the secrets ( reference portfolio project page for the needed secrets ) including but not limited to: GitHub PAT, backend address, leaf-me-masterkey.pem, and three other values ( that I can't remember or reference atm ) 4) all above task items that has not been completed should be completed before we finalize the pipeline and start development on the frontend
As part of our CI/CD pipeline setup, we need to install Docker on our backend EC2 instance. This will allow us to deploy and run our containerized backend application.
i created a new workflow for Deploying, instlalled docker onto our backend and created the dockerhub repo. Now to add necc. secrets to our github repo. (DOCKERHUB_USER, DOCKERHUB_TOKEN, EC2_SSH_PRIVATE_KEY, EC2_HOST, and EC2_USER)
test pushing to test deployment
success with no test cases
setup CI/CD pipeline for Leaf-Me Backend
Implement a robust CI/CD pipeline using GitHub Actions to automate the build, test, and deployment processes for the Leaf-Me backend application. This pipeline will streamline our development workflow, ensure code quality, and facilitate efficient deployments.
Workflow Overview
1. Source Control Management (SCM)
dev
branch for testing and integration.2. Continuous Integration (CI)
dev
branch and pull requests tomain
.main
branch.3. Continuous Deployment (CD)
main
branch.main
branch.Technologies to be Used
Acceptance Criteria
dev
backend/
directory.Benefits
Additional Notes