pipeline { agent any tools {nodejs "node16" } environment { NODE_ENV='production' } stages { stage('source') { steps { git 'https://github.com/sd031/aws_codebuild_codedeploy_nodeJs_demo.git' sh 'cat index.js' } } stage('build') { environment{ NODE_ENV='StagingGitTest' } steps { echo NODE_ENV withCredentials([string(credentialsId: 'e8f8ff88-49e0-433a-928d-36a518cd30d6', variable: 'secver')]) { // some block echo secver } sh 'npm install' } } stage('saveArtifact') { steps { archiveArtifacts artifacts: '**', followSymlinks: false } } } }