Hello
Newbie to jenkins here. I am running jenkins 2.36.1 on centos 7 in single node mode.
I am trying to cd to a file and check if i have cd into it in bash script . but it does not seem to work
Here is snippet of my pipeline
ipeline {
agent any
stages {
stage('Untar') {
steps {
sh '''#!/bin/bash
sudo cd /lustre01/software/source/R
sudo pwd
'''
}
The output shows the following
Running on [Jenkins]
/var/lib/jenkins/workspace/R
[Pipeline] {
{ [Pipeline] stage
[Pipeline] { (Untar)
[Pipeline] sh
/var/lib/jenkins/workspace/R
Am i missing something here with shell script. in jenkins pipeline
}