above is the pipeline script and below is the error message. please help me to resolve the issue
hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: static org.jenkinsci.plugins.docker.workflow.Docker.getImageId() is applicable for argument types: () values:
Hi @saspath, and welcome to the Jenkins community!
Based on the docker variable documentation in my local Jenkins instance (available at https://jenkins-url/pipeline-syntax/globals#docker), I believe you need to be using def imageId = dockerImage.id instead of trying to call a method getImageId(). A quick reading of the Docker Pipeline plugin source confirms that as well. Give that a try and let us know how it goes!
dockerImage.id is returning just the registry β22222222222.dkr.ecr.us-east-1.amazonaws.com/test-repoβ ,
I wanted shaID so used below code.
imageID = sh(returnStdout: true, script: βdocker inspect -f β{{.ID}}β ${registry}β).trim()