Verified Commit 9984985e authored by Sebastian Höffner's avatar Sebastian Höffner
Browse files

Package only master, add zip to artifacts for downstream jobs

parent d473cecd
Pipeline #132189 failed with stages
in 4 minutes and 56 seconds
stages:
- build_and_test
- package
- deploy
- notify
......@@ -99,29 +100,42 @@ build-WebGL:
variables:
BUILD_TARGET: WebGL
zip:
image: debian:bullseye-slim
stage: package
script:
- pushd $UNITY_DIR/Builds/WebGL
- 'zip -r "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}.zip" "${BUILD_NAME}"'
- popd
artifacts:
paths:
- $UNITY_DIR/Builds/WebGL/${BUILD_NAME}.zip
upload_package:
image: curlimages/curl:latest
stage: deploy
script:
- export PACKAGE_VERSION=$(grep "bundleVersion:" ProjectSettings/ProjectSettings.asset | cut -d':' -f 2 | xargs echo -n)
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}.zip" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${BUILD_NAME}/${PACKAGE_VERSION}/${BUILD_NAME}.zip"'
only:
- master
pages:
image: alpine:latest
stage: deploy
script:
- mv "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}" public
- cp -r "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}" public
- cp "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}.zip" public
artifacts:
paths:
- public
only:
- master
package:
image: debian:bullseye-slim
stage: deploy
trigger_build:
stage: notify
script:
- apt-get update && apt-get install -y zip curl
- export PACKAGE_VERSION=$(grep "bundleVersion:" ProjectSettings/ProjectSettings.asset | cut -d':' -f 2 | xargs echo -n)
- pushd $UNITY_DIR/Builds/WebGL
- 'zip -r "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}.zip" "${BUILD_NAME}"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file "$UNITY_DIR/Builds/WebGL/${BUILD_NAME}.zip" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${BUILD_NAME}/${PACKAGE_VERSION}/${BUILD_NAME}.zip"'
- popd
only:
- master
- curl -X POST -F token=${TRIGGER_TOKEN_DLU} -F ref=${CI_COMMIT_BRANCH} -F "variables[REMOTE_JOB_ID]=${CI_JOB_ID}" -F "variables[REMOTE_FILENAME]=${BUILD_NAME}.zip" ${CI_API_V4_URL}/projects/20800/trigger/pipeline
workflow:
rules:
......@@ -130,9 +144,3 @@ workflow:
- if: $CI_COMMIT_TAG
when: never
- when: always
trigger_build:
stage: notify
script:
- export PACKAGE_VERSION=$(grep "bundleVersion:" ProjectSettings/ProjectSettings.asset | cut -d':' -f 2 | xargs echo -n)
- 'curl -X POST -F token=${TRIGGER_TOKEN_DLU} -F ref=master -F variables[PACKAGE_VERSION]=${PACKAGE_VERSION} https://gitlab.informatik.uni-bremen.de/api/v4/projects/20800/trigger/pipeline'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment