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

Update the GitHub Config settings for Generators #596

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

YolandaDu1997
Copy link
Contributor

Changes

This PR aims to add more fields to the input Github config settings tohelp user specify their workflow with more flexibilty for Tekton Generators.

The changes includes:

  1. Add fields branch, storage, secretName, secretKey, serviceAccountName to the GitHubSpec structure.
  2. Add CEL in the triggers to specify the branch.

Submitter Checklist

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

See the contribution guide
for more details.

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 20, 2020
generators/README.md Outdated Show resolved Hide resolved
generators/pkg/generator/generate.go Outdated Show resolved Hide resolved
generators/pkg/generator/generate.go Outdated Show resolved Hide resolved
Comment on lines 50 to 55
// DOCKER_CONFIG is used for kaniko to detect docker credential
env := &github.Spec.Steps[0].Env
*env = append(*env, corev1.EnvVar{
Name: "DOCKER_CONFIG",
Value: "/tekton/home/.docker/",
})
Copy link
Member

Choose a reason for hiding this comment

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

These look like options that are step specific. I think we should remove these, letting users set them manually in their steps if they want it. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. The reason why I add it here is that when I apply the resources on the cluster, the pipelinerun failed since the DOCKER_CONFIG is required to allow kaniko to detect docker credential.

@YolandaDu1997
Copy link
Contributor Author

Done.

@dibyom
Copy link
Member

dibyom commented Jul 23, 2020

This is looking good to me! Let's squash up the commits?

This commit is to add more fields to the input Github config settings to
help user specify their workflow with more flexibilty.

The added fields are 'revision', 'secret', 'branch', 'storage' and 'service
account'. Document the input config fields in the README
@YolandaDu1997
Copy link
Contributor Author

This is looking good to me! Let's squash up the commits?

sure!

Copy link
Member

@wlynch wlynch left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2020
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wlynch

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 23, 2020
@tekton-robot tekton-robot merged commit 03cb4f1 into tektoncd:master Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants