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

Make cloudbuild.yaml re-usable for anyone #1135

Merged
merged 2 commits into from
Mar 17, 2020

Conversation

samos123
Copy link
Contributor

Cloud build is also really useful for devs that have limited resources
to build Kaniko locally. This commit makes adds parameters to cloudbuild
to make it easy to adjust to your own project.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Cloud build is also really useful for devs that have limited resources
to build Kaniko locally. This commit makes adds parameters to cloudbuild
to make it easy to adjust to your own project.
@googlebot googlebot added the cla: yes CLA signed by all commit authors label Mar 15, 2020
@samos123 samos123 requested review from cvgw and tejal29 March 15, 2020 01:08
Cloud build requires vendors directory to be uploaded when using a build
submitted from local directory. However .gcloudignore prevents the
vendor directory to be uploaded and causes issues.
Copy link
Member

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the cloud build trigger

@@ -2,18 +2,21 @@ steps:
# First, build kaniko
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-f", "deploy/Dockerfile",
"-t", "gcr.io/kaniko-project/executor:${COMMIT_SHA}", "."]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to change the trigger in kaniko Project to set PROJECT_ID to "kaniko-project" along with this change?

Can you please test the trigger which used this file after adding this substitution value
https://pantheon.corp.google.com/cloud-build/triggers/edit/0539d73e-5ccf-46e7-af5a-6f857f99c871?project=kaniko-project

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$PROJECT_ID will automatically be the current project that the cloud build is executing in. Does cloud build trigger run in the project kaniko-project?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!. Great thanks for confirming.

@tejal29 tejal29 merged commit 0a870e4 into GoogleContainerTools:master Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants