Can you have pipeline activity (pipelines triggered and currently running) in project_A's Gitlab CI if you don't have any .yml file defined on the "master" or 'default' branch?
".gitlab-ci.yml" file allows you to define project-CI-wide variables, available for all the jobs without the need of inheritance those via "extends" keyword.
In order to pass variables between the "before_script" and "script" parts of the same job you have to include the variables within the "variables" keyword section and not just simply have a line in the script section such as "VARIABLE_A='value'".