web: create valid go.mod stubs

Some tools like check-downgrades doesn't like invalid go.mod files.

Change-Id: I5a773e98f821adcbaa373a474d9420ba7447f5f7
This commit is contained in:
Egon Elbre 2022-09-26 17:05:54 +03:00
parent 41c2bca096
commit a8edeb7814
4 changed files with 6 additions and 4 deletions

View File

@ -38,7 +38,9 @@ pipeline {
// add a stub go.mod file to node projects to prevent go build ./... from scanning them
sh 'mkdir -p web/satellite/node_modules web/storagenode/node_modules web/multinode/node_modules'
sh 'touch web/satellite/node_modules/go.mod web/storagenode/node_modules/go.mod web/multinode/node_modules/go.mod'
sh 'echo "module stub" > web/satellite/node_modules/go.mod'
sh 'echo "module stub" > web/storagenode/node_modules/go.mod'
sh 'echo "module stub" > web/multinode/node_modules/go.mod'
}
}
stage('Gerrit status') {

View File

@ -5,7 +5,7 @@ set -exuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
npm install --prefer-offline --no-audit --logleve verbose
touch ./node_modules/go.mod # prevent Go from scanning this dir
echo "module stub" > ./node_modules/go.mod # prevent Go from scanning this dir
npm run build
npm run lint-ci

View File

@ -6,7 +6,7 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
set -euxo pipefail
npm install --prefer-offline --no-audit --logleve verbose
touch ./node_modules/go.mod # prevent Go from scanning this dir
echo "module stub" > ./node_modules/go.mod # prevent Go from scanning this dir
npm run build
npm run lint-ci

View File

@ -5,7 +5,7 @@ set -euxo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
npm install --prefer-offline --no-audit --logleve verbose
touch ./node_modules/go.mod # prevent Go from scanning this dir
echo "module stub" > ./node_modules/go.mod # prevent Go from scanning this dir
npm run build
npm run lint-ci