Skip to content

Commit

Permalink
WEBUI-1350: NodeJS Upgrade - Rebase code in LTS2023 from LTS2021
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkumar1019 authored and rahuljain-dev committed Jan 15, 2024
1 parent 8746e00 commit dfab94e
Show file tree
Hide file tree
Showing 541 changed files with 6,792 additions and 3,692 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NUXEO_WEB_UI_VERSION=3.0.22-SNAPSHOT
NUXEO_WEB_UI_VERSION=3.1.5-SNAPSHOT
NUXEO_VERSION=master
NUXEO_PACKAGES=nuxeo-drive nuxeo-liveconnect nuxeo-template-rendering
NUXEO_DEV_MODE=true
Expand Down
80 changes: 46 additions & 34 deletions .github/workflows/a11y.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: A11y
on:
pull_request:
branches:
- maintenance-3.0.x
- maintenance-3.1.x
workflow_call:
inputs:
branch:
description: 'The current branch'
default: maintenance-3.0.x
default: maintenance-3.1.x
type: string
required: false
secrets:
Expand All @@ -18,50 +18,62 @@ on:
PACKAGES_AUTH_USER:
description: 'PACKAGES_AUTH_USER'
required: true
PACKAGES_AUTH_TOKEN:
PACKAGES_AUTH_TOKEN:
description: 'PACKAGES_AUTH_TOKEN'
required: true

env:
REFERENCE_BRANCH: maintenance-3.0.x
REFERENCE_BRANCH: maintenance-3.1.x
NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'maintenance-3.0.x' }}
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'maintenance-3.1.x' }}

jobs:
a11y:
runs-on: ubuntu-latest
runs-on: [self-hosted, master]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}

- run: git config user.name "nuxeo-web-ui-jx-bot" && git config user.email "ui+jx-bot@nuxeo.com"
- run: git config user.name "nuxeo-webui-jx-bot" && git config user.email "webui@hyland.com"

- uses: actions/setup-node@v3
with:
registry-url: ${{ env.NPM_REPOSITORY }}
node-version: 14
scope: '@nuxeo'
- uses: actions/setup-node@v3
with:
registry-url: ${{ env.NPM_REPOSITORY }}
node-version: 18
scope: '@nuxeo'

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Install Web UI
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npm install
pushd packages/nuxeo-web-ui-ftest
npm install
popd
pushd packages/nuxeo-designer-catalog
npm install
popd
- name: 'Update settings.xml with server configuration'
run: |
echo '<settings>
<servers>
<server>
<id>maven-internal</id>
<username>${{ secrets.PACKAGES_AUTH_USER }}</username>
<password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'

- name: Web UI build
run: mvn -B -ntp install
- name: 'Update settings.xml with server configuration'
run: |
echo '<settings>
<servers>
<server>
<id>maven-internal</id>
<username>${{ secrets.PACKAGES_AUTH_USER }}</username>
<password>${{ secrets.PACKAGES_AUTH_TOKEN }}</password>
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: A11y checks
run: mvn -B -ntp -f plugin/a11y install
- name: Web UI build
run: mvn -B -ntp install

- name: A11y checks
run: mvn -B -ntp -f plugin/a11y install
28 changes: 16 additions & 12 deletions .github/workflows/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
inputs:
target_platform:
description: 'The Nuxeo server target platform to build the catalog for.'
default: '11.3'
default: '2023.0'
required: true
branch_name:
description: 'The name of the Nuxeo Web UI branch to generate the catalog for.'
default: 'maintenance-3.0.x'
default: 'maintenance-3.1.x'
required: true
classifier:
description: 'Classifier to name a custom version of the catalog (used for testing purposes).'
Expand All @@ -31,31 +31,31 @@ jobs:
steps:
- uses: actions/checkout@v3

- run: git config --global user.name "nuxeo-web-ui-jx-bot" && git config --global user.email "ui+jx-bot@nuxeo.com"
- run: git config --global user.name "nuxeo-webui-jx-bot" && git config --global user.email "webui@hyland.com"

- uses: actions/setup-node@v3
with:
node-version: 10
node-version: 14

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: 'Update settings.xml with server configuration'
run: |
echo '<settings>
<mirrors>
<mirror>
<id>nos-team</id>
<id>maven-internal</id>
<mirrorOf>external:*</mirrorOf>
<url>https://nexus-jx.nos.build.nuxeo.com/repository/maven-group/</url>
<url>https://packages.nuxeo.com/repository/maven-internal/</url>
</mirror>
</mirrors>
<servers>
<server>
<id>nos-team</id>
<username>nuxeo-web-ui-jx-bot</username>
<username>nuxeo-webui-jx-bot</username>
<password>${{ secrets.WEBUI_JX_BOT_GITHUB_ACTIONS_TOKEN }}</password>
</server>
<server>
Expand All @@ -75,13 +75,16 @@ jobs:
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: Install libxml2-utils (xmllint)
run: sudo apt-get update && sudo apt-get install -y libxml2-utils

- name: Setup parameters (release)
if: github.event_name == 'release'
working-directory: packages/nuxeo-designer-catalog
run: |
echo "BRANCH_NAME=v${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV
echo "TARGET_PLATFORM=11.3" >> $GITHUB_ENV
echo "TARGET_PLATFORM=2023.0" >> $GITHUB_ENV
- name: Setup parameters (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
Expand All @@ -103,8 +106,9 @@ jobs:
- name: Bundle the catalog
run: |
sudo chmod +r pom.xml
CATALOG_VERSION=$(xmllint --xpath "//*[local-name()='project']/*[local-name()='version']/text()" pom.xml)${{ github.event.inputs.classifier }}
pushd packages/nuxeo-designer-catalog/data/applications/nuxeo/${{ env.TARGET_PLATFORM }}
CATALOG_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout -f nuxeo-web-ui/pom.xml)${{ github.event.inputs.classifier }}
echo "CATALOG_VERSION=$CATALOG_VERSION" >> $GITHUB_ENV
CATALOG_NAME=$ARTIFACT_ID-$CATALOG_VERSION.zip
echo "CATALOG_NAME=$CATALOG_NAME" >> $GITHUB_ENV
Expand Down Expand Up @@ -144,8 +148,8 @@ jobs:
GH_TOKEN: ${{ secrets.WEBUI_JX_BOT_GITHUB_ACTIONS_TOKEN }}
run: |
git checkout -b designer-catalog-update-$CATALOG_VERSION
mvn versions:set-property -Dproperty=view.designer.catalog.11.3 -DnewVersion=$CATALOG_VERSION
mvn versions:set-property -Dproperty=view.designer.catalog.2023.0 -DnewVersion=$CATALOG_VERSION
git add .
git commit -m "Update Designer catalog with version $CATALOG_VERSION"
git push origin designer-catalog-update-$CATALOG_VERSION
gh pr create --base master --fill
gh pr create --base master --fill
8 changes: 4 additions & 4 deletions .github/workflows/clean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ on:
pull_request:
types: [closed, unlabeled]
branches:
- maintenance-3.0.x
- maintenance-3.1.x

workflow_dispatch:
inputs:
branch_name:
description: 'The name of the branch to preview.'
default: 'maintenance-3.0.x'
default: 'maintenance-3.1.x'
required: true
caller_id:
description: 'run identifier'
default: 'maintenance-3.0.x'
default: 'maintenance-3.1.x'
type: string
required: false

Expand Down Expand Up @@ -59,4 +59,4 @@ jobs:
- name: Cleanup preview namespace
continue-on-error: true
run: |
kubectl delete ns ${PREVIEW_NAMESPACE}
kubectl delete ns ${PREVIEW_NAMESPACE}
15 changes: 9 additions & 6 deletions .github/workflows/cross-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
inputs:
branch_name:
description: 'The name of the branch to build.'
default: 'maintenance-3.0.x'
default: 'maintenance-3.1.x'
required: true
sauce_labs:
description: 'Run unit tests on Sauce Labs?'
Expand Down Expand Up @@ -40,12 +40,12 @@ on:
required: false
caller_id:
description: 'run identifier'
default: 'maintenance-3.0.x'
default: 'maintenance-3.1.x'
type: string
required: false

env:
REFERENCE_BRANCH: maintenance-3.0.x
REFERENCE_BRANCH: maintenance-3.1.x
NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/

jobs:
Expand All @@ -71,7 +71,7 @@ jobs:
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Determine nuxeo-web-ui branch to use
uses: nuxeo/ui-team-gh-actions/get-branch@ca09d5c52a62e297502d3572c36d813be927982a
Expand Down Expand Up @@ -103,6 +103,9 @@ jobs:
pushd packages/nuxeo-web-ui-ftest
npm install
popd
pushd plugin/a11y
npm install
popd
pushd packages/nuxeo-designer-catalog
npm install
popd
Expand Down Expand Up @@ -167,7 +170,7 @@ jobs:
</server>
</servers>
</settings>' > ~/.m2/settings.xml
- name: Nuxeo package build and Ftests
env:
RUN_ALL: ${{ github.event.inputs.run_all }}
Expand Down Expand Up @@ -225,4 +228,4 @@ jobs:
name: packages
path: |
plugin/web-ui/marketplace/target/nuxeo-web-ui-marketplace-*.zip
plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip
plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip
12 changes: 6 additions & 6 deletions .github/workflows/crowdin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
schedule:
- cron: '0 0 * * *'

# Sync when a commit is done on maintenance-3.0.x
# Sync when a commit is done on maintenance-3.1.x
push:
branches:
- maintenance-3.0.x
- maintenance-3.1.x
paths:
- 'i18n/messages.json'

Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v3

- name: Crowdin Action
uses: crowdin/github-action@1.4.9
uses: crowdin/github-action@v1
with:
# Tokens
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
Expand All @@ -52,8 +52,8 @@ jobs:
download_translations: true

# User properties
github_user_name: nuxeo-web-ui-jx-bot
github_user_email: ui+jx-bot@nuxeo.com
github_user_name: nuxeo-webui-jx-bot
github_user_email: webui@hyland.com

env:
GITHUB_TOKEN: ${{ secrets.WEBUI_JX_BOT_GITHUB_ACTIONS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.WEBUI_JX_BOT_GITHUB_ACTIONS_TOKEN }}
26 changes: 20 additions & 6 deletions .github/workflows/ftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Functional tests
on:
pull_request:
branches:
- maintenance-3.0.x
- maintenance-3.1.x
workflow_call:
inputs:
branch:
description: 'The current branch'
default: maintenance-3.0.x
default: maintenance-3.1.x
type: string
required: false
secrets:
Expand All @@ -23,9 +23,9 @@ on:
required: true

env:
REFERENCE_BRANCH: maintenance-3.0.x
REFERENCE_BRANCH: maintenance-3.1.x
NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'maintenance-3.0.x' }}
BRANCH_NAME: ${{ github.head_ref || inputs.branch || 'maintenance-3.1.x' }}

jobs:
ftests:
Expand All @@ -39,11 +39,12 @@ jobs:
with:
registry-url: ${{ env.NPM_REPOSITORY }}
scope: '@nuxeo'
node-version: 18

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Determine nuxeo-elements branch to link
id: pick_nuxeo_elements_branch
Expand Down Expand Up @@ -94,6 +95,19 @@ jobs:
popd
popd
- name: add .npmrc
run: |
pushd /tmp/_temp/
ls
rm .npmrc
touch .npmrc
popd
echo '
packages.nuxeo.com/repository/npm-public/:_auth=${NODE_AUTH_TOKEN}
@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/
always-auth=true
' >> /tmp/_temp/.npmrc
- name: Link elements to Web UI
run: |
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/core/${ELEMENTS_CORE}
Expand Down Expand Up @@ -149,4 +163,4 @@ jobs:
name: packages
path: |
plugin/web-ui/marketplace/target/nuxeo-web-ui-marketplace-*.zip
plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip
plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip
Loading

0 comments on commit dfab94e

Please sign in to comment.