I have a project in our gitlab, where there is a file in the /apps/app/config/version.yml with the version tag from gitlab is. Is there a way to use this file which looks like this:
parameters:
version: v3.1.5
in the Version section from the rpm, so these two are the same? Or if it could be obtained by doing a git describe --tags in the spec file...
Short answer: no.
The rpmbuild parser usually uses the name-version as part of the path where the source archive (with the file that holds the version) is to be unpacked, creating a chicken <-> egg problem to determine the version from a file in the archive.