Jenkins "No such DSL method 'steps' found among steps"

Viewed 4367

Jenkins output error..

[Checks API] No suitable checks publisher found.

java.lang.NoSuchMethodError: No such DSL method 'steps' found among steps

My jenkinsfile.

node {
 stage('Clone repository') {
     checkout scm
 }
 stage('Build packer') {
     steps {
         dir('packer') {
             sh 'git clone https://github.com/changhyuni/packer'
             sh 'packer build ec2.json'
         }
     }
 }

 stage('Build image') {
     app = docker.build("475667265637.dkr.ecr.ap-northeast-2.amazonaws.com/chang")
 }
 
 stage('Create ECR') {
     sh 'pip3 install boto3 --upgrade'
     sh 'python3 ecr.py'  
 }


 stage('Push image') {
     sh 'rm  ~/.dockercfg || true'
     sh 'rm ~/.docker/config.json || true'
     
     docker.withRegistry('https://475667265637.dkr.ecr.ap-northeast-2.amazonaws.com', 'ecr:ap-northeast-2:chang-aws-ecr') {
         app.push("chang")
         app.push("${env.BUILD_NUMBER}")
         app.push("latest")
  }
 }
}
1 Answers
Related