First post here, and 3 days fresh into gitlab. I might not use the right terminology, please be understanding
In short, I would like to use a value from a file in my repository, as a variable to an image during ci pipeline.
reading the documentation and several bugs/requests, i could not make an understanding how is this achievable.
- /config folder contains all the properties definitions required for running home assistant.
- all these files are pushed to my gitlab repository, including a file called .HA_VERSION with contains only the version of the currently running home assistant (e.g. 0.91.2)
- i have a .gitlab-ci.yml defining the stages of the pipeline (currently only test) + the 2 jobs… and i would like to test my commits (e.g. hass --check_config) against the current version but also against the latest.
before_script: - export VERSION=`cat .HA_VERSION` - echo $VERSION stages: - test test: stage: test image: homeassistant/amd64-homeassistant:$VERSION script: - hass --script check_config -c . testlatest: stage: test image: homeassistant/amd64-homeassistant script: - hass --script check_config -c .
reading the documentation:
i understand that i cannot use inside the runner, a variable exported in the execution shell environment.
indeed, if i try to use it, the variable is not expanded.
How to solve this, so that i will not make manual changes to this file each time i upgrade to a newer version?