Jenkins Pipeline Groovy script tcsh alias expansion

Viewed 19

I have a legacy project in Jenkins that hast to be pipelined (for later parallelization), hence moving from simple tcsh script to pipeline

running the script as

#!/bin/tcsh
source ./mysetting.sh
update

works but the same pipeline step fails due to missing alias expansion

stage ('update') {
    steps {
        //should be working but alias expansion fails
        sh 'tcsh -c "source ./mysettings.sh; alias; update"' 
           
        //manually expanding the alias works fine
        sh 'tcsh -c "source ./mysettings.sh; alias; python update.py;"' 
        }
}

calling alias in the steps properly lists all the set aliases, so I can see them, but not use them.

I know in bash alias expansion has to be set

#enable shell option for alias_expansion
shopt -s expand_aliases

but in csh/tcsh that should be taken care of by source.

what am I missing?

0 Answers
Related