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

CI snapcraft installation #96

Merged
merged 3 commits into from
Jul 5, 2019
Merged

CI snapcraft installation #96

merged 3 commits into from
Jul 5, 2019

Conversation

dawidd6
Copy link
Collaborator

@dawidd6 dawidd6 commented Jul 4, 2019

No description provided.

@codecov-io
Copy link

codecov-io commented Jul 4, 2019

Codecov Report

Merging #96 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #96   +/-   ##
=======================================
  Coverage   23.61%   23.61%           
=======================================
  Files          13       13           
  Lines        1080     1080           
=======================================
  Hits          255      255           
  Misses        813      813           
  Partials       12       12

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88dca3f...f84c36c. Read the comment docs.

@dawidd6
Copy link
Collaborator Author

dawidd6 commented Jul 4, 2019

Should work, tested it in Docker on image that is used by CI.

# testing procedure in Docker container based on circleci/golang:1.12 image
# while being in lazydocker source code dir
./.circleci/install_snapcraft.sh
curl -sL https://git.io/goreleaser | bash -s -- --skip-publish --snapshot --rm-dist --skip-sign

Installation is a bit hacky from different sources, but the only official method of installing snapcraft is doing it via snap and to be able to use snap, one has to have snapd daemon running, which is problematic in Docker containers. We could use snapcore/snapcraft Docker image for whole CI process, but then we would need to install go every time CI is fired up and installing snapcraft happens only when there is a new release.

@dawidd6 dawidd6 marked this pull request as ready for review July 4, 2019 15:51
@dawidd6 dawidd6 requested a review from jesseduffield July 4, 2019 15:51
Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

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

tested and it works :)

I would like this to be baked into its own image but as you said this will only happen on release which will be infrequent so it should be fine.

Merge away :)

@dawidd6
Copy link
Collaborator Author

dawidd6 commented Jul 5, 2019

Hmm. We can always make our own image and push it to Docker Hub with everything needed already in it. Or try to contribute to goreleaser directly by adding snapcraft to their Dockerfile.

But for now this solution may be enough.

@dawidd6 dawidd6 merged commit dc87228 into master Jul 5, 2019
@jesseduffield jesseduffield deleted the ci-snap branch July 7, 2019 11:28
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.

3 participants