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

chore: restructure into a monorepo using pnpm #2140

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0f98d80
feat(repo)!: restructure into a monorepo
Elessar1802 Oct 20, 2024
477ff64
chore: update Dockerfile(s) & allow build on arm
Elessar1802 Oct 20, 2024
a377eb1
chore: remove --frozen-lockfile option due to fe-lib dep
Elessar1802 Oct 20, 2024
f29ec8d
chore: update Dockerfile.web to override devtron-fe-lib if mounted
Elessar1802 Oct 20, 2024
fa41428
fix: build command in package.json & revert target url in vite.config…
Elessar1802 Nov 11, 2024
2357887
fix: enable HMR for packages in dashboard
Elessar1802 Nov 11, 2024
d66ede3
fix: use import statement for devtron-fe-lib
Elessar1802 Nov 11, 2024
dfb04b9
fix: review comments
Elessar1802 Nov 11, 2024
3c139b6
chore: add scripts for storybook in root package.json
Elessar1802 Nov 11, 2024
c8ecd25
fix(lint): lint --fix applied on all files
Elessar1802 Nov 11, 2024
3983993
fix: broken tsconfig.json
Elessar1802 Nov 11, 2024
ba3cb85
feat: add lint-staged & break lint into compile & lint
Elessar1802 Nov 11, 2024
dfd122d
chore: change author of fe-lib dummy repo
Elessar1802 Nov 12, 2024
41a30d9
chore: update README.md to reflect latest changes
Elessar1802 Nov 12, 2024
ffcf475
fix: link to release verion in README.md
Elessar1802 Nov 12, 2024
0562505
chore: mention correct license in package.json
Elessar1802 Nov 12, 2024
b4365b4
chore: remove author and license from package.json of internal apps &…
Elessar1802 Nov 12, 2024
c216503
chore: revert target url in vite.config.mts
Elessar1802 Nov 12, 2024
52142a9
fix(eslint): unable to find tsconfig.json
Elessar1802 Nov 12, 2024
edea433
chore: add compile command to root package.json
Elessar1802 Nov 12, 2024
1830b80
fix: use resolve to get lib paths in vite.config.mts
Elessar1802 Nov 12, 2024
7e428f3
chore: remove unneeded ci-workflows
Elessar1802 Nov 12, 2024
3a25c22
.
Elessar1802 Nov 12, 2024
e223932
fix: change import style for devtron-fe-lib
Elessar1802 Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 0 additions & 23 deletions .deepsource.toml

This file was deleted.

6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
node_modules/
README.md
.github
.husky
.lintstagedrc
LICENSE
.vscode/
.prettierrc.js
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: pnpm install

- name: Build everything
run: pnpm build:prod

- name: Check linting issues
run: yarn lint
- name: Check compilation issues
run: pnpm lint
27 changes: 0 additions & 27 deletions .github/workflows/playwright.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/test-coverage.yaml

This file was deleted.

22 changes: 13 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
node_modules/
.pnp/
.pnp.js

# testing
/coverage
coverage/

# production
/build
/dist
build/
dist/

# misc
.DS_Store
Expand All @@ -29,13 +29,17 @@ yarn-error.log
/public/env-config.js
env-config.js
.idea/
/test-results/
/playwright-report/
/playwright/.cache/
# TODO: delete unnecessary stuff
test-results/
playwright-report/
playwright/.cache/
playwright/.auth/
.npmrc

eshankvaish marked this conversation as resolved.
Show resolved Hide resolved
package-lock.json

*storybook.log
storybook-static
storybook-static/

pnpm-lock.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lock file should be removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add fe-lib script in dummy repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update readme

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the OSS build

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint ignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HMR not working for scss

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ent to OSS and OSS to ent switch back

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue with importComponentFromFELIb in case of direct redirection

fe-internal-setup.sh
eshankvaish marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@

. "$(dirname "$0")/_/husky.sh"

yarn tsc --noEmit
yarn lint-staged
pnpm -r compile
pnpm -r lint-staged
29 changes: 15 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
FROM node:20-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
eshankvaish marked this conversation as resolved.
Show resolved Hide resolved
RUN corepack enable

WORKDIR /app
COPY package.json .
COPY yarn.lock .

RUN yarn install --network-timeout 600000

COPY src/ src
COPY nginx.conf .
COPY tsconfig.json .
COPY vite.config.mts .
COPY . .

RUN echo `git rev-parse --short HEAD` > health.html
RUN yarn build

RUN if [ -d "./devtron-fe-lib" ]; then rm -rf packages/devtron-fe-lib; cp -r ./devtron-fe-lib packages/devtron-fe-lib; fi

RUN pnpm i
RUN pnpm run build:prod
eshankvaish marked this conversation as resolved.
Show resolved Hide resolved

FROM nginx:stable

RUN useradd -ms /bin/bash devtron
COPY --from=builder /app/dist/ /usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./nginx-default.conf /etc/nginx/conf.d/default.conf

COPY --from=builder /app/apps/web/dist/ /usr/share/nginx/html
COPY --from=builder /app/apps/web/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /app/apps/web/nginx-default.conf /etc/nginx/conf.d/default.conf

WORKDIR /usr/share/nginx/html
COPY --from=builder /app/./env.sh .
COPY --from=builder /app/.env .
COPY --from=builder /app/apps/web/./env.sh .
COPY --from=builder /app/apps/web/.env .
COPY --from=builder /app/health.html .

RUN chown -R devtron:devtron /usr/share/nginx/html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cases to be tested:

  • Local: OSS / Ent
  • OSS / Ent Deployed
  • EA OSS / ENT Deployed

Copy link
Contributor

@eshankvaish eshankvaish Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Dashboard CI
  • Remove the deprecated action yamls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Removed the deprecated action yamls
  • Dashboard CI

Expand Down
13 changes: 7 additions & 6 deletions Dockerfile.storybook
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
FROM node:20-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /app
COPY package.json .
COPY yarn.lock .

RUN yarn install --network-timeout 600000

COPY . .

RUN yarn build-storybook
RUN pnpm i

RUN pnpm build:storybook

FROM nginx:stable

COPY --from=builder /app/storybook-static/ /usr/share/nginx/html
COPY --from=builder /app/apps/web/storybook-static/ /usr/share/nginx/html
eshankvaish marked this conversation as resolved.
Show resolved Hide resolved
WORKDIR /usr/share/nginx/html

CMD ["/bin/bash", "-c", "nginx -g \"daemon off;\""]
Expand Down
Loading