Deploy to Rill Cloud from Gitlab
While Rill Cloud natively integrates with Github, you can also deploy your Rill project from Gitlab using direct uploads from a Gitlab CI/CD pipeline.
Follow these steps to setup continuous deployment from Gitlab to Rill Cloud:
-
Create a new Gitlab repository and push your Rill project to it.
-
On your local, authenticate with Rill Cloud and create an organization (replace
my-org-name
with your desired name):
rill login
rill org create my-org-name
- Provision a Rill Cloud service account called
gitlab-ci
and copy its access token:
rill service create gitlab-ci
-
Set the service token as a CI/CD variable called
RILL_SERVICE_TOKEN
in Gitlab (from the repository page, it's under Settings > CI/CD > Variables). -
Create a file named
.gitlab-ci.yml
at the root of the repository containing your Rill project. Paste the following contents into it (replacemy-org-name
andmy-project-name
with your desired names):
deploy-rill-cloud:
stage: deploy
script:
- curl -L -o $HOME/rill.zip https://cdn.rilldata.com/rill/latest/rill_linux_amd64.zip
- unzip -d $HOME $HOME/rill.zip
- $HOME/rill project deploy --org my-org-name --name my-project-name --interactive=false --api-token $RILL_SERVICE_TOKEN
Your Rill project should now automatically deploy to ui.rilldata.com/my-org-name/my-project-name
each time changes are pushed to Gitlab!