找不到詹金斯的make命令

时间:2018-10-27 12:08:03

标签: jenkins jenkins-plugins

我的JenkinsFile如下

pipeline {
agent any
environment {
    DISABLE_AUTH = 'true'
    DB_ENGINE    = 'sqlite'
}
stages {
    stage('Run unit/integration tests') {
        steps {
            sh 'make test'
        }
    }
    stage('Build application artefacts') {
        steps {
            sh 'make build'
        }
    }
    stage('Create release environment and run acceptance tests') {
        steps {
            sh 'make release'
        }
    }
    stage('Example') {
        steps {
            echo 'Reached example'
        }
    }


}

和Makefile如下

test:
${INFO} "Pulling latest images..."
@ docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) pull
${INFO} "Building images..."
@ docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) build --pull test
@ docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) build cache
${INFO} "Ensuring database is ready..."
@ docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) up agent
${INFO} "Running tests..."
@ docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) up test
# @ cd $$(docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) ps -q test):/reports
# @ cp *.xml ./reports
@ echo $$(docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) ps -q test)
@ docker cp $$(docker-compose -p $(DEV_PROJECT) -f $(DEV_COMPOSE_FILE) ps -q test):**/reports/*.xml
${CHECK} $(DEV_PROJECT) $(DEV_COMPOSE_FILE) test
${INFO} "Testing complete"

当我在Jenkins上运行它时,它在Jenkins的控制台上显示``找不到命令''的错误。我认为这是由于环境变量所致。如何解决此问题?

0 个答案:

没有答案