Skip to content

chore: add snap for ubuntu - #965

Merged
qweeah merged 9 commits into
oras-project:mainfrom
SamirPS:snapcraft
Jun 6, 2023
Merged

qweeah merged 9 commits into
oras-project:mainfrom
SamirPS:snapcraft

Conversation

@SamirPS

@SamirPS SamirPS commented Jun 3, 2023 •

Copy link
Copy Markdown

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

codecov-commenter commented Jun 3, 2023 •

Copy link
Copy Markdown

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           

Comment thread snapcraft.yaml Resolved
Comment thread snapcraft.yaml 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
Comment thread snapcraft.yaml Resolved
Signed-off-by: SamirPS <[email protected]>

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@qweeah

qweeah commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

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

Comment thread snapcraft.yaml Resolved
@SamirPS

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

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

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread snapcraft.yaml Resolved
Comment thread snapcraft.yaml Resolved
@qweeah

qweeah commented Jun 5, 2023

Copy link
Copy Markdown
Contributor

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

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

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

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

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

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT

Copy link
Copy Markdown
Contributor

@SamirPS Ready to be merged?

@SamirPS

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

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

@SamirPS

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

@shizhMSFT the MP can be merged now

@shizhMSFT

Copy link
Copy Markdown
Contributor

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

@SamirPS

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

yes i will do it

@FeynmanZhou

Copy link
Copy Markdown
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

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

@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

SamirPS commented Jun 5, 2023

Copy link
Copy Markdown
Author

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]>
@TerryHowe TerryHowe mentioned this pull request Oct 23, 2026
2 of 3 tasks
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