You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you for the great plugin.
I am evaluating the versioning plugin and managed to find a way to produce version infos the way we use it. This is working fine with local builds where git is available for information retrieval, but lacks on Gitlab runners.
Local working:
default branch master -> master-SNAPSHOT
branch release/1.0 -> 1.0.0-SNAPSHOT
tag 1.0.0 -> 1.0.0
branch release/1.0 -> 1.0.1-SNAPSHOT
on Gitlab I get HEAD-SNAPSHOT by default. By setting up an environment in .gitlab-ci.yml like export GIT_BRANCH=$CI_COMMIT_REF_NAME;
and using the environment variable GIT_BRANCH in
versioning {
branchEnv = ['GIT_BRANCH']
...
}
I get: master-SNAPSHOT and 1.0.0-SNAPSHOT as expected.
Tags however are not avaliable through environment variables or do I miss something? I can provide the TAG from the CI variable $CI_GIT_TAG, but to what environment variable? Any help is appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
thank you for the great plugin.
I am evaluating the versioning plugin and managed to find a way to produce version infos the way we use it. This is working fine with local builds where git is available for information retrieval, but lacks on Gitlab runners.
Local working:
default branch master -> master-SNAPSHOT
branch release/1.0 -> 1.0.0-SNAPSHOT
tag 1.0.0 -> 1.0.0
branch release/1.0 -> 1.0.1-SNAPSHOT
on Gitlab I get HEAD-SNAPSHOT by default. By setting up an environment in .gitlab-ci.yml like
export GIT_BRANCH=$CI_COMMIT_REF_NAME;
and using the environment variable GIT_BRANCH in
I get: master-SNAPSHOT and 1.0.0-SNAPSHOT as expected.
Tags however are not avaliable through environment variables or do I miss something? I can provide the TAG from the CI variable $CI_GIT_TAG, but to what environment variable? Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions