Select Git revision
shared_scripts.yml
shared_scripts.yml 10.94 KiB
#-------------------------------------------------------------------------------
# Copyright (c) 2022 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
variables:
GIT_STRATEGY: none # we disable fetch, clone or checkout for every job
GIT_CHECKOUT: "false" # as we only want to checkout and fetch in the preperation stage
GIT_SUBMODULE_STRATEGY: "recursive"
GIT_CLEAN_FLAGS: none
GIT_DEPTH: "1"
NUMBER_OF_OLD_VERSIONS: 3 # number of old revisions to keep after the deploy
CLUSTER_ADDRESS: "ngm01.hpc.itc.rwth-aachen.de" # Needs to be ngm01 as all other nodes require MFA
SHARED_META_URL: "https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/unreal-ci/-/raw/master/shared.meta"
UNREAL_VERSION: "5.3"
CUSTOM_NDISPLAY_CONFIG: ""
##################################Generate Project##################################
.Generate_Project_:
stage: generate
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
tags:
- linux
- docker-executor
image:
name: registry.git-ce.rwth-aachen.de/vr-vis/vr-group/alpine-ci-container/alpine-ci:latest
variables:
GEN_TEMPLATE_REPO: "https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/unrealprojecttemplate.git"
GEN_TEMPLATE_BRANCH: "$UNREAL_VERSION"
GEN_DEPENDENCIES: "()"
RUN_SETUP: "true"
script:
- find ${CI_PROJECT_DIR} -mindepth 1 -delete
- declare -A dependencies=$GEN_DEPENDENCIES
- git clone -b "${GEN_TEMPLATE_BRANCH}" --depth 1 --single-branch --recursive ${GEN_TEMPLATE_REPO} ${CI_PROJECT_DIR}
- if [[ "${RUN_SETUP}" == "true" ]] ; then
- bash ${CI_PROJECT_DIR}/setup.sh --install-default-plugins
- fi
- git submodule add https://gitlab-ci-token:${CI_JOB_TOKEN}@git-ce.rwth-aachen.de/${CI_PROJECT_PATH}.git/ Plugins/${CI_PROJECT_NAME}
- cd ${CI_PROJECT_DIR}/Plugins/${CI_PROJECT_NAME}
- if [[ $CI_PIPELINE_SOURCE == "merge_request_event" ]] ; then
- git fetch origin $CI_MERGE_REQUEST_REF_PATH
- fi
- git checkout ${CI_COMMIT_SHA}
- cd ${CI_PROJECT_DIR}
- for i in "${!dependencies[@]}"; do
- git submodule add -b "${i%%@*}" ${dependencies[$i]} Plugins/${i#*@}
- done
- git remote rm origin && git -c user.name='project-generation-bot' -c user.email='support@vr.rwth-aachen.de' commit -am "Generated Project"
artifacts:
name: "Generated_Project_${CI_PROJECT_NAME}"
paths: ["*"]
expire_in: 3 days
when: always
##################################Win64##################################
.Build_Windows_:
stage: build
variables:
GIT_STRATEGY: clone
GIT_CHECKOUT: "true"
CLIENT_CONFIG: "Shipping"
EXTRA_ARGS: ""
tags:
- windows