Skip to content

Commit

Permalink
Merge branch 'maintenance-3.1.x' into 2023-snapshot-gnerate
Browse files Browse the repository at this point in the history
  • Loading branch information
alokhyland authored Oct 18, 2024
2 parents eac8b7e + fc1ced7 commit c76394e
Show file tree
Hide file tree
Showing 24 changed files with 358 additions and 133 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.1.11-SNAPSHOT
NUXEO_WEB_UI_VERSION=3.1.14-SNAPSHOT
NUXEO_VERSION=master
NUXEO_PACKAGES=nuxeo-drive nuxeo-liveconnect nuxeo-template-rendering
NUXEO_DEV_MODE=true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cross-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,22 +212,22 @@ jobs:
- name: Archive cucumber reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: cucumber-reports
path: |
ftest/target/cucumber-reports/
- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: screenshots
path: ftest/target/screenshots/

- name: Archive logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: logs
path: |
Expand All @@ -236,7 +236,7 @@ jobs:
- name: Archive packages
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: packages
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ftest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,21 +138,21 @@ jobs:

- name: Archive cucumber reports
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: cucumber-reports
path: ftest/target/cucumber-reports/

- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: screenshots
path: ftest/target/screenshots/

- name: Archive logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: logs
path: |
Expand All @@ -161,7 +161,7 @@ jobs:
- name: Archive packages
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: packages
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
mvn -B -nsu -ntp -f plugin/itests/marketplace install
- name: Archive packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: packages
path: |
Expand Down
184 changes: 184 additions & 0 deletions .github/workflows/veracode-3.0.x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will initiate a Veracode Static Analysis Pipeline scan, return a results.json and convert to SARIF for upload as a code scanning alert

name: Veracode Maintenance 3.0.x

on:
schedule:
- cron: '30 14 * * *' # 14:30 UTC = 8:00 PM IST

env:
REFERENCE_BRANCH: maintenance-3.0.x
NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/
BRANCH_NAME: ${{ 'maintenance-3.0.x' }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read

jobs:
# This workflow contains a job to build and submit pipeline scan, you will need to customize the build process accordingly and make sure the artifact you build is used as the file input to the pipeline scan file parameter
sast-scan-build:
# The type of runner that the job will run on
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: [self-hosted, master]
steps:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it and copies all sources into ZIP file for submitting for analysis. Replace this section with your applications build steps
- uses: actions/checkout@v2
with:
ref: ${{ env.BRANCH_NAME }}

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

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

- name: Determine nuxeo-elements branch to link
id: pick_nuxeo_elements_branch
run: |
if git ls-remote --exit-code --heads https://github.com/nuxeo/nuxeo-elements ${{ env.BRANCH_NAME }}; then
echo ::set-output name=branch::${{ env.BRANCH_NAME }}
else
echo ::set-output name=branch::${{ env.REFERENCE_BRANCH }}
fi
- name: Install Web UI
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npm install
pushd packages/nuxeo-web-ui-ftest
npm install
popd
- name: Checkout the nuxeo-elements repo
uses: actions/checkout@v2
with:
repository: nuxeo/nuxeo-elements
path: nuxeo-elements
fetch-depth: 1
ref: ${{ steps.pick_nuxeo_elements_branch.outputs.branch }}

- name: Pack Elements modules
run: |
pushd nuxeo-elements
pushd core
echo "ELEMENTS_CORE=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
pushd ui
echo "ELEMENTS_UI=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
pushd dataviz
echo "ELEMENTS_DATAVIZ=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
pushd testing-helpers
echo "ELEMENTS_HELPERS=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
popd
- name: add .npmrc
run: |
pushd /tmp/_temp/
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}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/ui/${ELEMENTS_UI}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/dataviz/${ELEMENTS_DATAVIZ}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/testing-helpers/${ELEMENTS_HELPERS}
- 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: Delete Node Modules
run: |
rm -rf node_modules
rm -rf packages/nuxeo-designer-catalog/node_modules
rm -rf packages/nuxeo-web-ui-ftest/node_modules
rm -rf plugin/a11y/node_modules
- name: Delete Test Folders
run: |
rm -rf nuxeo-elements/testing-helpers/
rm -rf nuxeo-elements/ui/test/
rm -rf nuxeo-elements/storybook/
rm -rf ftest/
rm -rf plugin/
rm -rf scripts/
rm -rf test/
rm -rf packages/nuxeo-web-ui-ftest/
- name: Install zip
run: apt-get install zip

- name: Zip nuxeo-web-ui
run: |
echo nuxeo-web-ui-${{ steps.get-tag.outputs.TAG }}.zip
zip -r nuxeo-web-ui.zip *
- name: Upload ZIP as artifact
uses: actions/upload-artifact@v3
with:
name: nuxeo-web-ui
path: nuxeo-web-ui.zip

sast-scan:
needs: sast-scan-build
permissions:
contents: read
security-events: write
actions: read
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: nuxeo-web-ui
path: .

- name: List downloaded artifact
run: |
ls -l
pwd
- name: Veracode Upload And Scan
uses: veracode/[email protected]
with:
appname: 'Nuxeo Web UI'
createprofile: false
filepath: 'nuxeo-web-ui.zip'
vid: '${{ secrets.VERACODE_SECRET_API_ID }}'
vkey: '${{ secrets.VERACODE_SECRET_KEY }}'
sandboxname: 'master'
scantimeout: 600
include: '*.war, *.zip, *.js, *.html, *.css, *.json'
criticality: 'High'
includenewmodules: 'true'
Loading

0 comments on commit c76394e

Please sign in to comment.