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

Run integration tests in Travis CI #979

Merged

Conversation

samos123
Copy link
Contributor

  • Change integration tests to use docker hub instead of GCR due to bug
    in library that requires authentication with gcr.io even for public
    images. See kaniko requires authentication for base images that are in gcr.io #966 for bug tracking this.
  • Make uploading to GCS bucket configurable through a flag --uploadToGCS
  • Utilize a locally deployed docker registry in travis CI to remove
    dependency of needing to authenticate with GCP. This requires host
    networking such that we can access the registry on localhost:5000
  • Use the commit that's being tested for TestGitBuildcontext
  • Remove duplicate GitBuildContext case that's now covered by default in
    travis CI.

Related to #947

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.

See the contribution guide for more details.

Reviewer Notes

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

@googlebot googlebot added the cla: yes CLA signed by all commit authors label Jan 19, 2020
- Change integration tests to use docker hub instead of GCR due to bug
in library that requires authentication with gcr.io even for public
images. See GoogleContainerTools#966 for bug tracking this.
- Make uploading to GCS bucket configurable through a flag --uploadToGCS
- Utilize a locally deployed docker registry in travis CI to remove
dependency of needing to authenticate with GCP. This requires host
networking such that we can access the registry on localhost:5000
- Use the commit that's being tested for `TestGitBuildcontext`
- Remove duplicate GitBuildContext case that's now covered by default in
travis CI.
@@ -1,4 +1,4 @@
FROM gcr.io/distroless/base@sha256:628939ac8bf3f49571d05c6c76b8688cb4a851af6c7088e599388259875bde20
FROM debian:10.2
Copy link
Contributor

Choose a reason for hiding this comment

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

ok to change this one from distroless/base to debian?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since there is no reason to use distroless for the test case. Distroless is only available on GCR and there is an issue with GCR when you're not authenticated with gcloud.

Copy link
Contributor

@cvgw cvgw left a comment

Choose a reason for hiding this comment

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

Very nice 👍

@tejal29
Copy link
Member

tejal29 commented Jan 21, 2020

This is great!!
My only concern is we have increased the Travis CI time from 6 mins to 20 mins.
Can we create a Matrix CI job and run make integration be another sub job. That way we can reduce the wait time to ~14 mins ?
What do you think?

Would you be able to do this in this PR ? or want to follow up in another PR?

@samos123
Copy link
Contributor Author

Let's separate that in another PR. I think 20 mins is still acceptable for a full integration testing run since previously it was only running unit tests.

@samos123
Copy link
Contributor Author

also I suggest to keep kokoro running for the the next few weeks at least. This way we can easily see whether some issues might not be catched with a local registry vs using gcr.

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.

4 participants