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

Enable github workflow for snaps. #295

Merged
merged 2 commits into from Feb 19, 2020
Merged

Enable github workflow for snaps. #295

merged 2 commits into from Feb 19, 2020

Conversation

hurricanehrndz
Copy link
Contributor

Please add secrets to repo before accepting pull request. See email. If you have any question please fee free to contact me via email.

Copy link
Owner

@Rigellute Rigellute left a comment

Choose a reason for hiding this comment

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

Sorry for the delay.

Thank you for doing this! I've added the secrets.

Just one comment about whether we want to run the snap script on every push to every branch or only master or only when a release tag is created?

@@ -0,0 +1,68 @@
name: snap

on: [push]
Copy link
Owner

Choose a reason for hiding this comment

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

Should we only push to snap from the master branch? Could do something like this?

Suggested change
on: [push]
on:
push:
branches:
- master

Or we could deploy only when a release tag is pushed? (the same way continous deployment is currently configured)

Suggested change
on: [push]
on:
push:
tags:
- "v*.*.*"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the delay.

Thank you for doing this! I've added the secrets.

Just one comment about whether we want to run the snap script on every push to every branch or only master or only when a release tag is created?

Good question. I would run on every commit that leads to a release. That way we are warned when changes break snap builds. The workflow only pushes on tags. So if master is the only branch that ever gets released, I would run the workflow on every push to master.

Copy link
Owner

@Rigellute Rigellute left a comment

Choose a reason for hiding this comment

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

Got you 👍

Thanks again

@Rigellute Rigellute merged commit de7e29c into Rigellute:master Feb 19, 2020
@Rigellute
Copy link
Owner

 User should be logged in
##[error]Process completed with exit code 1.
Run snapcraft whoami
  snapcraft whoami
  shell: /bin/bash -e {0}
/ not root-owned 501:50
##[error]Process completed with exit code 1.

After merging it fails with the above error. Any ideas on how to fix?

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 19, 2020 via email

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 19, 2020 via email

@Rigellute
Copy link
Owner

@hurricanehrndz I corrected one of the secrets (was previously named snapcraft_creds and changed to snapcraft_login).

However, looks like it is still failing 🤔 https://github.com/Rigellute/spotify-tui/runs/457296832?check_suite_focus=true

To confirm, the files you sent me are saved as follows

snapcraft.cfg saved as snapcraft_login
credentials saved as lp_creds

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 20, 2020

@Rigellute ,

I re-exported the login information, and email it to you. Do you have snapcraft installed? If you do you should be to test the command from any directory with the login info emailed to you. Just run the following:

mkdir .snapcraft
cp snapcraft-login .snapcraft/snapcraft.cfg
snapcraft whoami

image

@Rigellute
Copy link
Owner

Have debugged and fixed the snap workflow. Turns out there were a few other problems not related to login info.

See the commits here if you're interested 268348e

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 20, 2020 via email

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 20, 2020 via email

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 20, 2020 via email

@Rigellute
Copy link
Owner

Hi @hurricanehrndz, I just cut a new release (v0.15.0) and encountered another issue with the snap workflow (see here https://github.com/Rigellute/spotify-tui/runs/465367238?check_suite_focus=true)

Error this time is

The store was unable to accept this snap.
binary_sha3_384: A file with this exact same content has already been uploaded

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 25, 2020 via email

@Rigellute
Copy link
Owner

Nice one @hurricanehrndz, thanks so much for your help

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Feb 25, 2020 via email

@Rigellute
Copy link
Owner

No problem at all! And thank you.

Is this to say we should remove workflows/snap.yml?

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.

None yet

2 participants