Loading templates/dotnet-build.yml +8 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ spec: # project found in the repository root. solution_path: default: "" # Set to "true" to enable the build job. Off by default: enable it on # demand when build output is actually needed. build_enabled: default: false # Set to "true" to enable the test job. tests_enabled: default: false Loading Loading @@ -70,6 +74,7 @@ variables: DOTNET_VERSION: "$[[ inputs.dotnet_version ]]" BUILD_CONFIGURATION: "$[[ inputs.configuration ]]" BUILD_SOLUTION: "$[[ inputs.solution_path ]]" BUILD_ENABLED: "$[[ inputs.build_enabled ]]" RUN_TESTS: "$[[ inputs.tests_enabled ]]" ENABLE_PUBLISH: "$[[ inputs.publish_enabled ]]" PUBLISH_OUTPUT: "$[[ inputs.publish_output ]]" Loading @@ -94,12 +99,13 @@ dotnet-build: - if [ -z "$DOTNET_BUILD_ARGS" ]; then echo "No solution/project specified, skipping build." && exit 0; fi - dotnet build "$DOTNET_BUILD_ARGS" -p:Configuration="$BUILD_CONFIGURATION" artifacts: paths: - "**/bin/$BUILD_CONFIGURATION/**" paths: $[[ inputs.build_artifact_paths ]] exclude: - "**/obj/**" expire_in: 7 days rules: - if: '$BUILD_ENABLED != "true"' when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS when: never Loading Loading
templates/dotnet-build.yml +8 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,10 @@ spec: # project found in the repository root. solution_path: default: "" # Set to "true" to enable the build job. Off by default: enable it on # demand when build output is actually needed. build_enabled: default: false # Set to "true" to enable the test job. tests_enabled: default: false Loading Loading @@ -70,6 +74,7 @@ variables: DOTNET_VERSION: "$[[ inputs.dotnet_version ]]" BUILD_CONFIGURATION: "$[[ inputs.configuration ]]" BUILD_SOLUTION: "$[[ inputs.solution_path ]]" BUILD_ENABLED: "$[[ inputs.build_enabled ]]" RUN_TESTS: "$[[ inputs.tests_enabled ]]" ENABLE_PUBLISH: "$[[ inputs.publish_enabled ]]" PUBLISH_OUTPUT: "$[[ inputs.publish_output ]]" Loading @@ -94,12 +99,13 @@ dotnet-build: - if [ -z "$DOTNET_BUILD_ARGS" ]; then echo "No solution/project specified, skipping build." && exit 0; fi - dotnet build "$DOTNET_BUILD_ARGS" -p:Configuration="$BUILD_CONFIGURATION" artifacts: paths: - "**/bin/$BUILD_CONFIGURATION/**" paths: $[[ inputs.build_artifact_paths ]] exclude: - "**/obj/**" expire_in: 7 days rules: - if: '$BUILD_ENABLED != "true"' when: never - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS when: never Loading