A Rust tool to manage GitLab pipeline variables across multiple projects. This tool allows you to update the pipeline variables with new content. Please be advised that all of the projects will be scanned if you provide Personal Access Token. To update variable at specific project please use Project Access Token.
This tool lists all the projects that can be accessed with the provided gitlab token and updates the given variable with the new content.
- List all projects in a GitLab organization. (if provided Personal Access Token)
- Check maintainer access for each project.
- Update the provided pipeline variable for projects with maintainer access.
- Rust (latest stable version)
- Cargo (Rust's package manager)
- GitLab Personal Access Token - If you provide this kind of token you need to be
mainanerorownerof the repo where you want to update the variable and also you need to to have API permissions when creating the token - Project Access Token - you need to provide API permission for the said token.
-
Clone the repository:
git clone https://github.com/DanielKoklev/rust-gitlab-variables.git cd rust-gitlab-variables -
Run the tool:
cargo run -- -t <token> -v <variable-to-update> -n <new-content-for-the-variable>
-
Or you can build it with:
cargo build
And then execute it via:
./targets/release/rust-gitlab-variables -t <token> -v <variable-to-update> -n <new-content-for-the-variable>