ci/deploy: add fallback variable for GitLab

GitLab CI doesn't use GIT_COMMIT, therefore it's needed to have a fallback
to CI_COMMIT_SHA.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-03-26 07:42:45 +01:00 committed by Ondřej Budai
parent d28c41b844
commit 8f91e236f8

View file

@ -73,6 +73,9 @@ cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
# TODO: include this in the jenkins runner (and split test/target machines out)
sudo dnf -y install jq
# fallback for gitlab
GIT_COMMIT="${GIT_COMMIT:-${CI_COMMIT_SHA}}"
setup_repo osbuild-composer "${GIT_COMMIT}" 5
OSBUILD_GIT_COMMIT=$(cat Schutzfile | jq -r '.["'"${ID}-${VERSION_ID}"'"].dependencies.osbuild.commit')