Skip to content

Commit cb17844

Browse files
init
1 parent dca461b commit cb17844

File tree

371 files changed

+52837
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+52837
-11
lines changed

.github/workflows/deploy-app.yaml

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
name: CI/CD for apps
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-java-app:
10+
name: Build Java app
11+
runs-on: buildjet-2vcpu-ubuntu-2204-arm
12+
outputs:
13+
job_successful: ${{ steps.job_successful.outputs.job_successful }}
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 2
19+
- name: Check for changes in directory
20+
id: check_changes
21+
run: |
22+
if git diff-tree --name-only --no-commit-id ${{ github.sha }} | grep -q "^backend"; then
23+
echo "changes_made=yes" >> "$GITHUB_ENV"
24+
else
25+
echo "changes_made=no" >> "$GITHUB_ENV"
26+
fi
27+
- name: Set up QEMU
28+
if: ${{env.changes_made == 'yes'}}
29+
uses: docker/setup-qemu-action@v2
30+
with:
31+
platforms: "arm64"
32+
- name: Set up Docker Buildx
33+
if: ${{env.changes_made == 'yes'}}
34+
uses: docker/setup-buildx-action@v2
35+
- name: Login to Docker Container Registry
36+
if: ${{env.changes_made == 'yes'}}
37+
uses: docker/login-action@v2
38+
with:
39+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
40+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
41+
42+
- name: Build and push the Docker image
43+
if: ${{env.changes_made == 'yes'}}
44+
uses: docker/build-push-action@v3
45+
with:
46+
push: true
47+
context: "{{defaultContext}}:backend"
48+
platforms: "linux/arm64"
49+
tags: |
50+
indianbond/easystartup:suggest-feature-backend-latest-arm
51+
indianbond/easystartup:suggest-feature-backend-${{ github.sha }}-arm
52+
- id: job_successful
53+
if: ${{env.changes_made == 'yes'}}
54+
run: echo "job_successful=yes" >> "$GITHUB_OUTPUT"
55+
build-nextjs-app:
56+
name: Build NextJs app
57+
runs-on: buildjet-2vcpu-ubuntu-2204-arm
58+
outputs:
59+
job_successful: ${{ steps.job_successful.outputs.job_successful }}
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v3
63+
with:
64+
fetch-depth: 2
65+
- name: Check for changes in directory
66+
id: check_changes
67+
run: |
68+
if git diff-tree --name-only --no-commit-id ${{ github.sha }} | grep -q "^frontend"; then
69+
echo "changes_made=yes" >> "$GITHUB_ENV"
70+
else
71+
echo "changes_made=no" >> "$GITHUB_ENV"
72+
fi
73+
- name: Set up QEMU
74+
if: ${{env.changes_made == 'yes'}}
75+
uses: docker/setup-qemu-action@v2
76+
with:
77+
platforms: "arm64"
78+
- name: Set up Docker Buildx
79+
if: ${{env.changes_made == 'yes'}}
80+
uses: docker/setup-buildx-action@v2
81+
- name: Login to Docker Container Registry
82+
if: ${{env.changes_made == 'yes'}}
83+
uses: docker/login-action@v2
84+
with:
85+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
86+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
87+
88+
- name: Build and push the Docker image
89+
if: ${{env.changes_made == 'yes'}}
90+
uses: docker/build-push-action@v3
91+
with:
92+
context: "{{defaultContext}}:frontend"
93+
platforms: "linux/arm64"
94+
push: true
95+
tags: |
96+
indianbond/easystartup:suggest-feature-ui-latest-arm
97+
indianbond/easystartup:suggest-feature-ui-${{ github.sha }}-arm
98+
- id: job_successful
99+
if: ${{env.changes_made == 'yes'}}
100+
run: echo "job_successful=yes" >> "$GITHUB_OUTPUT"
101+
build-nextjs-portal:
102+
name: Build NextJs portal
103+
runs-on: buildjet-2vcpu-ubuntu-2204-arm
104+
outputs:
105+
job_successful: ${{ steps.job_successful.outputs.job_successful }}
106+
steps:
107+
- name: Checkout repository
108+
uses: actions/checkout@v3
109+
with:
110+
fetch-depth: 2
111+
- name: Check for changes in directory
112+
id: check_changes
113+
run: |
114+
if git diff-tree --name-only --no-commit-id ${{ github.sha }} | grep -q "^frontend-portal"; then
115+
echo "changes_made=yes" >> "$GITHUB_ENV"
116+
else
117+
echo "changes_made=no" >> "$GITHUB_ENV"
118+
fi
119+
- name: Set up QEMU
120+
if: ${{env.changes_made == 'yes'}}
121+
uses: docker/setup-qemu-action@v2
122+
with:
123+
platforms: "arm64"
124+
- name: Set up Docker Buildx
125+
if: ${{env.changes_made == 'yes'}}
126+
uses: docker/setup-buildx-action@v2
127+
- name: Login to Docker Container Registry
128+
if: ${{env.changes_made == 'yes'}}
129+
uses: docker/login-action@v2
130+
with:
131+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
132+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
133+
134+
- name: Build and push the Docker image
135+
if: ${{env.changes_made == 'yes'}}
136+
uses: docker/build-push-action@v3
137+
with:
138+
context: "{{defaultContext}}:frontend-portal"
139+
platforms: "linux/arm64"
140+
push: true
141+
tags: |
142+
indianbond/easystartup:suggest-feature-ui-portal-latest-arm
143+
indianbond/easystartup:suggest-feature-ui-portal-${{ github.sha }}-arm
144+
- id: job_successful
145+
if: ${{env.changes_made == 'yes'}}
146+
run: echo "job_successful=yes" >> "$GITHUB_OUTPUT"
147+
update-helm-repo-backend:
148+
needs: [build-java-app]
149+
name: Commit new revision in helm repo for java app
150+
if: ${{needs.build-java-app.outputs.job_successful == 'yes'}}
151+
runs-on: ubuntu-latest
152+
steps:
153+
- name: Checkout Helm repo
154+
uses: actions/checkout@v3
155+
with:
156+
repository: "easyStartup-pulse/helm-charts"
157+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
158+
- name: Update backend values.yaml
159+
run: |
160+
cd charts/suggest-feature-backend/partition0
161+
sed -i 's|tag: "suggest-feature-backend-.*|tag: "suggest-feature-backend-'${{ github.sha }}'-arm"|' values.yaml
162+
git config --global user.name 'GitHub Actions'
163+
git config --global user.email '[email protected]'
164+
git add values.yaml
165+
git commit -m "Update values.yaml"
166+
git push
167+
update-helm-repo-ui:
168+
needs: [build-nextjs-app]
169+
name: Commit new revision in helm repo for ui
170+
if: ${{needs.build-nextjs-app.outputs.job_successful == 'yes'}}
171+
runs-on: ubuntu-latest
172+
steps:
173+
- name: Checkout Helm repo
174+
uses: actions/checkout@v3
175+
with:
176+
repository: "easyStartup-pulse/helm-charts"
177+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
178+
- name: Update values.yaml
179+
run: |
180+
cd charts/suggest-feature-ui
181+
sed -i 's|tag: "suggest-feature-ui-.*|tag: "suggest-feature-ui-'${{ github.sha }}'-arm"|' values.yaml
182+
git config --global user.name 'GitHub Actions'
183+
git config --global user.email '[email protected]'
184+
git add values.yaml
185+
git commit -m "Update ui values.yaml"
186+
git push
187+
update-helm-repo-ui-portal:
188+
needs: [build-nextjs-portal]
189+
name: Commit new revision in helm repo for frontend-portal
190+
if: ${{needs.build-nextjs-portal.outputs.job_successful == 'yes'}}
191+
runs-on: ubuntu-latest
192+
steps:
193+
- name: Checkout Helm repo
194+
uses: actions/checkout@v3
195+
with:
196+
repository: "easyStartup-pulse/helm-charts"
197+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}
198+
- name: Update values.yaml
199+
run: |
200+
cd charts/suggest-feature-ui-portal
201+
sed -i 's|tag: "suggest-feature-ui-portal.*|tag: "suggest-feature-ui-portal-'${{ github.sha }}'-arm"|' values.yaml
202+
git config --global user.name 'GitHub Actions'
203+
git config --global user.email '[email protected]'
204+
git add values.yaml
205+
git commit -m "Update ui portal values.yaml"
206+
git push
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+
defaults:
11+
run:
12+
working-directory: ./docs
13+
14+
jobs:
15+
build:
16+
name: Build Docusaurus
17+
runs-on: ubuntu-latest
18+
outputs:
19+
job_successful: ${{ steps.job_successful.outputs.job_successful }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- name: Check for changes in directory
25+
id: check_changes
26+
run: |
27+
if git diff-tree --name-only --no-commit-id ${{ github.sha }} | grep -q "^docs"; then
28+
echo "changes_made=yes" >> "$GITHUB_ENV"
29+
else
30+
echo "changes_made=no" >> "$GITHUB_ENV"
31+
fi
32+
- uses: actions/setup-node@v4
33+
if: ${{env.changes_made == 'yes'}}
34+
with:
35+
node-version: 18
36+
cache: npm
37+
cache-dependency-path: docs/package-lock.json
38+
39+
- name: Install dependencies
40+
if: ${{env.changes_made == 'yes'}}
41+
run: npm ci
42+
- name: Build website
43+
if: ${{env.changes_made == 'yes'}}
44+
run: npm run build
45+
46+
- name: Upload Build Artifact
47+
if: ${{env.changes_made == 'yes'}}
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: docs/build
51+
- id: job_successful
52+
if: ${{env.changes_made == 'yes'}}
53+
run: echo "job_successful=yes" >> "$GITHUB_OUTPUT"
54+
deploy:
55+
name: Deploy to GitHub Pages
56+
needs: [build]
57+
if: ${{needs.build.outputs.job_successful == 'yes'}}
58+
59+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
60+
permissions:
61+
pages: write # to deploy to Pages
62+
id-token: write # to verify the deployment originates from an appropriate source
63+
64+
# Deploy to the github-pages environment
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 93 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,106 @@
1-
# Compiled class file
2-
*.class
1+
# From https://github.com/github/gitignore/blob/master/Gradle.gitignore
2+
.gradle
3+
/build/
4+
5+
# Ignore Gradle GUI config
6+
gradle-app.setting
7+
8+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
9+
!gradle-wrapper.jar
10+
11+
# Cache of project
12+
.gradletasknamecache
313

4-
# Log file
5-
*.log
14+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
15+
# gradle/wrapper/gradle-wrapper.properties
616

7-
# BlueJ files
8-
*.ctxt
17+
18+
19+
# From https://github.com/github/gitignore/blob/master/Java.gitignore
20+
*.class
921

1022
# Mobile Tools for Java (J2ME)
1123
.mtj.tmp/
1224

1325
# Package Files #
1426
*.jar
1527
*.war
16-
*.nar
1728
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
2129

2230
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2331
hs_err_pid*
24-
replay_pid*
32+
33+
34+
# From https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
35+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
36+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
37+
38+
# User-specific stuff:
39+
.idea/workspace.xml
40+
.idea/tasks.xml
41+
.idea/dictionaries
42+
.idea/vcs.xml
43+
.idea/jsLibraryMappings.xml
44+
45+
# Sensitive or high-churn files:
46+
.idea/dataSources.ids
47+
.idea/dataSources.xml
48+
.idea/dataSources.local.xml
49+
.idea/sqlDataSources.xml
50+
.idea/dynamic.xml
51+
.idea/uiDesigner.xml
52+
53+
# Gradle:
54+
.idea/gradle.xml
55+
.idea/libraries
56+
57+
# Mongo Explorer plugin:
58+
.idea/mongoSettings.xml
59+
60+
## File-based project format:
61+
*.iws
62+
63+
## Plugin-specific files:
64+
65+
# IntelliJ
66+
/out/
67+
68+
# mpeltonen/sbt-idea plugin
69+
.idea_modules/
70+
71+
# JIRA plugin
72+
atlassian-ide-plugin.xml
73+
74+
# Crashlytics plugin (for Android Studio and IntelliJ)
75+
com_crashlytics_export_strings.xml
76+
crashlytics.properties
77+
crashlytics-build.properties
78+
fabric.properties
79+
80+
81+
*.DS_Store
82+
.AppleDouble
83+
.LSOverride
84+
85+
# Icon must end with two \r
86+
Icon
87+
88+
89+
# Thumbnails
90+
._*
91+
92+
# Files that might appear in the root of a volume
93+
.DocumentRevisions-V100
94+
.fseventsd
95+
.Spotlight-V100
96+
.TemporaryItems
97+
.Trashes
98+
.VolumeIcon.icns
99+
.com.apple.timemachine.donotpresent
100+
101+
# Directories potentially created on remote AFP share
102+
.AppleDB
103+
.AppleDesktop
104+
Network Trash Folder
105+
Temporary Items
106+
.apdisk

0 commit comments

Comments
 (0)