Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Add Travis CI with Dockerfile #34

Merged
merged 1 commit into from
Jun 3, 2019
Merged

Conversation

TheCharlatan
Copy link
Contributor

Travis CI now runs builds of the middleware and the bbbfancontrol. The travis job runs in its own docker container and runs golangci-lint according the specs defined in middleware/.golangci.yml .

I split the actual docker run into a separate file. When I ran the same lines directly from the script part of the travis.yml , the travis build would fail with the error: "docker: invalid reference format". Tips on how to fix this are welcome.

The travis build will initially fail until the middleware sticks to the golangci style.

Copy link
Contributor

@hkjn hkjn left a comment

Choose a reason for hiding this comment

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

Thanks, great work!

utACK 6c22756

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated
RUN mkdir -p /opt/go_dist &&\
curl https://dl.google.com/go/go1.11.linux-amd64.tar.gz | tar -xz -C /opt/go_dist

ENV GOPATH /opt/go
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Trailing whitespace.

Dockerfile Outdated
gcc \
libc6-dev \
make \
curl \
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: trailing whitespace.

Copy link
Contributor

@hkjn hkjn left a comment

Choose a reason for hiding this comment

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

I tested at 22ba5ee, and there's a typo in travis-ci.sh.

Otherwise, the change seems to work as expected. As described, the make -C <...>/middleware ci fails until the Go code adheres to the .golangci config.

Should we merge those improvements before this PR, in your opinion?

And how should we line up this PR with #31, which also changes quite a lot of details? Merge #31 first, then any necessary patches to address style, then the current one?

scripts/travis-ci.sh Outdated Show resolved Hide resolved
@TheCharlatan
Copy link
Contributor Author

I'd prefer going with this one first, addressing all the further nits it finds in #31 and then merging #31 cleanly.

@hkjn
Copy link
Contributor

hkjn commented Jun 3, 2019

I'd prefer going with this one first, addressing all the further nits it finds in #31 and then merging #31 cleanly.

Okay. Typically I prefer keeping the builds passing with each patchset, but since we haven't had any CI at all before this change I guess this method works, as long as we revisit and address the issues in master (either directly or after merging #31).

Travis CI now runs builds of the middleware and the bbbfancontrol. The
travis job runs in its own docker container and runs golangci-lint
according the specs defined in middleware/.golangci.yml .
Copy link
Contributor

@hkjn hkjn left a comment

Choose a reason for hiding this comment

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

utACK 1491717

@TheCharlatan TheCharlatan merged commit 5e8772e into BitBoxSwiss:master Jun 3, 2019
@TheCharlatan TheCharlatan deleted the ci branch July 17, 2019 14:43
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