-
Type: Bug
-
Status: Resolved
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Jenkins X
-
Epic Link:
-
Team:PLATFORM
-
Sprint:nxplatform 11.1.28
-
Story Points:3
Since the Jenkins X platform upgrade, see NXBT-3201, the platform builders build is failing with:
23:17:39 [36mINFO[0m[0000] Resolved base name gcr.io/jenkinsxio/builder-jx:2.0.896-246 to gcr.io/jenkinsxio/builder-jx:2.0.896-246 23:17:39 [36mINFO[0m[0000] Resolved base name gcr.io/jenkinsxio/builder-jx:2.0.896-246 to gcr.io/jenkinsxio/builder-jx:2.0.896-246 23:17:39 [36mINFO[0m[0000] Downloading base image gcr.io/jenkinsxio/builder-jx:2.0.896-246 23:17:39 [36mINFO[0m[0000] Error while retrieving image from cache: Get https://gcr.io/v2/token?scope=repository%3Ajenkinsxio%2Fbuilder-jx%3Apull&service=gcr.io: invoking docker-credential-gcr: exit status 1; output: docker-credential-gcr/helper: could not retrieve GCR's access token: google: error getting credentials using GOOGLE_APPLICATION_CREDENTIALS environment variable: open /secret/kaniko-secret: no such file or directory 23:17:39 [36mINFO[0m[0000] Downloading base image gcr.io/jenkinsxio/builder-jx:2.0.896-246 23:17:39 error building image: Get https://gcr.io/v2/token?scope=repository%3Ajenkinsxio%2Fbuilder-jx%3Apull&service=gcr.io: invoking docker-credential-gcr: exit status 1; output: docker-credential-gcr/helper: could not retrieve GCR's access token: google: error getting credentials using GOOGLE_APPLICATION_CREDENTIALS environment variable: open /secret/kaniko-secret: no such file or directory 23:17:39 time="2020-01-28T22:17:38Z" level=fatal msg="build failed: build failed: building [builder-base]: kaniko build for [builder-base]: waiting for pod to complete: condition error: pod already in terminal phase: Failed"
This is caused by an upgrade of Skaffold.
Indeed, the issue was reproduced on a devpod but was not happening when downgrading to Skaffold 0.38.0, the version previously installed.
When upgrading the Jenkins X platform, we went from:
- Jenkins X platform: 2.0.1547
- jx-base builder: gcr.io/jenkinsxio/builder-jx:2.0.933-279
- builder-jx: FROM gcr.io/jenkinsxio/builder-base:0.0.69
- Skaffold version in builder-base v0.38
to:
- Jenkins X platform: 2.0.1849
- jx-base builder: gcr.io/jenkinsxio/builder-jx:2.0.1117-453
- builder-jx: FROM gcr.io/jenkinsxio/builder-base:0.0.77
- Skaffold version in builder-base: v1.0.1
So we're now running on Skaffold 1.0.1.
Yet, the culprit appeared in 0.39.0, see "Optional pull secret for Kaniko #2910" in https://github.com/GoogleContainerTools/skaffold/releases/tag/v0.39.0
and https://github.com/GoogleContainerTools/skaffold/pull/2910/files
For a reason that is still unclear, we need to explicitly add
build: cluster: pullSecretName: kaniko-secret
Though, according to the reference documentation, pullSecretName defaults to kaniko-secret.