Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #14

Open
wants to merge 193 commits into
base: main
Choose a base branch
from
Open

Test #14

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
e09ba4e
pull request on main branch
Jan 27, 2024
565cdb5
Create main.yml
mansinga1 Jan 27, 2024
ebc0bc9
pull request on main branch
Jan 27, 2024
df68d3a
Merge pull request #1 from mansinga1/udacity
mansinga1 Jan 27, 2024
c220911
pull request on main branch
Jan 27, 2024
e350ac1
Merge pull request #2 from mansinga1/udacity
mansinga1 Jan 27, 2024
f90fff3
test
Jan 27, 2024
1df090b
Merge pull request #3 from mansinga1/udacity
mansinga1 Jan 27, 2024
940f8ef
test
Jan 27, 2024
75e1c8e
Merge pull request #4 from mansinga1/test
mansinga1 Jan 27, 2024
62f1515
changed from nodejs to python
Jan 29, 2024
a771568
Merge pull request #5 from mansinga1/test
mansinga1 Jan 29, 2024
46ba89f
changed from nodejs to python
Jan 29, 2024
1db1c81
changed from nodejs to python (#6)
mansinga1 Jan 29, 2024
3a3c409
changed from nodejs to python
Jan 29, 2024
fdc727e
Merge branch 'main' into test
mansinga1 Jan 29, 2024
1246b3f
Merge pull request #7 from mansinga1/test
mansinga1 Jan 29, 2024
f65c12a
fixed conflict
Jan 29, 2024
8273543
Merge pull request #8 from mansinga1/test
mansinga1 Jan 29, 2024
2092752
added a change to frontend
Jan 29, 2024
de209a2
Merge pull request #9 from mansinga1/test
mansinga1 Jan 29, 2024
e9eaf4d
added a change to frontend
Jan 29, 2024
fe5eac8
Merge pull request #10 from mansinga1/test
mansinga1 Jan 29, 2024
366e612
Update frontend-ci.yml
mansinga1 Jan 29, 2024
74b8568
Update Dockerfile
mansinga1 Jan 29, 2024
a5c0641
Merge pull request #11 from mansinga1/test
mansinga1 Jan 29, 2024
e653824
included a new path
mansinga1 Jan 29, 2024
c7de91c
Merge pull request #12 from mansinga1/test
mansinga1 Jan 29, 2024
f55dd23
Update Dockerfile
mansinga1 Jan 29, 2024
6ab722b
Merge pull request #13 from mansinga1/test
mansinga1 Jan 29, 2024
ee136cc
Update frontend-ci.yml
mansinga1 Jan 29, 2024
0d192af
Update Dockerfile
mansinga1 Jan 29, 2024
8fca481
Merge pull request #14 from mansinga1/test
mansinga1 Jan 29, 2024
3d38c49
Update frontend-ci.yml
mansinga1 Jan 29, 2024
b3935ff
Update Dockerfile
mansinga1 Jan 29, 2024
ca76fdb
Merge pull request #15 from mansinga1/test
mansinga1 Jan 29, 2024
3e1ae23
Update frontend-ci.yml
mansinga1 Jan 29, 2024
1e63c53
Merge pull request #16 from mansinga1/test
mansinga1 Jan 29, 2024
858cd9f
Update frontend-ci.yml
mansinga1 Jan 29, 2024
4858222
Update Dockerfile
mansinga1 Jan 29, 2024
6b0d7a2
Update frontend-ci.yml
mansinga1 Jan 29, 2024
ead9244
Merge pull request #17 from mansinga1/test
mansinga1 Jan 29, 2024
685c787
Update frontend-ci.yml
mansinga1 Jan 29, 2024
fd25dc6
Merge pull request #18 from mansinga1/test
mansinga1 Jan 29, 2024
8de9a6b
Update Dockerfile
mansinga1 Jan 29, 2024
27c8e31
Merge pull request #19 from mansinga1/test
mansinga1 Jan 29, 2024
84d0b50
updated the run workflow
Jan 29, 2024
2c2f59c
Merge pull request #20 from mansinga1/test
mansinga1 Jan 29, 2024
2a8cd70
Update frontend-ci.yml
mansinga1 Jan 29, 2024
fb5ee87
Update frontend-ci.yml
mansinga1 Jan 29, 2024
65b2e46
Update frontend-ci.yml
mansinga1 Jan 29, 2024
ed6941c
Update frontend-ci.yml
mansinga1 Jan 29, 2024
8f5c626
Update frontend-ci.yml
mansinga1 Jan 29, 2024
8db7a07
Update frontend-ci.yml
mansinga1 Jan 29, 2024
d7f3bb8
Update frontend-ci.yml
mansinga1 Jan 29, 2024
caa32a1
Merge branch 'main' into test
mansinga1 Jan 29, 2024
9509cb9
updated the run workflow
Jan 29, 2024
ce797e9
updated
Jan 29, 2024
dd010b3
changed docker file
Jan 29, 2024
9391f82
changed docker file
Jan 29, 2024
f3e7f48
...
Jan 29, 2024
0d23ccb
test
Jan 29, 2024
b474106
newest file
Jan 29, 2024
20d9024
last change
Jan 29, 2024
b4b6552
trying
Jan 29, 2024
f2ccc53
last new change
Jan 29, 2024
e2d8917
last lasr
Jan 29, 2024
2d8fdac
updated node version number
Jan 30, 2024
13f2232
updated
Jan 30, 2024
7a7804b
test
Jan 30, 2024
807fc14
latest change
Jan 30, 2024
a2dfe82
chnaged the set up
Jan 30, 2024
c4123e3
added lint
Jan 30, 2024
a97f6cd
added if lint passes
Jan 30, 2024
d2e71da
uodated node version number
Jan 30, 2024
3d6f9b5
included backend CI
Jan 30, 2024
9e0fc19
make a change
Jan 30, 2024
73a9514
changed file and updated to python
Jan 30, 2024
3813990
backend CI
Jan 30, 2024
938f92a
updated backend with correct source
Jan 30, 2024
ea65275
uodated my backend
Jan 30, 2024
7706aa6
last
Jan 30, 2024
e927e97
updated
Jan 30, 2024
83cc9b9
latest
Jan 30, 2024
eee5cbe
added new line
Jan 30, 2024
89aae64
latest
Jan 30, 2024
17fa449
confirm
Jan 30, 2024
b77c067
removed lint error
Jan 30, 2024
2cac9c0
rectify front end
Jan 30, 2024
d381079
removed maven use
Jan 30, 2024
91b5e34
test
Jan 30, 2024
2a10252
included frontend-cd
Feb 1, 2024
f312346
included secrets
Feb 1, 2024
1cf0bd7
last update
Feb 1, 2024
6e433a6
update
Feb 1, 2024
be91eb0
added final ci command
Feb 24, 2024
f1cee10
test backend-ci
Feb 24, 2024
27aca3b
commited front end CD
Feb 24, 2024
e85330e
updated region
Feb 24, 2024
d56d85b
update
Feb 24, 2024
b5430c1
update
Feb 24, 2024
c55a523
updated workflow
Feb 24, 2024
14ad6ee
lastone
Feb 24, 2024
51e8233
last
Feb 24, 2024
4a165a8
test
Feb 24, 2024
f335773
tired
Feb 24, 2024
a41f186
tired
Feb 24, 2024
7ef4839
new
Feb 24, 2024
95b3772
add
Feb 24, 2024
6f06fe1
test
Feb 24, 2024
1b7bbaf
test
Feb 24, 2024
ca0b0d1
new
Feb 24, 2024
5644dac
test
Feb 24, 2024
5f8df87
test
Feb 24, 2024
5fa1090
add
Feb 24, 2024
f0d8575
test
Feb 24, 2024
3139c09
test
Feb 24, 2024
b40bb34
test
Feb 24, 2024
4479f74
new
Feb 24, 2024
c6ece7e
update
Feb 24, 2024
e734236
test
Feb 24, 2024
ba9400e
test
Feb 24, 2024
7d77eb8
final
Feb 24, 2024
22a7e8b
uploaded kube config
Feb 24, 2024
3836eed
test
Feb 24, 2024
7fd259f
update
Feb 24, 2024
a5a8492
test
Feb 24, 2024
33caf3f
test
Feb 24, 2024
fede2dc
test kubectl
Feb 28, 2024
b36bb2d
test
Feb 28, 2024
6cc9fc5
revert last commit
Feb 28, 2024
5c7f29e
only commited my test file
Feb 28, 2024
fe0fcb3
test
Feb 28, 2024
b686ac5
specify version
Feb 28, 2024
70f7985
removed variables
Feb 28, 2024
49a7a14
understanding the pattern
Feb 28, 2024
b764908
test
Feb 28, 2024
1fc2dc1
test
Feb 28, 2024
b2362fb
new changes
Feb 29, 2024
706789e
removed env
Feb 29, 2024
a14fe71
test for kubectl
Feb 29, 2024
2b4e62a
add
Feb 29, 2024
7a82961
test
Feb 29, 2024
ec2caa3
update
Feb 29, 2024
0523f13
.
Feb 29, 2024
eae0da7
.
Feb 29, 2024
e52c905
.
Feb 29, 2024
64f515c
test
Feb 29, 2024
12f4c09
test pods
Feb 29, 2024
08f6335
test
Feb 29, 2024
3f2c139
tired
Feb 29, 2024
096a2c9
new
Feb 29, 2024
d59e4e6
test
Feb 29, 2024
1dd8739
test_new
Feb 29, 2024
dd15cae
last
Feb 29, 2024
2525fe3
test_new
Feb 29, 2024
bc28f6b
update
Feb 29, 2024
b3d12ea
newest
Feb 29, 2024
c3882c9
test
Feb 29, 2024
a840d92
pwd
Feb 29, 2024
5cc0912
test_new
Feb 29, 2024
9c35dd7
test
Feb 29, 2024
dea9b25
last
Feb 29, 2024
4e450ea
new
Feb 29, 2024
c0c2f32
test
Feb 29, 2024
6c3f6b1
latest
Feb 29, 2024
c3f0839
test
Feb 29, 2024
3b9537e
newest
Feb 29, 2024
80591e0
new
Feb 29, 2024
3a93cf7
test
Feb 29, 2024
53b2555
test
Feb 29, 2024
7926a71
testing add
Feb 29, 2024
3729825
test
Feb 29, 2024
2fb5dd5
added path to directory
Feb 29, 2024
c4a86ca
test
Feb 29, 2024
ab6c08e
final
Feb 29, 2024
767310e
new
Feb 29, 2024
593bd26
test
Mar 1, 2024
c7639e7
test
Mar 1, 2024
cef2345
new
Mar 1, 2024
341b652
tired
Mar 1, 2024
1f7fe57
.test
Mar 1, 2024
0ca3077
tired.com
Mar 1, 2024
ee69456
i dun gree
Mar 1, 2024
9d19b11
many more
Mar 1, 2024
4340e2a
new
Mar 1, 2024
f6f432a
lord
Mar 1, 2024
c3d74b8
gbefun
Mar 1, 2024
7b343cc
update
Mar 1, 2024
308551a
try to deploy
Mar 1, 2024
3517afb
test backend CD
Mar 1, 2024
ff45401
clean up
Mar 1, 2024
b8f807c
env variable
Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions .github/workflows/backend-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Backend CD

on:
push:
branches:
- main
paths:
- 'starter/backend/**'
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pipenv
run: |
python -m pip install pipenv

- name: Install Dependencies
run: |
cd starter/backend
pipenv install

- name: Install flake8
run: |
cd starter/backend
pipenv run pip install flake8

- name: Lint Code
run: |
cd starter/backend
pipenv run flake8

- name: Lint Code
run: |
cd starter/backend
pipenv run lint

test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pipenv
run: |
python -m pip install pipenv

- name: Install Dependencies
run: |
cd starter/backend
pipenv install

- name: Run Tests
run: |
cd starter/backend
pipenv run test

build:
runs-on: ubuntu-latest
needs: [lint, test]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pipenv
run: |
python -m pip install pipenv

- name: Install Dependencies
run: |
cd starter/backend
pipenv installku

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: backend
IMAGE_TAG: ${{ github.sha }}
run: |
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 947772818907.dkr.ecr.us-east-1.amazonaws.com
cd starter/backend/
docker build -t backend .
docker tag backend:latest 947772818907.dkr.ecr.us-east-1.amazonaws.com/backend:latest
docker push 947772818907.dkr.ecr.us-east-1.amazonaws.com/backend:latest

- name: Install kubectl
run: |
curl -sLO https://storage.googleapis.com/kubernetes-release/release/v1.19.9/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/

- name: Check kubectl version
run: kubectl version --client

- name: Display kubectl help
run: kubectl help

- name: Install Kustomize
run: |
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
sudo mv kustomize /usr/local/bin/


- name: Check Kustomize version
run: kustomize version

- name: Update AWS CLI
run: |
sudo apt-get install -y awscli
aws --version


- name: Add AWS EKS cluster to kubeconfig
run: |
# Specify AWS EKS cluster details
AWS_REGION=us-east-1
EKS_CLUSTER_NAME=cluster

# Set the path for the kubeconfig file
KUBECONFIG_PATH=/home/runner/.kube/config

# Update kubeconfig with AWS EKS cluster
aws eks --region ${AWS_REGION} update-kubeconfig --name ${EKS_CLUSTER_NAME} --kubeconfig $KUBECONFIG_PATH


# Display the updated kubeconfig content (optional, for verification)
cat $KUBECONFIG_PATH

env:
KUBECONFIG: /home/runner/.kube/config

- name: Check kubectl commands
run: kubectl get pods

- name: Deploy to EKS
run: |
cd starter/backend/k8s
kustomize edit set image backend=947772818907.dkr.ecr.us-east-1.amazonaws.com/backend:latest


- name: Apply the manifests to the cluster
run: |
cd starter/backend/k8s
kustomize build | kubectl apply -f - --validate=false
116 changes: 116 additions & 0 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Backend CI

on:
pull_request:
branches:
- main
paths:
- 'starter/backend/**'
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pipenv
run: |
python -m pip install pipenv

- name: Install Dependencies
run: |
cd starter/backend
pipenv install

- name: Install flake8
run: |
cd starter/backend
pipenv run pip install flake8

- name: Lint Code
run: |
cd starter/backend
pipenv run flake8

- name: Lint Code
run: |
cd starter/backend
pipenv run lint

test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pipenv
run: |
python -m pip install pipenv

- name: Install Dependencies
run: |
cd starter/backend
pipenv install

- name: Run Tests
run: |
cd starter/backend
pipenv run test

build:
runs-on: ubuntu-latest
needs: [lint, test]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Install pipenv
run: |
python -m pip install pipenv

- name: Install Dependencies
run: |
cd starter/backend
pipenv install

- name: Install flake8
run: |
cd starter/backend
pipenv run pip install flake8

- name: Lint Code
run: |
cd starter/backend
pipenv run flake8

# - name: Lint Code (Fail Workflow on Lint Failure)
# run: |
# cd starter/backend
# pipenv run lint-fail

- name: Build Docker App
run: |
cd starter/backend
docker build -t frontend .

# Add other steps as needed for your build and test process
Loading