@@ -18,7 +18,7 @@ $ npm install -g gitlab-ci-variables-setter-cli
1818
1919## Usage  
2020
21- Put all required variable key/values on a properties file named ` gitlab.env.yml ` . For example :
21+ Put all required variable key/values on a properties file named ` gitlab.env.yml ` , e.g :
2222
2323``` yml 
2424AWS_CREDENTIALS : | 
@@ -37,18 +37,54 @@ Run the following command from the directory that contains the properties file,
3737
3838` ` ` sh
3939$ setAllVars --token <gitlab-token> --url <gitlab-project-url> 
40+ Set AWS_CREDENTIALS = <value> for gitlab-org/gitlab-ce. 
41+ Set NPM_INSTALL_TOKEN = <value> for gitlab-org/gitlab-ce. 
42+ Completed setting variables on Gitlab CI. 
4043` ` ` 
4144
42- By default, all existing variables on Gitlab CI will be overridden. If you wish to ignore existing variables, add a `--do-not-force` option, i.e.  
45+ By default, all existing variables on Gitlab CI will be overridden. If you wish to ignore existing variables, add a `--do-not-force` option, e.g  : 
4346
4447` ` ` sh
4548$ setAllVars --token <gitlab-token> --url <gitlab-project-url> --do-not-force 
49+ Skipping AWS_CREDENTIALS, already set for gitlab-org/gitlab-ce. 
50+ Skipping NPM_INSTALL_TOKEN, already set for gitlab-org/gitlab-ce. 
51+ Completed setting variables on Gitlab CI. 
4652` ` ` 
4753
48- If your working directory is a git repostory of your project, the `--url` option can be omitted, i.e  :
54+ If your working directory is a git repostory of your project, the `--url` option can be omitted, e.g  :
4955
5056` ` ` sh
5157$ setAllVars --token <gitlab-token> 
58+ No URL specified, using git remote `  origin`. 
59+ Set AWS_CREDENTIALS = <value> for gitlab-org/gitlab-ce. 
60+ Set NPM_INSTALL_TOKEN = <value> for gitlab-org/gitlab-ce. 
61+ Completed setting variables on Gitlab CI. 
5262``` 
5363
5464>  Omitting ` --url `  will derive the URL from the remote named ` origin ` .
65+ 
66+ This project supports ` .gitlabrc `  files using [ rc] ( https://www.npmjs.com/package/rc ) .
67+ If ` --token `  is not specified, this project can use a ` .gitlabrc ` , e.g:
68+ 
69+ ``` ini 
70+ token  = this-is-my-gitlab-token
71+ ``` 
72+ 
73+ ``` sh 
74+ $ setAllVars --url < gitlab-project-url> 
75+ Using token from .gitlabrc.
76+ Set AWS_CREDENTIALS = < value>  for  gitlab-org/gitlab-ce.
77+ Set NPM_INSTALL_TOKEN = < value>  for  gitlab-org/gitlab-ce.
78+ Completed setting variables on Gitlab CI.
79+ ``` 
80+ 
81+ Essentially, if your project is a git repository, and you have ` .gitlabrc `  file,
82+ no options are required and this tool can be invoked simply as:
83+ 
84+ ``` sh 
85+ $ setAllVars
86+ No URL specified, using git remote ` origin` 
87+ Set AWS_CREDENTIALS = < value>  for  gitlab-org/gitlab-ce.
88+ Set NPM_INSTALL_TOKEN = < value>  for  gitlab-org/gitlab-ce.
89+ Completed setting variables on Gitlab CI.
90+ ``` 
0 commit comments