GitLab makes software development remarkably productive by combining the Git workflow with a powerful user interface — making it effortless to review and collaborate on code with your team.
Today, we are proud to announce our first-class integration with GitLab, Now for GitLab.
Now makes it easy for you to build and deploy code — whether you need serverless lambdas, a static website, or both combined.
If you use GitLab in your development workflow, you can take advantage of Now for GitLab and get automatic deployments with built-in CI/CD, DNS and TLS.
Now for GitLab
Before a feature branch is merged and deployed to production, it can be valuable for your team to be able to test progressive iterations via staging deployments.
With Now for GitLab, staging deployments are automatically taken care of, on every push — once your GitLab project is linked to Now.
With only a few steps, you can set up automatic deployments to Now via GitLab:
- Connect to GitLab with one click and link your project
git pushto your project triggers a Now deployment with a unique URL
- The default branch
master) gets aliased to your chosen domain names
Connect with GitLab
The first step in setting up the Now for GitLab integration is to Connect with GitLab. This makes the integration available to your GitLab projects, and, as an additional benefit, it also allows you to Log In to via GitLab.
To get started, visit the accounts page on your individual or team ZEIT account, and click the Connect with GitLab button.
When GitLab requests an authorization, click Authorize.
Once you authorize GitLab, it redirects you back to ZEIT. This completes the account connection process, and you automatically activate the ability to Login with GitLab the next time.
After your GitLab account is connected through the ZEIT accounts page, you can set up automatic deployments for a GitLab project by linking it to Now, with the help of a dropdown.
Once linked, the GitLab project is set up for automatic Now deployments.
What happens after linking
You can learn more about configuring
now.jsonon its docs page. If the
now.jsonfile is missing for a project, we instead deploy the project as a static directory.
By default, we deploy every push. This means that every
git pushdone to a Merge Request branch is deployed — allowing collaborators to preview staging changes before they're merged and deployed to production.
Within a Merge Request, if Now is still building a commit from a previous push, that build is cancelled in favor of the most recently pushed commit. This allows collaborators the quickest access to fresh changes.
Aliases and rollbacks
If the default branch receives a commit reverting changes, an instant rollback is performed on the aliases. When you deploy with Now, we map all your code and configuration to a single, unique URL and a new build is only performed when the underlying code receives changes. If you trigger a revert within GitLab on the default branch, the code and configuration perfectly matches a deployment URL Now previously had. This allows us to perform the alias within milliseconds.
Our mission at ZEIT is to make the cloud accessible for everyone. The Now for GitLab integration was one of our most requested features. We are excited about this announcement, and hope that it makes your development workflow smoother.