GoogleCloudPlatform / solutions-modern-cicd-anthos

An end-to-end operating model for onboarding and continually deploying services with Anthos.
Apache License 2.0
86 stars 61 forks source link

hydrate-manifests (Kustomize) stage failing #79

Open bgood opened 4 years ago

bgood commented 4 years ago

The image used to run the kustomize stage to hydrate manifests is failing because the image recent got updated.

Error output during the hydrate-manifest stage is:

Error: accumulating resources: accumulateFile "accumulating resources from 'https://<GITLAB-HOSTNAME>/platform-admins/shared-kustomize-bases//golang?ref=master': YAML file [https://<GITLAB-HOSTNAME>/platform-admins/shared-kustomize-bases//golang?ref=master] encounters a format error.\nerror converting YAML to JSON: yaml: line 3: mapping values are not allowed in this context\n", accumulateDirector: "couldn't make target for path '/tmp/kustomize-151693645/repo': unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/tmp/kustomize-151693645/repo'"

I think this is probably related to the deprecation of bases or a new line issue in the latest version of Kustomize.

As a work around the kustomize image used for they hydrate-manifests stage in platform-admins/shared-ci-cd/cd/kustomize.yaml can be set to:

gcr.io/cloud-solutions-images/kustomize@sha256:949719059c41085f9eeb89b74c03ccac60e2142eeabeb3ede9614a33433b09eb
bgood commented 4 years ago

@viglesiasce

kenthua commented 4 years ago

impacts hipster as well, so this needs to be changed as well platform-admins/shared-ci-cd/cd/hipster-kustomize.yaml

viglesiasce commented 4 years ago

Sorry for the delay i hadnt seen this. Will take a look now

viglesiasce commented 4 years ago

I was able to reproduce this with the new Skaffold based render steps.

Kent is your pipelin using skaffold render?

kenthua commented 4 years ago

yes, on the initial golang-template -> app switch pipeline, then subsequent on the app specific ci which doesn't have skaffold in the mix