GitLab Build Variables
Tools for dealing with GitLab CI pipeline build variables.
Tools
Managing Multiple Projects
Updating GitLab Build Variables
Sets project build variables based on a configuration file:
gitlab-update-variables --url ${gitlabUrl} --token ${accessToken} --default-setting-extension ${extensions} \
--setting-repository ${repositoryDirectories} -- ${configLocation}
`See Example 1 <#example-1>`__ for a more intuitive example of how to use this tool!
Managing a Single Project
Setting a GitLab Build Variables
This tool allows a GitLab CI project’s build variables to be set from a ini config file, a JSON file or a shell script that just exports variables:
gitlab-set-variables --url ${gitlabUrl} --token ${accessToken} ${project} ${locationOfVariables}
Getting GitLab Build Variables
gitlab-get-variables --url ${gitlabUrl} --token ${accessToken} ${project}
Examples
Example 1
Using the example configuration to update the variables for a number of projects:
$ export gitlabUrl=https://gitlab.example.com
$ export accessToken=personalAccessToken
$ gitlab-get-variables --url ${gitlabUrl} --token ${accessToken} cn13/my-project-1
{'VALUE_1': 'other'}
$ gitlab-get-variables --url ${gitlabUrl} --token ${accessToken} cn13/my-project-2
{}
$ gitlab-update-variables --url ${gitlabUrl} --token ${accessToken} --default-setting-extension json ini sh \
--setting-repository examples/settings -- examples/config.json
Read config from "examples/config.json"
Set variables for "cn13/my-project-1": {'VALUE_1': 'abc', 'VALUE_2': 'other', 'VALUE_3': 'other'}
Set variables for "cn13/my-project-2": {'VALUE_1': 'abc', 'VALUE_2': 'other', 'VALUE_3': 'ghi'}
Example 2
Using the settings defined in the example directory to update a project’s variables:
$ export gitlabUrl=https://gitlab.internal.example.com
$ export accessToken=applicationAccessToken
$ gitlab-get-variables --url ${gitlabUrl} --token ${accessToken} my-project
{'VALUE_1': 'other'}
$ gitlab-set-variables --url ${gitlabUrl} --token ${accessToken} group/my-project common.json s3.sh project.ini
Variables for project "my-project" set to: {'VALUE_1': 'abc', 'VALUE_2': 'def', 'VALUE_3': 'ghi'}
Metadata
Release files for gitlabbuildvariables 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitlabbuildvariables-1.1.0.tar.gz | 25.3 kB | Without provenance | Details for gitlabbuildvariables-1.1.0.tar.gz |
Release files / gitlabbuildvariables-1.1.0.tar.gz
| Download URL | gitlabbuildvariables-1.1.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8db25188a3131eb22929d9a04a9da1a5ba16c0fd1e8c36c6f641b002de5279f
|
|
BLAKE2b-256 checksum How to use checksums |
744b99472b57c4a3d9a1a1b16594b6b821fa2e8b15c7287c82c0cf5100a21472
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for gitlabbuildvariables 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.