Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Using Dockerhub as a basic CI #3810

Merged
merged 5 commits into from
Aug 9, 2018
Merged

Using Dockerhub as a basic CI #3810

merged 5 commits into from
Aug 9, 2018

Conversation

kav
Copy link

@kav kav commented Aug 7, 2018

Regarding #3792
Wanted to start the discussion on picking the low hanging fruit here.

  • Are there any other steps that should go into CI at this point? Linting, formatting, etc.
  • Is it important to run on PRs ala Travis? If so can we just run docker build as our travis script?

If we'd like to do that I'm happy to write the .travis.yml if someone can enable travis for the repo

Note: tests have two actual failures at this point so this will fail to build at dockerhub. Accepting this pull as is though will show that failures do get correctly reported in the badge so should perhaps proceed before fixing the two issues.

Even if we move to travis and don't use docker build as the script, which is also fine, it might be worth considering accepting this change so that we don't publish broken code to the latest tag on dockerhub.

Dockerfile Outdated
@@ -6,6 +6,9 @@ ENV GOOS=linux

RUN mkdir -pv $NOMS_SRC
COPY . ${NOMS_SRC}
RUN cd $NOMS_SRC/cmd/noms; \
go build; \
go test
Copy link
Contributor

Choose a reason for hiding this comment

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

We should build and test the packages under noms/go too.

Copy link
Author

Choose a reason for hiding this comment

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

Will do, and I'll update the contributor guide since I cribbed the test commands from there ;)

@aboodman
Copy link
Contributor

aboodman commented Aug 7, 2018

It'd be cool to test PRs. And it looks like Travis is free for open source projects.

Are there any downsides to using Travis that you know of? It's been awhile since I've had to think about it. If not, I'll set it up today/tonight.

I agree it still makes sense to land this for the reason you mention.

===

Side note: in order to land this, I need you to complete the contributors agreement: https://github.com/attic-labs/noms/blob/master/CONTRIBUTING.md#contributing-code

@aboodman
Copy link
Contributor

aboodman commented Aug 7, 2018

PS: Thanks for the contributions!

@kav
Copy link
Author

kav commented Aug 7, 2018

Signed the agreement while the fork was... forking... so I should be good there, will add the above changes and the .travis.yml shortly

@kav
Copy link
Author

kav commented Aug 8, 2018

I've not used Travis a lot, been doing more with Drone lately, but Travis still seems pretty handy given the free for OSS and hosted nature of it all.

@kav
Copy link
Author

kav commented Aug 8, 2018

Alright @aboodman, I think this is ready for merge. I also pulled samples out of the build image as their test dependencies weren't resolving and it's not really related to noms working.

I haven't tested Travis file. Not 100% sure how to do that without just installing it and pushing

Copy link
Contributor

@aboodman aboodman left a comment

Choose a reason for hiding this comment

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

Sweet, thanks!

codecov.yml
CONTRIBUTING.md
LICENSE
README.md
samples
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but add the trailing newline.

@@ -3,9 +3,11 @@ FROM golang:latest AS build
ENV NOMS_SRC=$GOPATH/src/github.com/attic-labs/noms
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV NOMS_VERSION_NEXT=1
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the dupe line further down.

@aboodman aboodman merged commit 0577d53 into attic-labs:master Aug 9, 2018
aboodman added a commit to aboodman/noms that referenced this pull request Aug 9, 2018
@aboodman
Copy link
Contributor

aboodman commented Aug 9, 2018

@kav kav deleted the dockerci branch August 9, 2018 20:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants