ECR Docker errors in Jenkins pipelines

0

We are seeing random ECR docker errors in our Jenkins pipelines.

There are two types of errors noticed 1) ERROR: Timeout after 180 seconds 2) failed to export image: failed to set parent sha256:abcd: unknown parent image ID sha256:abcd.

As per few suggestions, I tried to introduce a retry mechanism for error 1. And there are several suggestions for the second issue, increasing disc space, performing docker prune, changing docker version etc.,

Please help in understanding the root causes of the issues and suggest how this can be fixed temporarily on the pipelines.

pipeline{
    agent any
    stages{
        stage('POC') {
            steps{
                script{
                    withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'credId']]) {
	                    docker.withRegistry("https://xxxx.dkr.ecr.us-east-1.amazonaws.com") {
	                        sh("`aws ecr get-login --no-include-email --region us-east-1`")
	                        docker.image('xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:my-version').inside{
	                          script{
	                            sh("echo6 'POC'")
	                          }
	                        }
	                    }
	                }
                }
            }
        }
    }
}

This is a follow up to https://repost.aws/questions/QUIexgvHvYQvyD6i2ExcY-6Q/ecr-login-token-expiry-reauthentication-suggestions

demandé il y a 10 mois84 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions