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

Set github webhook secret #99

Merged
merged 1 commit into from
Sep 16, 2019

Conversation

akihikokuroda
Copy link
Member

@akihikokuroda akihikokuroda commented Sep 6, 2019

Changes

This PR adds function to set the secret string into the github webhook in the Create-Webhook tekton task.

When the secret specified in the GithubSecretName has the "secretString" key, the value is set to the github webhook secret. This secret is used when the issue #45 is implemented.

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.

Release Notes

@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 6, 2019
@@ -114,11 +114,16 @@ spec:
exit 0
fi
echo "Create Webhook"
option=""
Copy link
Member

@dibyom dibyom Sep 12, 2019

Choose a reason for hiding this comment

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

Minor nit: Maybe instead of option we can call this something more descriptive like webhooksecret?

Copy link
Member Author

Choose a reason for hiding this comment

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

make sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

I make the secret string mandatory so I take out the variable after all.

@@ -82,7 +82,7 @@ These are the task parms to manage the task execution
This param is the github repo name (github.com/onwer/**repo**)
- value: string
- name: `GithubSecretName`
This param is the secret name for github access token. The key **userName** must have the github user name and **accessToken** must have the github access token
This param is the secret name for github access token. The key **userName** must have the github user name and **accessToken** must have the github access token. If the secret has the key **secretString**, the value is set to the `Secret` in the github webhook.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have access Token, username and secret string configurable with default values?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I will

@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 13, 2019
@akihikokuroda
Copy link
Member Author

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2019
@akihikokuroda
Copy link
Member Author

Documentation changes will be in #100

@akihikokuroda
Copy link
Member Author

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 13, 2019
@akihikokuroda
Copy link
Member Author

Fix for #110 is in this PR, too.

This was referenced Sep 13, 2019
@ncskier
Copy link
Member

ncskier commented Sep 16, 2019

Thanks Aki! This will work with our new validation task 👍
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2019
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akihikokuroda, ncskier

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 Sep 16, 2019
@tekton-robot tekton-robot merged commit 8af6414 into tektoncd:master Sep 16, 2019
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants