gitlab supports predefined environment variables, yaml-defined variables, , secure user variables - http://doc.gitlab.com/ce/ci/variables/readme.html
how can use secure user variable part of javascript script within basic gitlab-pages site? (i.e. site isn't using ruby, node, etc., using html, css, & javascript)
for example, have start_page_user , start_page_id variables defined project. .gitlab-ci.yml exposes them via echo $start_page_user
& echo $start_page_id
, , have verified exposed in build log. how can use variables in javascript (e.g. setting username in config.js):
var config = { user: typeof $start_page_user !== 'undefined' ? start_page_user : "example user" };
project variables testing enviroment. not code! cannot access variables in code.
as documentation said:
when receiving build gitlab ci, runner prepares build environment. starts setting list of predefined variables (environment variables) , list of user-defined variables
Comments
Post a Comment