Following the documentation you provided, theses variables are only available for pre-pipelines.
To be able to use it, you need to have your stage for this job defined as ".pre".