使用 withFolderProperties 的詹金斯管道

时间:2021-01-22 19:51:21

标签: jenkins jenkins-pipeline jenkins-plugins

我正在尝试使用 withFolderProperties 获取在文件夹属性上定义的 fecth 变量的管道步骤,如下所示,但失败了。是不是缺少什么特殊的语法?

试试下面的代码

pipeline {
    agent { label 'dasm' }
    stages {
        stage('TRUNCATE TABLE'){
            steps{ withFolderProperties {
                bat 'psql --host=host --dbname=dbname --port=5444 --username=user -w  -c "TRUNCATE TABLE ${env.myTable};"'}
            }
        }

0 个答案:

没有答案