web/{multinode,satellite,storagenode}: revert go.mod

Adding go.mod into node_modules is not sufficient, because npm install
wipes them quite often out. Similarly, when running npm install locally
it will remove it, causing the git state to be dirty.

Rather than having them committed, add them after running npm install.

Change-Id: Iaf21a9c6e198dc31fe50345ec5dee85b44617176
This commit is contained in:
Egon Elbre 2022-07-08 19:49:21 +03:00
parent c3171b4ba4
commit 15dc797efd
10 changed files with 12 additions and 36 deletions

View File

@ -59,6 +59,7 @@ pipeline {
steps { steps {
dir('web/satellite') { dir('web/satellite') {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh './scripts/build-wasm.sh' sh './scripts/build-wasm.sh'
sh 'npm run build' sh 'npm run build'
} }
@ -68,6 +69,7 @@ pipeline {
steps { steps {
dir('web/storagenode') { dir('web/storagenode') {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh 'npm run build' sh 'npm run build'
} }
} }
@ -76,6 +78,7 @@ pipeline {
steps { steps {
dir('web/multinode') { dir('web/multinode') {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh 'npm run build' sh 'npm run build'
} }
} }
@ -84,6 +87,7 @@ pipeline {
steps { steps {
dir('satellite/admin/ui') { dir('satellite/admin/ui') {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh 'npm run build' sh 'npm run build'
} }
} }

View File

@ -104,6 +104,7 @@ pipeline {
steps { steps {
dir('web/satellite') { dir('web/satellite') {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh './scripts/build-wasm.sh' sh './scripts/build-wasm.sh'
sh 'npm run build' sh 'npm run build'
@ -127,6 +128,7 @@ pipeline {
steps { steps {
dir("web/storagenode") { dir("web/storagenode") {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh 'npm run build' sh 'npm run build'
sh 'npm run lint-ci' sh 'npm run lint-ci'
sh script: 'npm audit', returnStatus: true sh script: 'npm audit', returnStatus: true
@ -142,6 +144,7 @@ pipeline {
steps { steps {
dir("web/multinode") { dir("web/multinode") {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh 'npm run build' sh 'npm run build'
sh 'npm run lint-ci' sh 'npm run lint-ci'
sh script: 'npm audit', returnStatus: true sh script: 'npm audit', returnStatus: true
@ -157,6 +160,7 @@ pipeline {
steps { steps {
dir("satellite/admin/ui") { dir("satellite/admin/ui") {
sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm install --prefer-offline --no-audit --loglevel silly'
sh 'touch ./node_modules/go.mod' // prevent Go from scanning this dir
sh 'npm run build' sh 'npm run build'
sh script: 'npm audit', returnStatus: true sh script: 'npm audit', returnStatus: true
sh 'npm run check' sh 'npm run check'

View File

@ -5,7 +5,4 @@ node_modules
/.svelte-kit /.svelte-kit
/package /package
.env .env
.env.* .env.*
# Stub for Go to avoid scanning node_modules.
!node_modules/go.mod

View File

@ -1,5 +0,0 @@
module storj.io/storj/satellite/admin/ui/node_modules
go 1.17
// Stub module to prevent Go from scanning node_modules directory.

View File

@ -23,7 +23,4 @@ yarn-error.log*
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.sw* *.sw*
# Stub for Go to avoid scanning node_modules.
!node_modules/go.mod

View File

@ -1,5 +0,0 @@
module storj.io/storj/web/multinode/node_modules
go 1.17
// Stub module to prevent Go from scanning node_modules directory.

View File

@ -29,7 +29,4 @@ yarn-error.log*
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.sw* *.sw*
# Stub for Go to avoid scanning node_modules.
!node_modules/go.mod

View File

@ -1,5 +0,0 @@
module storj.io/storj/web/satellite/node_modules
go 1.17
// Stub module to prevent Go from scanning node_modules directory.

View File

@ -23,7 +23,4 @@ yarn-error.log*
*.ntvs* *.ntvs*
*.njsproj *.njsproj
*.sln *.sln
*.sw* *.sw*
# Stub for Go to avoid scanning node_modules.
!node_modules/go.mod

View File

@ -1,5 +0,0 @@
module storj.io/storj/web/storagenode/node_modules
go 1.17
// Stub module to prevent Go from scanning node_modules directory.