instance and clean up build job

This commit is contained in:
Cat Flynn 2021-02-01 13:30:56 +00:00
parent 2b0b48663a
commit 90d1944d6e
1 changed files with 9 additions and 2 deletions

View File

@ -4,25 +4,31 @@ stages:
variables: variables:
GIT_STRATEGY: fetch GIT_STRATEGY: fetch
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PIPELINE_ID
UNITY_VERSION: 2020.2.2f1 UNITY_VERSION: 2020.2.2f1
SRC_DIR: ./game SRC_DIR: ./game
BUILD_DIR: ./game/Build BUILD_DIR: ./game/Build
DEV_BRANCH: feature/cd DEV_BRANCH: feature/cd
PROD_BRANCH: feature/cd-2
build: build:
stage: build stage: build
variables:
# instance
GIT_CLONE_PATH: $CI_BUILDS_DIR/$RUNNER_SHORT_TOKEN/$CI_PROJECT_NAME-$CI_JOB_ID
script: script:
- echo "cloned to $GIT_CLONE_PATH" - echo "cloned to $GIT_CLONE_PATH"
- chmod +x ./ci/build.sh - chmod +x ./ci/build.sh
- ./ci/build.sh $UNITY_VERSION - ./ci/build.sh $UNITY_VERSION
after_script:
- rm -r $GIT_CLONE_PATH
artifacts: artifacts:
name: $CI_PROJECT_NAME-$CI_PIPELINE_ID name: $CI_PROJECT_NAME-$CI_PIPELINE_ID
paths: paths:
- $BUILD_DIR - $BUILD_DIR
# deploy to internal testing track
deploy-dev: deploy-dev:
stage: deploy stage: deploy
rules: rules:
@ -37,10 +43,11 @@ deploy-dev:
dependencies: dependencies:
- build - build
# deploy to production
deploy-release: deploy-release:
stage: deploy stage: deploy
rules: rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH != $DEV_BRANCH - if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $PROD_BRANCH
variables: variables:
ITCH_USER: "cyndrdev" ITCH_USER: "cyndrdev"
ITCH_GAME: "revival" ITCH_GAME: "revival"