Guest User

Untitled

a guest
Oct 23rd, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. pipeline {
  2. agent {
  3. docker {
  4. image 'node:9-alpine'
  5. args '-p 3000:3000'
  6. }
  7. }
  8. environment {
  9. NODE_PATH = '/home/hailstone/iast-dev/out/agent/nodejs'
  10. }
  11. stages {
  12. stage('Test') {
  13. steps {
  14. sh 'apk add --no-cache libc6-compat'
  15. sh 'ls ${NODE_PATH}'
  16. sh 'echo "console.log(__dirname);" > server.js'
  17. sh 'echo First run the script without the Agent to prove that it can be called:'
  18. sh 'node server.js'
  19. sh 'echo Then run the script with the agent:'
  20. sh 'node -r agent_nodejs_linux64 server.js'
  21. }
  22. }
  23. }
  24. }
Add Comment
Please, Sign In to add comment