Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add docker files for testing the playpen snaps #195
Conversation
|
I think it's better to keep all the resources we need for testing in the same repository. I still can't make the autobuild job in docker hub. @didrocks could you do it for me or give me more permissions? Once the autobuild is ready, I will modify the travis file to get the image name as an argument. It will default to use the snapcraft in xenial, but we will be able to trigger another job in response to changes in snapcraft that uses the other docker image. |
didrocks
reviewed
Jul 26, 2016
| +# build and install snapcraft from master. | ||
| +git clone https://github.com/snapcore/snapcraft | ||
| +cd snapcraft | ||
| +apt build-dep -y ./ |
didrocks
Jul 26, 2016
Owner
I would probably clean the build-dep in the image after building the package to keep the docker container as close to a vanilla install as possible.
elopio
Jul 26, 2016
Member
That sounds great, but I don't know how to do it. Is there a way to get the list of packages that will be installed by apt ? I can't just remove all the dependencies, because some of them were already preinstalled in the machine.
didrocks
Jul 27, 2016
Owner
I'm unsure how apt build-dep works (if they mark the deps as autoinstalled). If so, you can just run sudo apt autoremove --purge once you installed your local .deb (so last step).
If not, you can revert to the old way of doing this build-dep install:
https://github.com/ubuntu/ubuntu-make/blob/master/Dockerfile#L53
mk-build-deps, then removing the local .deb for build-deps, and finally apt autoclean as well.
Tell me how it goes :)
elopio
Aug 9, 2016
Member
@didrocks I tried the autoremove --purge, but it doesn't remove packages like python3-fixtures that are only build dependencies.
I added them to the remove statement. It sucks, because it can get out of date, but works for now. Pushed for a new review. Thank you!
|
Excellent Leo! We did the autobuild with a webhook which is pushing a daily signal to tell to rebuild the package version of docker. For the one from master, I guess, the trigger is from any new commit in the snapcraft tree. I'll have a look if I can do this (I'm unsure if docker is taking subdirectories though for those use case or expect the DockerFile to be in the root of the repo). Something else: can you please exclude the |
|
I think both will rebuild on any change on the playpen, and we can add a trigger from changes in snapcraft master too. |
|
Ok, this looks good to me, let's see once it's merged how you can create a couple of new docker images from this branch (I'm interested, I didn't know this was possible). I'll let you handle that part and watch closely :) |
|
|
elopio
added some commits
Jul 25, 2016
|
|
|
Sorry, I did miss the followup fixes! Everything looks good (yeah, let's do that for build-deps for now, good enough!). I'll let you setup the dockerhub project under the common namespace then! |
elopio commentedJul 25, 2016
•
Edited 1 time
-
didrocks
Jul 25, 2016
The docker-lts image is a copy from didrocks' ubuntu/docker-snapcraft. The other one is for testing the build using snapcraft from master.
I still can't make the autobuild job in docker hub. @didrocks could you do it for me or give me more permissions?
Once the autobuild is ready, I will modify the travis file to get the image name as an argument. It will default to use the snapcraft in xenial, but we will be able to trigger another job in response to changes in snapcraft that uses the other docker image.
We did the autobuild with a webhook which is pushing a daily signal to tell to rebuild the package version of docker. For the one from master, I guess, the trigger is from any new commit in the snapcraft tree. I'll have a look if I can do this (I'm unsure if docker is taking subdirectories though for those use case or expect the DockerFile to be in the root of the repo).
Something else: can you please exclude the
testing/directory inci-runso that the test doesn't try to build a snap?I excluded the testing dir.
I'll let you setup the dockerhub project under the common namespace then!
sudo apt autoremove --purgeonce you installed your local .deb (so last step).If not, you can revert to the old way of doing this build-dep install:
https://github.com/ubuntu/ubuntu-make/blob/master/Dockerfile#L53
mk-build-deps, then removing the local .deb for build-deps, and finally apt autoclean as well.
Tell me how it goes :)
I added them to the remove statement. It sucks, because it can get out of date, but works for now. Pushed for a new review. Thank you!