在詹金斯上找不到颤振命令

时间:2020-02-10 01:55:03

标签: android jenkins flutter jenkins-pipeline jenkins-groovy

我已在本地PC上成功安装Flutter。但是当添加到詹金斯时,flutter command not found

管道脚本

stage('Build Release APK') {
            //  sh 'export PATH="$PATH:/Users/bhanukaisuru/Documents/flutter/bin"'//after said, flutter command not found I added this line, but not working
              sh "flutter clean"
              sh "flutter build apk --split-per-abi"
         }

在添加Flutter命令之前,我添加了这一行。

sh "./gradlew clean assembleRelease"

还说,没有找到gradlew

1 个答案:

答案 0 :(得分:0)

尝试像这样在您的舞台中设置环境中的颤动路径:

    environment {
        flutter = "/Library/Flutter/bin/flutter"
    }
    steps {
        sh '$flutter clean'
    }