• Laura Montemayor's avatar
    Add CI_MERGE_REQUEST_DESCRIPTION env variable · b6691f15
    Laura Montemayor authored
    Merge requests contain their own description which is comparable to a
    `git send-mail` cover letter.
    
    If the merge requests contains only a single commit the merge request
    description equal commit description per default. If the merge request
    contains multiple commits the description is user defined and ideally
    contains a summary of the proposed commits.
    
    For CI purposes the merge request description can contain commands
    change the CI default behaviour. This is useful to explicitly run
    special cases.
    
    The merge request description could contain a control command like the
    following:
    
    ```
    CI-config: USE_SPECIAL_CASE_Z=1
    ```
    
    The CI script can evaluate those options via the following command:
    
    ```
    echo "$CI_MERGE_REQUEST_DESCRIPTION" | grep -e "^CI-config:" \
    	cut -d ':' -f 2 | tr ' ' '\n' > extra_env
    ```
    
    This method allow to run corner cases withouth modifying nor bloating
    the git log.
    Signed-off-by: default avatarPaul Spooren <mail@aparcar.org>
    b6691f15
expose_mr_description_predefined_variable.yml 280 Bytes