Skip to content

Commit ae7a9e7

Browse files
committed
"new dockerfile"
1 parent fea83a6 commit ae7a9e7

2 files changed

Lines changed: 70 additions & 67 deletions

File tree

.github/workflows/ci.yml

Lines changed: 69 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -37,90 +37,92 @@ jobs:
3737
- name: Build Frontend Image
3838
run: |
3939
cd frontend
40-
docker build -t "${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER" .
40+
mv Dockerfile Dockerfile1
41+
sed -i 's/LABEL Maintainer="Rohan"/LABEL Maintainer="Mohan"/' Dockerfile1
42+
docker build -t "${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER" -f Dockerfile1 .
4143
42-
- name: Build Backend Image
43-
run: |
44-
cd backend
45-
docker build -t "${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER" .
44+
# - name: Build Backend Image
45+
# run: |
46+
# cd backend
47+
# docker build -t "${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER" .
4648

4749
- name: Log in to Docker registry
4850
run: echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
4951

50-
- name: Scan container images
51-
run: |
52-
trivy image "${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
53-
trivy image "${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
52+
# - name: Scan container images
53+
# run: |
54+
# trivy image "${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
55+
# trivy image "${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
5456

5557
- name: Push Frontend Image
5658
run: docker push "${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
5759

58-
- name: Push Backend Image
59-
run: docker push "${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
60+
# - name: Push Backend Image
61+
# run: docker push "${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER"
6062

61-
frontend-test:
62-
runs-on: ubuntu-latest
63-
needs: ['build-and-push']
63+
# frontend-test:
64+
# runs-on: ubuntu-latest
65+
# needs: ['build-and-push']
6466

65-
steps:
66-
- name: Checkout code
67-
uses: actions/checkout@v2
67+
# steps:
68+
# - name: Checkout code
69+
# uses: actions/checkout@v2
6870

69-
- name: Set up Node.js
70-
uses: actions/setup-node@v2
71-
with:
72-
node-version: 8
71+
# - name: Set up Node.js
72+
# uses: actions/setup-node@v2
73+
# with:
74+
# node-version: 8
7375

74-
- name: Install dependencies
75-
run: |
76-
cd frontend
77-
npm install
78-
npm install -g @angular/cli@1.7.3
76+
# - name: Install dependencies
77+
# run: |
78+
# cd frontend
79+
# npm install
80+
# npm install -g @angular/cli@1.7.3
7981

80-
- name: Build and test frontend
81-
run: |
82-
cd frontend
83-
npm build
84-
npm test --browsers=ChromeHeadlessNoSandbox
82+
# - name: Build and test frontend
83+
# run: |
84+
# cd frontend
85+
# npm build
86+
# npm test --browsers=ChromeHeadlessNoSandbox
8587

86-
backend-test:
87-
runs-on: ubuntu-latest
88-
needs: ['build-and-push']
88+
# backend-test:
89+
# runs-on: ubuntu-latest
90+
# needs: ['build-and-push']
8991

90-
steps:
91-
- name: Checkout code
92-
uses: actions/checkout@v2
92+
# steps:
93+
# - name: Checkout code
94+
# uses: actions/checkout@v2
9395

94-
- name: Set up Node.js
95-
uses: actions/setup-node@v2
96-
with:
97-
node-version: 8
96+
# - name: Set up Node.js
97+
# uses: actions/setup-node@v2
98+
# with:
99+
# node-version: 8
98100

99-
- name: Install dependencies
100-
run: npm install
101+
# - name: Install dependencies
102+
# run: npm install
101103

102-
- name: Test backend
103-
run: |
104-
cd backend
105-
npm test
104+
# - name: Test backend
105+
# run: |
106+
# cd backend
107+
# npm test
106108

107-
update-manifest-and-deploy-stage:
108-
runs-on: ubuntu-latest
109-
needs: ['build-and-push', 'frontend-test', 'backend-test']
110-
steps:
111-
- uses: actions/checkout@v3
112-
with:
113-
repository: RohanRusta21/CloudRail_Assignment_Manifest
114-
ref: 'main'
115-
token: ${{ secrets.G_TOKEN }}
116-
- name: setup git config
117-
run: |
118-
git config --global user.email "rohanrustagi21@gmail.com"
119-
git config --global user.name "RohanRusta21"
120-
echo ${{ github.sha }}
121-
sed -i "s#${DOCKERHUB_USERNAME}.*#${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER#g" frontend-deployment.yml
122-
sed -i "s#${DOCKERHUB_USERNAME}.*#${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER#g" backend-deployment.yml
123-
git add -A
124-
git commit -am "Update image for Version - $GITHUB_RUN_NUMBER"
125-
- run: echo ${{ github }}
126-
- run: git push origin main
109+
# update-manifest-and-deploy-stage:
110+
# runs-on: ubuntu-latest
111+
# needs: ['build-and-push', 'frontend-test', 'backend-test']
112+
# steps:
113+
# - uses: actions/checkout@v3
114+
# with:
115+
# repository: RohanRusta21/CloudRail_Assignment_Manifest
116+
# ref: 'main'
117+
# token: ${{ secrets.G_TOKEN }}
118+
# - name: setup git config
119+
# run: |
120+
# git config --global user.email "rohanrustagi21@gmail.com"
121+
# git config --global user.name "RohanRusta21"
122+
# echo ${{ github.sha }}
123+
# sed -i "s#${DOCKERHUB_USERNAME}.*#${DOCKERHUB_USERNAME}/${FRONTEND_REPO_NAME}:$GITHUB_RUN_NUMBER#g" frontend-deployment.yml
124+
# sed -i "s#${DOCKERHUB_USERNAME}.*#${DOCKERHUB_USERNAME}/${BACKEND_REPO_NAME}:$GITHUB_RUN_NUMBER#g" backend-deployment.yml
125+
# git add -A
126+
# git commit -am "Update image for Version - $GITHUB_RUN_NUMBER"
127+
# - run: echo ${{ github }}
128+
# - run: git push origin main

frontend/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM node:8
2+
LABEL Maintainer="Rohan"
23
WORKDIR /app
34
RUN npm install -g @angular/cli@1.7.3
45
COPY package*.json ./

0 commit comments

Comments
 (0)