Reputation: 622
I'm trying to connect jenkins to container registry on GCP. I follow some examples but I'm blocked on a simple and stupid thing.
I have this stage in my jenkins file :
stage('Push image') {
docker.withRegistry('https://eu.gcr.io', 'gcr:[my-credentials]') {
app.push("${env.BUILD_NUMBER}")
app.push("latest")
}
}
But I don't have any idea which credential put there...
I try to create on GCP -> API&Service -> Credentials -> Create Credential -> Service Account Key
Download the json and add it to Jenkins, on piplene field I use: name of project, credential id, and so on, but it doesn't work.
Upvotes: 0
Views: 666
Reputation: 622
At the end I found a solution.
Upvotes: 1