Skip to content

Commit

Permalink
Convert repo to use NPM workspaces (#382)
Browse files Browse the repository at this point in the history
* convert to workspaces

* move packages to new dirs
  • Loading branch information
ibolton336 authored Sep 1, 2022
1 parent 0e9138c commit 7b2c502
Show file tree
Hide file tree
Showing 556 changed files with 9,084 additions and 24,716 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install
working-directory: pkg/client
run: npm install
- name: Build
working-directory: pkg/client
run: npm run build

- name: Client Install
run: npm install -w pkg-client

- name: Client Build
run: npm run build -w pkg-client

- name: Test
working-directory: pkg/client
run: npm run test --coverage --watchAll=false
run: npm run test -w pkg-client
- uses: codecov/codecov-action@v1
with:
flags: unitests
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/pkg/**/node_modules
/pkg/client/public/locales/**/translation_old.json
/node_modules
/dist
/**/node_modules
/pkg-client/public/locales/**/translation_old.json
/.pnp
.pnp.js

# testing
/coverage

# production
/pkg/client/dist
/pkg/qa-tests/build
/pkg-client/dist
/pkg-qa-tests/build

# misc
.DS_Store
Expand All @@ -25,8 +26,8 @@ npm-debug.log*
.eslintcache

# cypress
/pkg/cypress/videos
/pkg/cypress/screenshots
/pkg-cypress/videos
/pkg-cypress/screenshots
.nyc_output

# VSCode
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
FROM registry.access.redhat.com/ubi8/nodejs-16 as builder
USER 0
COPY . .
WORKDIR "/opt/app-root/src/pkg/client"
RUN npm install && npm run build
WORKDIR "/opt/app-root/src/pkg/server"
WORKDIR "/opt/app-root/src/"
RUN npm install && npm run build -w pkg-client
WORKDIR "/opt/app-root/src/pkg-server"
RUN npm install

# Runner image
Expand Down Expand Up @@ -33,9 +33,9 @@ LABEL name="konveyor/tackle2-ui" \
io.openshift.min-cpu="100m" \
io.openshift.min-memory="350Mi"

COPY --from=builder /opt/app-root/src/pkg/client/dist /opt/app-root/src/pkg/client/dist
COPY --from=builder /opt/app-root/src/pkg/client/dist/index.html.ejs /opt/app-root/src/pkg/server/views/index.html.ejs
COPY --from=builder /opt/app-root/src/pkg/server /opt/app-root/src/pkg/server
COPY --from=builder /opt/app-root/src/pkg-client/dist /opt/app-root/src/pkg-client/dist
COPY --from=builder /opt/app-root/src/pkg-client/dist/index.html.ejs /opt/app-root/src/pkg-server/views/index.html.ejs
COPY --from=builder /opt/app-root/src/pkg-server /opt/app-root/src/pkg-server
COPY --from=builder /opt/app-root/src/entrypoint.sh /usr/bin/entrypoint.sh

ENV DEBUG=1
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ if [[ $AUTH_REQUIRED != "false" ]]; then
exit 1
fi
fi
cd pkg/server
cd pkg-server
exec node index.js
Loading

0 comments on commit 7b2c502

Please sign in to comment.