3 ms·
I'm excited for this, seems like GitLab is moving more into a all-in-one solution, compared to Github that focuses on "social coding", whatever that now means.
by diggan 10y ago
I'm excited for this, seems like GitLab is moving more into a all-in-one solution, compared to Github that focuses on "social coding", whatever that now means.
So to try out this new feature (together with the pipelines), I tried setting up a simple project that uses a docker image to serve a simple html page.
However, it seems like it's not possible to build/push from the CI system (unless you setup a self-hosted runner) which kind of leaves this "Container Registry" without value, because I still need to manually build/push my images from one machine...
- sytse 10y agoThanks, our idea is indeed to build an all-in-one solution. For more information see https://about.gitlab.com/direction/#scope https://about.gitlab.com/direction/#scope You should be able to build/push from the CI system, see the example GitLab CI configuration file in the blog post. EDIT: For GitLab.com users using shared runners this is waiting on the Runner upgrade that we'll do in the coming days. If you use your own runner that runs 1.2 it should be fine.
- drewcrawford 10y agoDoes this work for autoscale runners? Are those privileged by default?
- sytse 10y agoIt is about the Runners needing to be on version 1.2. We'll upgrade the .com autoscaling ones in the coming days. If you run your own autoscaling runners you can upgrade yourself.
- tmaczukin 10y agoOur shared runners should be updated within a week. Then you will be able to use Container Registry on GitLab.com without self-hosted runner.
- Snappy 10y agoYeah, sorry about that. We'll update the blog post to clarify. We're updating the CI runners this week to support this.
- sytse 10y agoUpdated with https://gitlab.com/gitlab-com/www-gitlab-com/commit/c758f6b23e9932106c8a309539342da900c8bbe0#174ec8386397c5e9ee37196e69593ab070fbe673_214_220 https://gitlab.com/gitlab-com/www-gitlab-com/commit/c758f6b2...
- diggan 10y agoAh, thanks to sytse, Snappy and tmaczukin for the replis. I missed that. My configuration looks like this currently (and I'm guessing I'll hold of for a few days for the shared workers to get updated): image: docker:latest services: - docker:dind stages: - build - deploy build: stage: build script: - docker build -t registry.gitlab.com/victorbjelkholm/deploy-html-test:latest . only: - master deploy: stage: deploy script: - docker push registry.gitlab.com/victorbjelkholm/deploy-html-test:latest only: - master
- sytse 10y agoThanks, you didn't miss anything in the blog post, we updated the blog post. https://gitlab.com/gitlab-com/www-gitlab-com/commit/c758f6b23e9932106c8a309539342da900c8bbe0#174ec8386397c5e9ee37196e69593ab070fbe673_214_220 https://gitlab.com/gitlab-com/www-gitlab-com/commit/c758f6b2...
- Snappy 10y agoIf you're going to use the shared runners, I don't think that configuration is going to work. The build step will build it locally, and even though you named it to use the registry, it won't actually push to the registry automatically. By breaking up the push to another step, you're actually going to run that deploy stage on a fresh Digital Ocean instance, so your previously-built image will be lost. That's why the example pushed the image right after the build step. Having said that, if you're literally using that script, you don't even have tests, so you may as well just put both steps into a single build stage like the simplified example. :) For now, you'll need the explicit `docker login` as well. We'll work to remove that.