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 ZEIT via GitLab.
To get started, visit the accounts page on your individual
or team ZEIT account, and click the Connect with GitLab button.
The Connect with GitLab button helps you connect your individual or team account with GitLab.
When GitLab requests an authorization, click Authorize.
Click Authorize to complete the GitLab connection process.
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.
Once you connect GitLab, you also activate the ability to Log In to ZEIT with GitLab.
For every git push to a GitLab project, we build and deploy the latest commit with Now.
The deployment is guided by a now.json file.
It allows you to configure the deployments for domain name and choice of Builder,
among other options.
You can learn more about configuring now.json on
its docs page.
If the now.json file 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 push done 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.
When an alias
is specified in the now.json file, introducing changes to the
causes the deployment to be aliased automatically, as soon as the deployment completes.
All the aliases are immediately made live, with no extra steps necessary.
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.
All of our work is heavily driven by feedback from our users. For feature requests,
or to suggest us ideas to make our platform and your experience better,
please reach out to us us over chat or on Twitter.