Adding pre export stage with creation of commit.txt including branch and commit short hash - CI launched via commit message

This commit is contained in:
YannK 2022-05-19 19:37:58 +02:00
parent 96bcbb5454
commit 267bf37046

View file

@ -1,10 +1,23 @@
image: khaganat/godot-export:4 image: khaganat/godot-export:4
stages: stages:
- pre-export
- export - export
variables: variables:
EXPORT_NAME: TPbasicgame_3dclient EXPORT_NAME: 3rd_Person_3dclient_test
commit_text:
stage: pre-export
tags:
- Docker
script:
- echo "$CI_COMMIT_BRANCH: $CI_COMMIT_SHORT_SHA" > commit.txt
artifacts:
paths: commit.txt
rules:
- if: '$CI_COMMIT_MESSAGE =~ /<debug>/'
when: always
linux64: linux64:
stage: export stage: export
@ -13,13 +26,16 @@ linux64:
script: script:
- apt-get update && apt-get install -y mesa-vulkan-drivers - apt-get update && apt-get install -y mesa-vulkan-drivers
- mkdir -v -p $EXPORT_NAME-linux64-$CI_COMMIT_SHORT_SHA - mkdir -v -p $EXPORT_NAME-linux64-$CI_COMMIT_SHORT_SHA
- godot -v --export --headless "Linux/X11" $EXPORT_NAME-$CI_COMMIT_SHORT_SHA/$EXPORT_NAME-$CI_COMMIT_SHORT_SHA.x86_64 - godot -v --export-debug --headless "Linux/X11" $EXPORT_NAME-$CI_COMMIT_SHORT_SHA/$EXPORT_NAME-$CI_COMMIT_SHORT_SHA.x86_64
artifacts: artifacts:
name: $EXPORT_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME name: $EXPORT_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME
paths: paths:
- $EXPORT_NAME-$CI_COMMIT_SHORT_SHA - $EXPORT_NAME-$CI_COMMIT_SHORT_SHA
expire_in: 1 week expire_in: 1 week
when: manual rules:
- if: '$CI_COMMIT_MESSAGE =~ /<debug>/'
when: always
windows: windows:
stage: export stage: export
@ -27,10 +43,13 @@ windows:
- Docker - Docker
script: script:
- mkdir -v -p $EXPORT_NAME-windows-$CI_COMMIT_SHORT_SHA - mkdir -v -p $EXPORT_NAME-windows-$CI_COMMIT_SHORT_SHA
- godot -v --export --headless "Windows Desktop" $EXPORT_NAME-$CI_COMMIT_SHORT_SHA/$EXPORT_NAME-$CI_COMMIT_SHORT_SHA.exe - godot -v --export-debug --headless "Windows Desktop" $EXPORT_NAME-$CI_COMMIT_SHORT_SHA/$EXPORT_NAME-$CI_COMMIT_SHORT_SHA.exe
artifacts: artifacts:
name: $EXPORT_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME name: $EXPORT_NAME-$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME
paths: paths:
- $EXPORT_NAME-$CI_COMMIT_SHORT_SHA - $EXPORT_NAME-$CI_COMMIT_SHORT_SHA
expire_in: 1 week expire_in: 1 week
when: manual rules:
- if: '$CI_COMMIT_MESSAGE =~ /<debug>/'
when: always