GitLab Pipeline
You can use our CLI inside a GitLab pipeline as any other tool CLI tool.
We also provide our own Docker image to run our CLI from it.
Let's understand how you can use our CLI Docker image in your GitLab Pipeline to deploy your app.
Deploy using our CLI Image
You can use our CLI Image in your GitLab pipeline to deploy your app like this:
deployProd:
image:
name: zcloudws/zcloud-cli:latest
pull_policy: always
stage: deploy
script:
- |
zcloud deploy --env <your environment name>
only:
refs:
- main
Configurations:
- env: In Quave Cloud web app you get this value in the
Settings
tab of your app environment (Environment Name
). - dir: the directory that you want to provide as the root directory of your app (optional).
- user-token: In Quave Cloud web app you get this token for your user at app.quave.cloud/profile. We recommend you to create a variable in your GitLab project under
Settings > CI/CD > Variables
calledZCLOUD_USER_TOKEN
so you don't need to inform the token in specific pipelines.
With this configuration in place every time you push code to main
branch a deployment will be triggered.
To learn more options in our CLI check our CLI docs page.