小编Rya*_*Lee的帖子

未找到Jenkins Pipeline"yarn install"命令

这是我的第一个Jenkins脚本,它目前在Linux上运行良好但我迁移到MacOS(High Sierra)导致获得shell脚本错误.

节点和纱线包安装在本地Jenkins用户上.我无法弄清楚为什么会发生这种错误,有人能帮我解决这个问题吗?

这是我的Jenkins文件:

node {
  stage('Check out') {
    checkout scm
  }
  stage('Prepare') {
    sh "yarn install"
  }
  stage('Test') {
    sh "yarn test"
  }
  stage('Sonar') {
    if (env.BRANCH_NAME == 'dev') {
      def scannerHome = tool 'sonar scanner';
      withSonarQubeEnv('sonar') {
        sh "${scannerHome}/bin/sonar-scanner"
      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

完整的日志:

14:43:11 使用hariklee/******连接到https://api.github.com

从6c639bd70ac86cbe6a49ac0b58bcc10e3c64a375获得Jenkinsfile

在耐久性级别中运行:MAX_SURVIVABILITY

[Pipeline]节点

在/ Users/Shared/Jenkins/Home/workspace/wingman_423_ci_cd-7PSSGRAMBTXUQRESYCNVODXU7IZJLJLPHQOE3KYEPCSAAYAFFD4A上的Jenkins上运行

[管道] {

[管道]阶段

[管道] {(退房)

[管道]结账

git rev-parse --is-inside-work-tree #timeout = 10从远程Git存储库中获取更改

git config remote.origin.url https://github.com/wingman-xyz/app.git#timeout = 10

没有标签的提取

https://github.com/wingman-xyz/app.git获取上游更改

git --version #timeout = …

jenkins jenkins-pipeline

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

jenkins ×1

jenkins-pipeline ×1