We need to automate the snap release to:
edgeWe are currently using Travis but I am happy to move to another CI/CD if ease the process.
This is the continuation of #66
Hey @benyanke and @julian-alarcon , do you have an ETA of this? is this moving or is there any blocker that I can try to help with?
I am going to be mostly off next week and then I got a few weeks before going on holidays.
No rush but wanted to see if you got any info. Thanks!
Here is a good starting point : https://docs.travis-ci.com/user/deployment/releases/
I'll give it a try…
any luck @charlycoste , @benyanke and/or @julian-alarcon ?
I can try and finish setup if someone can provide access to the travis info to hook into CI.
Hi @benyanke , Thanks for the quick response.
I think the travis is just changing the https://github.com/IsmaelMartinez/teams-for-linux/blob/develop/.travis.yml file. That is been inhered from @JamieMagee branch and I haven't touch it since then (well, tried to change something and then revert it...)
The info on how to do I think is in the link by @charlycoste.
That should just trigger the build when you push something. Branch or develop.
Sorry for not been more helpful.
I'll also need admin access to the travis repo, so I can export the credentials and such. Can you provide that?
Can't find a way. Maybe easier to fork and link the fork with Travis? Hope helps
If we did that, the repo would become github.com/benyanke/teams-for-linux. I'm willing to do that, just want to lay out that development would need to move there instead of here (as I'm not really interested in constantly syncing a fork just to do this).
If we do this, I'd be happy to add you as a co-owner on my new repo, and then we can archive this one.
Would you like to do that?
I don't think you can give rights in withing Travis so we will be in the same situation (but in opposite position). I will see if I can have a look next week, but there was nothing obvious in Travis. Maybe we just need to move back to gitlab...
Indeed - though transferring the repo to me would accomplish our goal, since I can grant you full github rights on my repo. Not an amazing option but it would work.
Sorry but I don't understand why all of that is needed. Travis is only a view (it's all automatic) and you can only trigger it with commits.
The results are reported here:
https://travis-ci.org/IsmaelMartinez/teams-for-linux
But a part from linking it to a repo, there is nothing else you can do from the UI.
Transfering ownership will also mean we need to re-do all the "advertising" around, all the moving from fork, etc. Feels overkill when you can just create a branch and play around there with your changes (I am fairly sure you, as contributor, have the rights todo all of that. Otherwise let me know and I dig around the rights area)
Otherwise, I will see if I can have a play myself next week.
Just had a quick look and seems like snapcraft does all the building for you. I will see when I got the time but will test with a different snap package name until it looks like working.
Unfortunately I can't use snap package on my env due work network quicks me out of the domain when trying to do so, so I will be blind.
Ignore my last message. Asked @julian-alarcon to make us author in the snapcraft.
Ok, waiting now for @julian-alarcon to give me/us the authoring.
In the meantime, snap packages are been build in here:
https://snapcraft.io/teams-for-linux-isma/releases
As I have explain before, I can't test them. Those are build now by snapcraft itself.
I have been playing around with travis in here:
https://github.com/IsmaelMartinez/teams-for-linux/tree/travis-changes
But hit this issue https://github.com/travis-ci/dpl/issues/845 so move to build.snapcraft
but then tried that snapcraft build and it seems to be the easier/cleaner way as they deal with what to build/when/how.
can one of you try it? @julian-alarcon , when will you be able to transfer that ownership?
I have ownership as well - it looks like you already have it too @IsmaelMartinez ? I'd look in your snap panel
Looks like you can set it up here: https://snapcraft.io/build
done that build part (is in the snap folder ), but can't seem to be able to do it for an existing project... I might email snapcraft people and see what they say
this might take a while... but slowly moving there. Might need to stop this until later on the week.
The build now is failing because of the nodejs version when using this https://docs.snapcraft.io/the-nodejs-plugin/8514 plugin. Just tried adding the version 8.9.4 to see if works...
Following this:
https://tutorials.ubuntu.com/tutorial/snap-a-website
Hopefully I get somewhere with it. Got also a "issue" open in snap to try to link this repo with the snap via the build.snapcraft.com as @julian-alarcon seem to have it block and does look like you need to be an admin to be able to link them.
ok, reverting to doing either with electron-builder inside travis or travis as that build.snapcraft seems to have a few issues as we need to recompile because of the spellchecker... might need to try to push it up again with travis... as electron-builder doesn't seem to be able to publish it yet either.
ok... trying now with the "script" option. If this doesn't work I might need to park this issue for a while.
ok, back to the snap and it publishes!!
Now a lot/bit of cleanup and we should be able to automate this. Can someone test edge?
https://travis-ci.org/IsmaelMartinez/teams-for-linux/builds/525295183
Cheers
Pushing teams-for-linux_0.2.1_amd64.snap
After pushing, an attempt will be made to release to 'edge'
Preparing to push '/home/travis/build/IsmaelMartinez/teams-for-linux/dist/teams-for-linux_0.2.1_amd64.snap' to the store.
Pushing teams-for-linux_0.2.1_amd64.snap [===============================] 100%
Ready to release!
Revision 5 of 'teams-for-linux' created.
Processing...|
Track Arch Channel Version Revision
latest amd64 stable - -
candidate - -
beta 0.2.0 4
edge 0.2.1 5
Sorry to respond until now. I have been a little busy.
I have been suffering with the snapcraft.yaml file today and snapcraft tool, to be honest now that @IsmaelMartinez made the Travis pipeline works and release we should focus on Travis. Even the current maintainers of Snapcraft recommend electron-builder on NodeJS apps over snapcraft, also the doc is old and not useful:
https://forum.snapcraft.io/t/error-when-im-tryng-to-snap-a-webapp-with-electron/9425/6
https://github.com/canonical-web-and-design/tutorials.ubuntu.com/issues/821
https://github.com/canonical-web-and-design/tutorials.ubuntu.com/issues/939
https://github.com/canonical-web-and-design/tutorials.ubuntu.com/pull/923/files
I will check the travis file, the snap on store and try to update to latest versions some of the components.
BTW I also got errors related with spellcheck. And Some removed features in Node 12 that will be the next LTS.
@IsmaelMartinez you are using electron-build to build and Travis to release on Snap Store?
I'll check the edge versions on the Snap Store and there is a bug reported related with the camera access.
yeah, electron-build (so the package.json) to do the build and the travis to do the deploy. I tried all electron-builder and going down the snapcraft build way but neither was successful.
I just checked the version in Snap and tested other deployment. Seems good to me!