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 Travis CI to support PR push #262

Merged
merged 1 commit into from Oct 29, 2019
Merged

Conversation

rvmiller89
Copy link
Contributor

@rvmiller89 rvmiller89 commented Oct 29, 2019

Description
  1. Only pushing to master (merging a PR) will run CI with push event type
  2. Otherwise, all PRs will run CI with pull_request event type. In this case we look at TRAVIS_PULL_REQUEST_BRANCH in order to detect changes made to generated files, or changes that need to be committed for generated files.

FYI: @maimaisie

Testing performed
  • ci/build.sh
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in
  • Test making invalid change and verifying it fails
  • Test making valid change and verify it commits the generated yaml files
  • Test making subsequent valid change and verify it commits the updated generated files

Copy link
Contributor

@samjsong samjsong left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking care of this so quickly Ryan

Copy link
Contributor

@samjsong samjsong left a comment

Choose a reason for hiding this comment

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

oops forgot to click Approve 😄

@rvmiller89 rvmiller89 merged commit d93a768 into master Oct 29, 2019
@rvmiller89 rvmiller89 deleted the rmiller-update-ci-pr-final branch October 29, 2019 21:58
@@ -70,7 +70,7 @@ echo "Test docker image locally..."
ruby deploy/test/test_docker.rb

# Check for changes that require re-generating overrides yaml files
if [ "$TRAVIS_BRANCH" != "master" ] && [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ -n "$GITHUB_TOKEN" ]; then
if [ -n "$GITHUB_TOKEN" ] && [ "$TRAVIS_EVENT_TYPE" == "pull_request" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, @samjsong , PRs submitted from outside repos like #264 won't have $GITHUB_TOKEN . So this will require some more thought.

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

Successfully merging this pull request may close these issues.

None yet

2 participants