I have a docker container which runs Jenkins.
I have define an alias and print this alias in a jekinsfile.
I also tried manually to connect with Jenkins container, and I did it:
alias foo='bar'
when I execute the same thing in Jenkinsfile, foo command won't respond
the pipeline code is written below:
#!/bin/groovy
pipeline {
agent any
stages {
stage("Use alias command"){
steps {
sh '''
alias foo="bar"
foo
'''
}
}
}}