Hey guys,
I want to display build information like branch name, build id and so on onto my website.
I tried it in different ways.
First I tried to use sed:
sed -i -- 's/ref/$CI_BUILD_REF_NAME $CI_BUILD_REF/g' src/app/authentication/login.component.html
In the second part I tried to use echo:
"echo 'export const version = {CI_BUILD_REF_NAME: $CI_BUILD_REF_NAME, CI_BUILD_ID:$CI_BUILD_ID,CI_ENVIRONMENT_NAME: $CI_ENVIRONMENT_NAME,CI_BUILD_TAG:$CI_BUILD_TAG };' > src/version.ts"
But in both ways it seems the variables don’t get replaced.
Anyone have suggestions for this ?