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

chore: add snap for ubuntu #965

Merged
merged 9 commits into from
Jun 6, 2023
Merged

chore: add snap for ubuntu #965

merged 9 commits into from
Jun 6, 2023

Conversation

SamirPS
Copy link
Contributor

@SamirPS SamirPS commented Jun 3, 2023

What this PR does / why we need it:

This PR permit to create a snap for ubuntu.

On Linux install snapcraft

 sudo snap install snapcraft --classic

git clone this repository and put the snapcraft.yaml file i put on the PR in this folder.

And After

 snapcraft --debug

AT the end you will have a .Snap file install it with

 sudo snap install *.snap  --dangerous

You have installed the snap, now just run oras by typing oras

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

Signed-off-by: Samir Akarioh <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2023

Codecov Report

Merging #965 (71e74a5) into main (57005b9) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##             main     #965   +/-   ##
=======================================
  Coverage   81.15%   81.15%           
=======================================
  Files          53       53           
  Lines        2776     2776           
=======================================
  Hits         2253     2253           
  Misses        354      354           
  Partials      169      169           

snapcraft.yaml Outdated Show resolved Hide resolved
snapcraft.yaml Outdated Show resolved Hide resolved
SamirPS and others added 2 commits June 4, 2023 14:24
Co-authored-by: Terry Howe <[email protected]>
Signed-off-by: SamirPS <[email protected]>
Co-authored-by: Terry Howe <[email protected]>
Signed-off-by: SamirPS <[email protected]>
@SamirPS SamirPS requested a review from TerryHowe June 4, 2023 12:24
Signed-off-by: SamirPS <[email protected]>
Copy link
Member

@TerryHowe TerryHowe left a comment

Choose a reason for hiding this comment

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

/lgtm

@qweeah
Copy link
Contributor

qweeah commented Jun 5, 2023

Thanks @SamirPS for contributing. Should snapcraft --debug be added to Github actions so the snap of ORAS can be automatically updated when releasing?

snapcraft.yaml Show resolved Hide resolved
@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

@qweeah you can use theses actions to build and publish :

https://github.com/snapcore/action-build and https://github.com/snapcore/action-publish

Signed-off-by: SamirPS <[email protected]>
@SamirPS SamirPS requested a review from qweeah June 5, 2023 08:46
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

nit: can you help format the header as suggested, thanks

snapcraft.yaml Outdated Show resolved Hide resolved
snapcraft.yaml Show resolved Hide resolved
@qweeah
Copy link
Contributor

qweeah commented Jun 5, 2023

Another stupid question on the versioning: I followed the instructed steps and the snapcraft ends with generating a file named oras_v0.8.1+git377.3792315_amd64.snap. What does the v0.8.1 mean? I think this is not the version of built ORAS since I then do snap install and the generated version of oras is 1.0.0+unreleased.

qweeah and others added 2 commits June 5, 2023 18:48
@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

It's not the version of oras it's come from the version:git name the snap like this oras_$(git_describe)_$(arch).snap

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT changed the title add snap for ubuntu chore: add snap for ubuntu Jun 5, 2023
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT
Copy link
Contributor

@SamirPS Ready to be merged?

@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

Not for now @shizhMSFT we have a little issue when registering the name oras with @FeynmanZhou

@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

@shizhMSFT the MP can be merged now

@shizhMSFT
Copy link
Contributor

@SamirPS The DCO check failed. Could you fix that?

@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

yes i will do it

@FeynmanZhou
Copy link
Member

Please wait for a while. I tested snap install oras but it looks like Snap gets the ORAS from the main branch. This is not stable. We need to use a specific tag or GitHub release for v1.0.0

 oras version
Version:        1.0.0+unreleased
Go version:     go1.20.4
Git commit:     dd6865a980650e4ff2eca2db771f7772a73e2cb3
Git tree state: dirty

@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

@FeynmanZhou now i use the tag and pinpoint the version on the snapcraft.yaml file

samir@samir-Laptop:~/testoras/oras$ oras version
Version:        1.0.0
Go version:     go1.20.4
Git commit:     b58e7b910ca556973d111e9bd734a71baef03db2
Git tree state: clean

Samir Akarioh added 2 commits June 5, 2023 16:46
@SamirPS
Copy link
Contributor Author

SamirPS commented Jun 5, 2023

This snapcraft build snap for amd64,arm64 and s390x

@qweeah qweeah merged commit 3ff15bb into oras-project:main Jun 6, 2023
shizhMSFT pushed a commit to shizhMSFT/oras that referenced this pull request Aug 3, 2023
Signed-off-by: Samir Akarioh <[email protected]>
Signed-off-by: SamirPS <[email protected]>
Co-authored-by: Terry Howe <[email protected]>
Co-authored-by: Billy Zha <[email protected]>
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.

6 participants