fix(pipeline): update npm install command to include --no-audit and adjust Docker socket volume mount configuration
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
719b040ae5
commit
1335c9ec8d
@ -66,7 +66,7 @@ class DependenciesResolver {
|
|||||||
if (cachingEnabled) {
|
if (cachingEnabled) {
|
||||||
steps.dir(this.workspace) {
|
steps.dir(this.workspace) {
|
||||||
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: '.npm-cache', cacheValidityDecidingFile: 'package-lock.json']]) {
|
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: '.npm-cache', cacheValidityDecidingFile: 'package-lock.json']]) {
|
||||||
steps.sh "npm install --cache .npm-cache --prefer-offline"
|
steps.sh "npm install --cache .npm-cache --prefer-offline --no-audit"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -376,14 +376,18 @@ def generateComponentStages(component, configurations) {
|
|||||||
containerTemplate(
|
containerTemplate(
|
||||||
name: 'image-builder',
|
name: 'image-builder',
|
||||||
image: env.imageBuilderImage,
|
image: env.imageBuilderImage,
|
||||||
|
privileged: true,
|
||||||
ttyEnabled: true,
|
ttyEnabled: true,
|
||||||
command: 'sleep',
|
command: 'sleep',
|
||||||
args: 'infinity',
|
args: 'infinity',
|
||||||
volumeMounts: [
|
volumeMounts: [
|
||||||
// We need to mount the docker socket to the container to build the image when using dind as image builder
|
// We need to mount the docker socket to the container to build the image when using dind as image builder
|
||||||
hostPathVolumeMount(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
|
volumeMount(mountPath: '/var/run/docker.sock', name: 'docker-sock'),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
],
|
||||||
|
volumes: [
|
||||||
|
hostPathVolume(hostPath: '/var/run/docker.sock', mountPath: '/var/run/docker.sock')
|
||||||
]
|
]
|
||||||
) {
|
) {
|
||||||
node("image-builder-${component.name}") {
|
node("image-builder-${component.name}") {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user