I got my project in gitlab and push it to Google Cloud Plattform, to build, push and deploy. The first step building it, works fine and finished with:
Built and pushed image as gcr.io/my-project/backend
But always the second step is failing with this:
The push refers to repository [gcr.io/my-project/backend] An image does not exist locally with the tag: gcr.io/my-project/backend
My cloudbuild.yaml
# build the container image
- name: 'gcr.io/cloud-builders/mvn:3.5.0-jdk-8'
args: ['clean', 'install', 'jib:build', '-Dimage=gcr.io/$PROJECT_ID/backend']
# push the container image
- name: 'gcr.io/cloud-builders/docker'
args: [ 'push', 'gcr.io/$PROJECT_ID/backend:latest']