Commit 0b646982 authored by shRabbit's avatar shRabbit
Browse files

Add configurable artifact paths (empty array disables artifact upload)

parent 3052f281
Loading
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -44,6 +44,22 @@ spec:
    # (defaults to linux-x64 when empty) and installs the AOT toolchain.
    aot_enabled:
      default: false
    # Build output to keep as artifacts. Set to [] to skip artifact upload and
    # save storage on the GitLab server.
    build_artifact_paths:
      type: array
      default:
        - "**/bin/$BUILD_CONFIGURATION/**"
    # Test output (JUnit XML) to keep as artifacts. Set to [] to disable.
    test_artifact_paths:
      type: array
      default:
        - "**/TestResults/**"
    # Publish output to keep as artifacts. Set to [] to disable.
    publish_artifact_paths:
      type: array
      default:
        - "$PUBLISH_OUTPUT/**"
    # Pipeline stage all the generated jobs run in.
    stage:
      default: build
@@ -128,8 +144,7 @@ dotnet-publish:
    - if [ -n "$PUBLISH_RUNTIME" ]; then PUBLISH_EXTRA="$PUBLISH_EXTRA -r $PUBLISH_RUNTIME"; fi
    - dotnet publish "$DOTNET_PUBLISH_ARGS" -p:Configuration="$BUILD_CONFIGURATION" $PUBLISH_EXTRA --output "$PUBLISH_OUTPUT"
  artifacts:
    paths:
      - "$PUBLISH_OUTPUT/**"
    paths: $[[ inputs.publish_artifact_paths ]]
    expire_in: 30 days
  rules:
    - if: '$ENABLE_PUBLISH != "true"'