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: Move Apps-Engine to monorepo #32951

Merged
merged 55 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
07b030d
Initial move
d-gubert Jul 29, 2024
9575a7e
Refactor scripts and ditch gulp
d-gubert Jul 31, 2024
b95de0d
Update with alpha files
d-gubert Aug 1, 2024
a40f1de
Update internal dependencies to the apps-engine
d-gubert Aug 1, 2024
f84c242
Update code owners
d-gubert Aug 1, 2024
c7b44c4
Fix lint
d-gubert Aug 1, 2024
1adca63
Fix meteor dockerfile
d-gubert Aug 1, 2024
307876c
Remove deno-bin as a dependency
d-gubert Aug 6, 2024
9bc1182
Fix Deno install on docker files
d-gubert Aug 6, 2024
72b6477
Use DENO_DIR environment variable if available
d-gubert Aug 6, 2024
34c8947
Add a setup-deno step to the workflows
d-gubert Aug 7, 2024
4ffb383
Fix Dockerfiles and install deno
d-gubert Aug 7, 2024
fb4a64f
debug: current path
d-gubert Aug 7, 2024
2025ca1
debug 2
d-gubert Aug 7, 2024
77cf42e
debug 3
d-gubert Aug 7, 2024
a98a566
debug
d-gubert Aug 7, 2024
f13e4ef
debug
d-gubert Aug 7, 2024
023b22f
debug
d-gubert Aug 7, 2024
2b57cdc
Fix release-versions step on CI
d-gubert Aug 7, 2024
f0fa128
Fix build-docker action
d-gubert Aug 7, 2024
05e8985
add apps engine to docker files
ggazzo Aug 13, 2024
3d94f14
add turbo repo to handle different outputs
ggazzo Aug 14, 2024
5bd6ef2
Merge remote-tracking branch 'origin/develop' into chore/apps-engine-…
d-gubert Sep 10, 2024
8b2ecc2
Fix alpine build of authorization-service image
d-gubert Sep 11, 2024
e0f648d
Sync apps-engine alpha files
d-gubert Sep 11, 2024
8a77561
Fix lint
d-gubert Sep 11, 2024
a260ecf
Fix presenve-service build
d-gubert Sep 11, 2024
8d5e504
Fix all services dockerfiles
d-gubert Sep 11, 2024
863149b
Merge branch 'develop' into chore/apps-engine-package
d-gubert Sep 11, 2024
131ecf3
Remove deno-bin reference
d-gubert Sep 13, 2024
35a8185
Merge remote-tracking branch 'origin/develop' into chore/apps-engine-…
d-gubert Sep 14, 2024
a5c75e7
Add hoisting limits to the apps-engine package
d-gubert Sep 14, 2024
76388bc
Merge branch 'develop' into chore/apps-engine-package
d-gubert Sep 16, 2024
667cd9b
Bump apps-engine to latest alpha
d-gubert Sep 16, 2024
9f91bf4
Execute apps-engine unit tests along with the rest of the packages
d-gubert Sep 17, 2024
78dc41d
Merge branch 'develop' into chore/apps-engine-package
d-gubert Sep 17, 2024
5a6aa2f
Merge branch 'develop' into chore/apps-engine-package
d-gubert Sep 17, 2024
204c3ab
Merge branch 'develop' into chore/apps-engine-package
d-gubert Sep 19, 2024
e9373e6
Merge remote-tracking branch 'origin/develop' into chore/apps-engine-…
d-gubert Sep 23, 2024
7f1852e
Change postinstall script to be run at build
d-gubert Sep 24, 2024
c640d3c
Remove unnecessary Deno installation in services' Dockerfiles
d-gubert Sep 24, 2024
59e4450
Remove dependency hoisting config from @rocket.chat/jwt
d-gubert Sep 24, 2024
cc72bca
Remove deno-dir parameter from setup-node action
d-gubert Sep 24, 2024
e2b19ca
Add deno-version param to new actions
d-gubert Sep 24, 2024
be3948e
Send PATH to the system calls
d-gubert Sep 24, 2024
34ca69b
Discard changes to packages/jwt/package.json
d-gubert Sep 24, 2024
fdcee77
Change jwt package to use hoisting limits
d-gubert Sep 24, 2024
717b9c3
Sync with Apps-Engine alpha
d-gubert Sep 26, 2024
a1d0b93
Change apps-engine to dev dependencies in local packages
d-gubert Sep 26, 2024
efeb21a
Use deno:bin image to copy executable
d-gubert Sep 27, 2024
e7fbb09
Remove LICENSE from apps-engine package
d-gubert Sep 27, 2024
27824ec
Revert the --unsafe-perm install
d-gubert Sep 27, 2024
616ce26
Add Deno as prerequisite on the README file
d-gubert Sep 27, 2024
5bbf215
fix deno:bin path
sampaiodiego Sep 27, 2024
2bb36d7
Merge branch 'develop' into chore/apps-engine-package
kodiakhq[bot] Sep 27, 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
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/packages/* @RocketChat/Architecture
/packages/apps-engine/ @RocketChat/apps
/packages/core-typings/ @RocketChat/Architecture
/packages/rest-typings/ @RocketChat/Architecture @RocketChat/backend
/packages/ui-contexts/ @RocketChat/frontend
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/build-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
required: false
password:
required: false
deno-version:
required: true
type: string

outputs:
image-name:
Expand Down Expand Up @@ -59,7 +62,7 @@ runs:
fi;

echo "Build ${{ inputs.release }} Docker image"
docker build -t $IMAGE_NAME .
docker build --build-arg DENO_VERSION=${{ inputs.deno-version }} -t $IMAGE_NAME .

echo "image-name-base=${IMAGE_NAME_BASE}" >> $GITHUB_OUTPUT
echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
Expand Down
7 changes: 7 additions & 0 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
required: true
description: 'Node version'
type: string
deno-version:
required: true
description: 'Deno version'
type: string
platform:
required: false
description: 'Platform'
Expand Down Expand Up @@ -66,6 +70,7 @@ runs:
if: inputs.setup == 'true'
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}
Expand All @@ -79,6 +84,8 @@ runs:
run: |
args=(rocketchat ${{ inputs.build-containers }})

export DENO_VERSION="${{ inputs.deno-version }}"

docker compose -f docker-compose-ci.yml build "${args[@]}"

- name: Publish Docker images to GitHub Container Registry
Expand Down
5 changes: 5 additions & 0 deletions .github/actions/meteor-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
NPM_TOKEN:
required: false
description: 'NPM token'
deno-version:
required: true
description: 'Deno version'
type: string

runs:
using: composite
Expand All @@ -30,6 +34,7 @@ runs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}
Expand Down
25 changes: 15 additions & 10 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ inputs:
install:
required: false
description: 'Install dependencies'
deno-dir:
required: false
description: 'Deno directory'
default: ~/.deno-cache
type: boolean
deno-version:
required: true
description: 'Deno version'
type: string
NPM_TOKEN:
required: false
description: 'NPM token'
Expand All @@ -28,21 +29,20 @@ runs:
using: composite

steps:
- run: echo 'DENO_DIR=${{ inputs.deno-dir }}' >> $GITHUB_ENV
shell: bash

- name: Cache Node Modules
- name: Cache Node Modules & Deno
if: inputs.cache-modules
id: cache-node-modules
uses: actions/cache@v3
with:
# We need to cache node_modules for all workspaces with "hoistingLimits" defined
path: |
.turbo/cache
node_modules
${{ env.DENO_DIR }}
apps/meteor/node_modules
apps/meteor/ee/server/services/node_modules
key: node-modules-${{ hashFiles('yarn.lock') }}
packages/apps-engine/node_modules
packages/apps-engine/.deno-cache
key: node-modules-${{ hashFiles('yarn.lock') }}-deno-${{ hashFiles('packages/apps-engine/deno-runtime/deno.lock') }}
#
# Could use this command to list all paths to save:
# find . -name 'node_modules' -prune | grep -v "/\.meteor/" | grep -v "/meteor/packages/"
Expand All @@ -54,6 +54,11 @@ runs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: Use Deno ${{ inputs.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ inputs.deno-version }}

- name: yarn login
shell: bash
if: inputs.NPM_TOKEN
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
node-version:
required: true
type: string
deno-version:
required: true
type: string

env:
TOOL_NODE_FLAGS: ${{ vars.TOOL_NODE_FLAGS }}
Expand Down Expand Up @@ -33,6 +36,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-deploy-gh-pages-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
if: github.event.action != 'closed'
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
node-version:
required: true
type: string
deno-version:
required: true
type: string
lowercase-repo:
required: true
type: string
Expand Down Expand Up @@ -128,6 +131,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
node-version:
required: true
type: string
deno-version:
required: true
type: string
enterprise-license:
required: false
type: string
Expand Down Expand Up @@ -37,6 +40,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
deno-version: ${{ inputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
rc-dockerfile-alpine: '${{ github.workspace }}/apps/meteor/.docker/Dockerfile.alpine'
rc-docker-tag-alpine: '${{ steps.docker.outputs.gh-docker-tag }}.alpine'
node-version: ${{ steps.var.outputs.node-version }}
deno-version: ${{ steps.var.outputs.deno-version }}
# this is 100% intentional, secrets are not available for forks, so ee-tests will always fail
# to avoid this, we are using a dummy license, expiring at 2025-06-31
enterprise-license: X/XumwIkgwQuld0alWKt37lVA90XjKOrfiMvMZ0/RtqsMtrdL9GoAk+4jXnaY1b2ePoG7XSzGhuxEDxFKIWJK3hIKGNTvrd980LgH5sM5+1T4P42ivSpd8UZi0bwjJkCFLIu9RozzYwslGG0IehMxe0S6VjcO0UYlUJtbMCBHuR2WmTAmO6YVU3ln+pZCbrPFaTPSS1RovhKaNCNkZwIx/CLWW8UTXUuFV/ML4PbKKVoa5nvvJwPeatgL7UCnlSD90lfCiiuikpzj/Y/JLkIL6velFbwNxsrxg9iRJ2k0sKheMMSmlTiGzSvZUm+na5WQq91aKGncih+DmaEZA7QGrjp4eoA0dqTk6OmItsy0fHmQhvZIOKNMeO7vNQiLbaSV6rqibrzu7WPpeIvsvL57T1h37USoCSB6+jDqkzdfoqIpz8BxTiJDj1d8xGPJFVrgxoqQqkj9qIP/gCaEz5DF39QFv5sovk4yK2O8fEQYod2d14V9yECYl4szZPMk1IBfCAC2w7czWGHHFonhL+CQGT403y5wmDmnsnjlCqMKF72odqfTPTI8XnCvJDriPMWohnQEAGtTTyciAhNokx/mjAVJ4NeZPcsbm4BjhvJvnjxx/BhYhBBTNWPaCSZzocfrGUj9Z+ZA7BEz+xAFQyGDx3xRzqIXfT0G7w8fvgYJMU=
Expand All @@ -39,6 +40,7 @@ jobs:
with:
sparse-checkout: |
package.json
.tool-versions
sparse-checkout-cone-mode: false
ref: ${{ github.ref }}

Expand All @@ -53,6 +55,10 @@ jobs:
echo "NODE_VERSION: ${NODE_VERSION}"
echo "node-version=${NODE_VERSION}" >> $GITHUB_OUTPUT

DENO_VERSION=$(awk '$1=="deno"{ print $2 }' .tool-versions)
echo "DENO_VERSION: ${DENO_VERSION}"
echo "deno-version=${DENO_VERSION}" >> $GITHUB_OUTPUT

- id: by-tag
run: |
if echo "$GITHUB_REF_NAME" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$' ; then
Expand Down Expand Up @@ -150,6 +156,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -194,6 +201,7 @@ jobs:
- uses: ./.github/actions/meteor-build
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
coverage: ${{ github.event_name != 'release' }}

build-prod:
Expand Down Expand Up @@ -224,6 +232,7 @@ jobs:
- uses: ./.github/actions/meteor-build
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
coverage: ${{ github.event_name != 'release' }}

build-gh-docker-coverage:
Expand Down Expand Up @@ -252,6 +261,7 @@ jobs:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down Expand Up @@ -280,6 +290,7 @@ jobs:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -300,6 +311,7 @@ jobs:
uses: ./.github/workflows/ci-code-check.yml
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}

test-unit:
name: 🔨 Test Unit
Expand All @@ -308,6 +320,7 @@ jobs:
uses: ./.github/workflows/ci-test-unit.yml
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -321,6 +334,7 @@ jobs:
type: api
release: ce
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand All @@ -344,6 +358,7 @@ jobs:
shard: '[1, 2, 3, 4]'
total-shard: 4
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand Down Expand Up @@ -371,6 +386,7 @@ jobs:
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
mongodb-version: "['4.4']"
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand All @@ -395,6 +411,7 @@ jobs:
total-shard: 5
mongodb-version: "['4.4']"
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand Down Expand Up @@ -425,6 +442,7 @@ jobs:
total-shard: 5
mongodb-version: "['6.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
Expand Down Expand Up @@ -564,6 +582,7 @@ jobs:
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
deno-version: ${{ needs.release-versions.outputs.deno-version }}

docker-image-publish:
name: 🚀 Publish Docker Image (main)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-update-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: 14.21.3
deno-version: 1.37.1
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deno 1.37.1
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ You can follow these instructions to setup a dev environment:
- Install **Node 14.x (LTS)** either [manually](https://nodejs.org/dist/latest-v14.x/) or using a tool like [nvm](https://github.com/creationix/nvm) or [volta](https://volta.sh/) (recommended)
- Install **Meteor** ([version here](apps/meteor/.meteor/release)): https://docs.meteor.com/about/install.html
- Install **yarn**: https://yarnpkg.com/getting-started/install
- Install **Deno 1.x**: https://docs.deno.com/runtime/fundamentals/installation/
- Clone this repo: `git clone https://github.com/RocketChat/Rocket.Chat.git`
- Run `yarn` to install dependencies

Expand Down
Loading
Loading