Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent {
- docker {
- image 'node:9-alpine'
- args '-p 3000:3000'
- }
- }
- environment {
- NODE_PATH = '/home/hailstone/iast-dev/out/agent/nodejs'
- }
- stages {
- stage('Test') {
- steps {
- sh 'apk add --no-cache libc6-compat'
- sh 'ls ${NODE_PATH}'
- sh 'echo "console.log(__dirname);" > server.js'
- sh 'echo First run the script without the Agent to prove that it can be called:'
- sh 'node server.js'
- sh 'echo Then run the script with the agent:'
- sh 'node -r agent_nodejs_linux64 server.js'
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment