diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa684431753b36dc1f27128e85b6b6971d0cbcf1..63607e56e7170adf74ce860b788f98ea6fbe1e9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,37 @@ # Virtual Reality & Immersive Visualisation Group. #------------------------------------------------------------------------------- +spec: + inputs: + unreal_version: + description: The Unreal Engine version in the form of "major.minor" + type: string + regex: \d+\.\d+ + default: "5.4" + build_type: + description: The game build type. + type: string + options: ["DebugGame", "Shipping"] + default: "DebugGame" + number_of_old_versions: + description: How many successful pipeline builds of this branch should be stored on the cluster. + type: number + default: 3 + custom_ndisplay_config: + description: Custom nDisplay config stored on the cluster filesystem. + type: string + default: "" + run_windows_jobs: + description: "Whether or not the windows jobs should be added to the pipeline. + Yes - always run + No - never run + Manual - add jobs to the pipeline but only run when manually started." + type: string + options: ["Yes", "No", "Manual"] + default: "Yes" + +--- + #The include file can be change to either be removed or reference a specific commit. #Reference the Gitlab CI website for this @@ -26,8 +57,10 @@ include: variables: - UNREAL_VERSION: "5.4" - + UNREAL_VERSION: $[[ inputs.unreal_version ]] + NUMBER_OF_OLD_VERSIONS: $[[ inputs.number_of_old_versions ]] + CUSTOM_NDISPLAY_CONFIG: $[[ inputs.custom_ndisplay_config ]] + BUILD_WINDOWS_CONDITION: $[[ inputs.run_windows_jobs ]] stages: - build @@ -35,15 +68,22 @@ stages: Build_Windows: rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" + - if: $BUILD_WINDOWS_CONDITION == "No" + when: never + - if: $BUILD_WINDOWS_CONDITION == "Manual" && $CI_PIPELINE_SOURCE == "web" + when: manual + - if: $BUILD_WINDOWS_CONDITION == "Manual" && $CI_PIPELINE_SOURCE == "schedule" + when: manual + - if: $BUILD_WINDOWS_CONDITION == "Yes" && $CI_PIPELINE_SOURCE == "web" + - if: $BUILD_WINDOWS_CONDITION == "Yes" && $CI_PIPELINE_SOURCE == "schedule" extends: .Build_Windows_ tags: - windows - unreal variables: # CLIENT_CONFIG: "Shipping" - CLIENT_CONFIG: "DebugGame" + # CLIENT_CONFIG: "DebugGame" + CLIENT_CONFIG: $[[ inputs.build_type ]] Build_Linux: rules: @@ -56,16 +96,8 @@ Build_Linux: - docker-executor variables: # CLIENT_CONFIG: "Shipping" - CLIENT_CONFIG: "DebugGame" - -.Deploy_Windows: - rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - extends: .Deploy_VRDev_ - needs: - - job: "Build_Windows" - artifacts: true + # CLIENT_CONFIG: "DebugGame" + CLIENT_CONFIG: $[[ inputs.build_type ]] # Deploys to vrdemo instead of av006de. Use extends: .Deploy_CAVE_ to deploy to legacy av006de Deploy_CAVE: