mirror of
https://github.com/SAP/jenkins-library.git
synced 2026-06-19 22:58:55 +02:00
log node.js and npm version in related steps (#1182)
This commit is contained in:
@@ -114,6 +114,10 @@ void call(Map parameters = [:]) {
|
||||
dockerWorkspace: config.dockerWorkspace,
|
||||
stashContent: config.stashContent
|
||||
) {
|
||||
sh returnStatus: true, script: """
|
||||
node --version
|
||||
npm --version
|
||||
"""
|
||||
sh "NPM_CONFIG_PREFIX=~/.npm-global ${config.newmanInstallCommand}"
|
||||
for(String collection : collectionList){
|
||||
def collectionDisplayName = collection.toString().replace(File.separatorChar,(char)'_').tokenize('.').first()
|
||||
|
||||
@@ -65,6 +65,10 @@ void call(Map parameters = [:], body = null) {
|
||||
dockerOptions: configuration.dockerOptions,
|
||||
dockerWorkspace: configuration.dockerWorkspace
|
||||
) {
|
||||
sh returnStatus: true, script: """
|
||||
node --version
|
||||
npm --version
|
||||
"""
|
||||
if (configuration.defaultNpmRegistry) {
|
||||
sh "npm config set registry ${configuration.defaultNpmRegistry}"
|
||||
}
|
||||
|
||||
@@ -122,6 +122,10 @@ void call(Map parameters = [:], Closure body) {
|
||||
sidecarVolumeBind: config.sidecarVolumeBind
|
||||
) {
|
||||
try {
|
||||
sh returnStatus: true, script: """
|
||||
node --version
|
||||
npm --version
|
||||
"""
|
||||
config.stashContent = config.testRepository
|
||||
?[GitUtils.handleTestRepository(this, config)]
|
||||
:utils.unstashAll(config.stashContent)
|
||||
|
||||
@@ -115,6 +115,10 @@ void call(Map parameters = [:]) {
|
||||
dockerOptions: config.dockerOptions,
|
||||
stashContent: config.stashContent
|
||||
) {
|
||||
sh returnStatus: true, script: """
|
||||
node --version
|
||||
npm --version
|
||||
"""
|
||||
// install Snyk
|
||||
sh 'npm install snyk --global --quiet'
|
||||
if(config.toHtml){
|
||||
|
||||
@@ -122,6 +122,10 @@ void call(Map parameters = [:]) {
|
||||
sidecarImage: config.sidecarImage,
|
||||
stashContent: config.stashContent
|
||||
) {
|
||||
sh returnStatus: true, script: """
|
||||
node --version
|
||||
npm --version
|
||||
"""
|
||||
try {
|
||||
sh "NPM_CONFIG_PREFIX=~/.npm-global ${config.installCommand}"
|
||||
sh "PATH=\$PATH:~/.npm-global/bin ${config.runCommand} ${config.testOptions}"
|
||||
|
||||
Reference in New Issue
Block a user