0
pipeline {
  agent any
  stages {
    stage('Git Progress') {
      steps {
        git branch: 'main', credentialsId: 'eub456', url: 'https://github.com/eub456/webtest.git'
      }
    }
  stage('Gradle Build & Image buil') {
      steps {
        sh 'chmod +x ./gradlew'
        sh './gradlew clean build'
        sh 'docker build -t eub456/test .'
        }
    }
  stage('Push docker image') {
    steps {
        withDockerRegistry([ credentialsId: "test", url: "https://registry.hub.docker.com" ]) {
        'step' dockerImage("eub456/test").push()
        }
    }
  }
  }
}

--------错误--------------- java.lang.NoSuchMethodError: 在步骤中找不到这样的 DSL 方法 'dockerImage' ...

我寻找问题并修复它们,但我不知道。

4

0 回答 0