@mails2nithin/gclt
v1.0.0
Published
Gitlab command line tool for getting project informations.
Downloads
68
Maintainers
Readme
Nithin's Gitlab Command Line Tool (gclt)
An npm package for a GitLab command-line interface (CLI) tool to manage pipelines, builds, and deployments. This tool allows you to fetch pipeline statuses, initiate image builds, and deploy images directly from your terminal.
Features
- Fetch Pipeline Status: Quickly check the status of your GitLab pipeline.
- Build Docker Images: Start Docker image builds effortlessly.
- Deploy Docker Images: Deploy images to your designated environment with a single command.
Installation
Install the package globally via npm:
npm install -g @mails2nithin/gclt
Setup
After installation, create a .env
file with below details.
GITLAB_API_URL
: The URL of your GitLab instance (e.g.,https://gitlab.com/api/v4
).GITLAB_API_TOKEN
: Your GitLab API access token.PROJECT_ID
: The ID of the project you want to manage.CSRF_TOKEN
: Your GitLab API CSRF token.COOKIE
: Your GitLab API cookie.PROJECTS
: Your GitLab projects.BUILD_VARIABLES
: Your GitLab build variables.DEPLOY_VARIABLES
: Your GitLab deploy variables.BRANCHES
: Your GitLab branch.COMPONENT
: Your GitLab components.INSTANCE
: Your GitLab instance.
Usage
Commands
Fetch Pipeline Status
gclt status
This command retrieves the current status of your GitLab pipeline.
Build Docker Image
gclt build
This command triggers a new build for your Docker image.
Deploy Docker Image
gclt deploy
This command deploys the Docker image to the specified environment.
Example
# Check pipeline status
gclt status
# Build image
gclt build
# Deploy image
gclt deploy
License
This project is licensed under the ISC License.