add docker credentials before pushing image (#1165)

[ROCm/composable_kernel commit: a78be3f69e]
This commit is contained in:
Illia Silin
2024-02-12 16:11:32 -08:00
committed by GitHub
parent 8063a407e7
commit baa25bcc4b

8
Jenkinsfile vendored
View File

@@ -134,7 +134,9 @@ def buildDocker(install_prefix){
//force building the new docker if that parameter is true
echo "Building image: ${image_name}"
retimage = docker.build("${image_name}", dockerArgs + ' .')
retimage.push()
withDockerRegistry([ credentialsId: "docker_test_cred", url: "" ]) {
retimage.push()
}
sh 'docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi'
}
else{
@@ -146,7 +148,9 @@ def buildDocker(install_prefix){
catch(Exception ex){
echo "Unable to locate image: ${image_name}. Building image now"
retimage = docker.build("${image_name}", dockerArgs + ' .')
retimage.push()
withDockerRegistry([ credentialsId: "docker_test_cred", url: "" ]) {
retimage.push()
}
}
}