Skip to content
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

Kaniko workflow to build and push to GCR is failing (project itself) #2514

Closed
skype007 opened this issue May 21, 2023 · 3 comments · Fixed by #2524
Closed

Kaniko workflow to build and push to GCR is failing (project itself) #2514

skype007 opened this issue May 21, 2023 · 3 comments · Fixed by #2524

Comments

@skype007
Copy link

Actual behavior
Since the merge of this PR #2502 the workflow of building kaniko image is no more able to push to GCR.

Expected behavior
Build and push Kaniko image successfully.

Additional Information

  • Since the update of google-github-actions/setup-gcloud, there's a warning which may explain the issue:

Warning: Unexpected input(s) 'service_account_key', 'export_default_credentials', valid inputs are ['skip_install', 'version', 'project_id', 'install_components']
Warning: No authentication found for gcloud, authenticate with **google-github-actions/auth**.

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
@skype007 skype007 changed the title Kaniko workflow to build and push to GCP is failing (project itself) Kaniko workflow to build and push to GCR is failing (project itself) May 21, 2023
@aaron-prindle
Copy link
Collaborator

aaron-prindle commented May 22, 2023

Thanks for flagging this @skype007, can you explain how you reproduced this and when this occurs? In attempting to repro this via running the Build Images workflow which uses the google-github-actions/setup-gcloud action it seems that all of the tests pass. My understanding of the issue as you posted above would be that this would fail so not sure if I am misunderstanding or perhaps didn't test this properly:
PR testing the CI/CD flow here:
#2516

image

Would greatly appreciate if you could elaborate a bit on when this occurs, how to reproduce this and the impact here. Thanks!

@skype007
Copy link
Author

skype007 commented May 22, 2023

@aaron-prindle All of the tests pass as shown on your screenshot because it's just a PR. In the workflow code, there's the condition if: github.event_name != 'pull_request'
Because of this, the steps related to google-github-actions are skipped

image

It's only reproducible on the "main" branch as displayed here:

image

@aaron-prindle
Copy link
Collaborator

aaron-prindle commented May 22, 2023

Ah I see now, thanks for your explanation there. Have submitted a PR to revert #2502 here:
#2524

Will look into the changes necessary to properly bump the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants