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

Initial build does not display GitLab password in the console #52

Open romankhar opened 4 years ago

romankhar commented 4 years ago

When running Quickstart and doing initial build, all goes well, except that the output does not show the GitLab password. The error is shown below:

Step #8 - "output-connect-details": Log in to your GitLab instance at: https://gitlab.platform.gcpdemo.org
Step #8 - "output-connect-details": Username: root
Step #8 - "output-connect-details":
Step #8 - "output-connect-details": ERROR: (gcloud.secrets.versions.access) INVALID_ARGUMENT: Resource ID [projects/1065071717895/secrets/"gitlab-password"/versions/latest] is not in a valid format.
Step #8 - "output-connect-details": Retrieve password:
Step #8 - "output-connect-details":
Step #8 - "output-connect-details": Visit the user guide in the docs (docs/index.md) to go through a user journey (add, deploy, and change applications).
Finished Step #8 - "output-connect-details"
PUSH
DONE

The issue appears to be in escaping the double quotes in the main cloudbuild.yaml file line 127:

echo "Retrieve password: $(gcloud secrets versions access latest --secret=\"gitlab-password\")"

I can still get the password by running the command myself: gcloud secrets versions access latest --secret=gitlab-password

bmenasha commented 4 years ago

https://github.com/GoogleCloudPlatform/solutions-modern-cicd-anthos/pull/65 resolves this.