-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails when triggered by scheduler if using Secret Manager #200
Comments
How are you adding the custom service account? The error indicates the format is wrong, perhaps you need to put it within a Are you giving your custom service account Secret Manager permissions so it can read the Env Vars? |
After debugging googleCloudRunner function I managed to run the build with custom service account.
OAuth2ClientID can be found on your service account's details page as "Unique ID" Although, if the build is triggered from cron it still fails for some reason. Will update if solution is found.
I have been passing it as a regular string.
I get such error:
Seems like a json parsing error..
Yes, sure. That service account has: Could you share some example of |
I have created a pubsub trigger and it ran successfully on custom account, accessing Secret Manager variables. So probably will have to use this approach for now. Working code for anyone stumbling here:
|
I have a custom docker image that runs R script and reads env variables with
Sys.getenv()
.I have added those variables to Secrets Manager, and am using such code to create a build:
.. which runs successfully by default cloudbuild account.
When scheduled with
cr_schedule("test-script", schedule = "15 5 * * *", httpTarget = cr_schedule_http(built))
, the build fails on trigger and returns an error on the line where the env variables are read.Please, help me resolve this! I've tried to add a custom service account to the
cr_build_yaml
andcr_build
, the latter returns a weird http 400 error:This google doc gives another way to address service accounts in
serviceAccount
variable:'projects/PROJECT_ID/serviceAccounts/SERVICE_ACCOUNT'
... which is not an email as per R function
cr_build()
The text was updated successfully, but these errors were encountered: