Skip to content

Commit

Permalink
Add input parameter to experiment actions for enabling debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbertrand committed May 2, 2024
1 parent f4180da commit 5903b7b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/actions/gradle/experiment-1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ inputs:
enableGradleEnterprise:
description: "Enables Gradle Enterprise on a project not already connected"
required: false
debug:
description: "Enable debug logging for this experiment of the build validation scripts"
required: false
outputs:
buildScanFirstBuild:
description: "First build scan url"
Expand Down Expand Up @@ -80,6 +83,10 @@ runs:
if [ "${{ inputs.enableGradleEnterprise }}" == "true" ]; then
ARG_GE_ENABLE="${{ inputs.enableGradleEnterprise }}"
fi
ARG_DEBUG=""
if [ "${{ inputs.debug }}" == "true" ]; then
ARG_DEBUG="${{ inputs.debug }}"
fi
# Navigate into the folder containing the validation scripts
cd gradle-enterprise-gradle-build-validation
Expand All @@ -94,7 +101,8 @@ runs:
${ARG_TASKS:+"-t" "$ARG_TASKS"} \
${ARG_ARGS:+"-a" "$ARG_ARGS"} \
${ARG_GE_URL:+"-s" "$ARG_GE_URL"} \
${ARG_GE_ENABLE:+"-e"}
${ARG_GE_ENABLE:+"-e"} \
${ARG_DEBUG:+"--debug"}
# Set the Build Scan urls as outputs
RECEIPT_FILE=".data/01-validate-incremental-building/latest/exp1-*.receipt"
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/gradle/experiment-2/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
failIfNotFullyCacheable:
description: "Terminates with exit code 3 if the build is not fully cacheable"
required: false
debug:
description: "Enable debug logging for this experiment of the build validation scripts"
required: false
outputs:
buildScanFirstBuild:
description: "First build scan url"
Expand Down Expand Up @@ -87,6 +90,10 @@ runs:
if [ "${{ inputs.failIfNotFullyCacheable }}" == "true" ]; then
ARG_FAIL_IF_NOT_FULLY_CACHEABLE="${{ inputs.failIfNotFullyCacheable }}"
fi
ARG_DEBUG=""
if [ "${{ inputs.debug }}" == "true" ]; then
ARG_DEBUG="${{ inputs.debug }}"
fi
# Navigate into the folder containing the validation scripts
cd gradle-enterprise-gradle-build-validation
Expand All @@ -102,7 +109,8 @@ runs:
${ARG_ARGS:+"-a" "$ARG_ARGS"} \
${ARG_GE_URL:+"-s" "$ARG_GE_URL"} \
${ARG_GE_ENABLE:+"-e"} \
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"}
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \
${ARG_DEBUG:+"--debug"}
# Set the Build Scan urls as outputs
RECEIPT_FILE=".data/02-validate-local-build-caching-same-location/latest/exp2-*.receipt"
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/gradle/experiment-3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
failIfNotFullyCacheable:
description: "Terminates with exit code 3 if the build is not fully cacheable"
required: false
debug:
description: "Enable debug logging for this experiment of the build validation scripts"
required: false
outputs:
buildScanFirstBuild:
description: "First build scan url"
Expand Down Expand Up @@ -87,6 +90,10 @@ runs:
if [ "${{ inputs.failIfNotFullyCacheable }}" == "true" ]; then
ARG_FAIL_IF_NOT_FULLY_CACHEABLE="${{ inputs.failIfNotFullyCacheable }}"
fi
ARG_DEBUG=""
if [ "${{ inputs.debug }}" == "true" ]; then
ARG_DEBUG="${{ inputs.debug }}"
fi
# Navigate into the folder containing the validation scripts
cd gradle-enterprise-gradle-build-validation
Expand All @@ -102,7 +109,8 @@ runs:
${ARG_ARGS:+"-a" "$ARG_ARGS"} \
${ARG_GE_URL:+"-s" "$ARG_GE_URL"} \
${ARG_GE_ENABLE:+"-e"} \
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"}
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \
${ARG_DEBUG:+"--debug"}
# Set the Build Scan urls as outputs
RECEIPT_FILE=".data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt"
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/maven/experiment-1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
failIfNotFullyCacheable:
description: "Terminates with exit code 3 if the build is not fully cacheable"
required: false
debug:
description: "Enable debug logging for this experiment of the build validation scripts"
required: false
outputs:
buildScanFirstBuild:
description: "First build scan url"
Expand Down Expand Up @@ -87,6 +90,10 @@ runs:
if [ "${{ inputs.failIfNotFullyCacheable }}" == "true" ]; then
ARG_FAIL_IF_NOT_FULLY_CACHEABLE="${{ inputs.failIfNotFullyCacheable }}"
fi
ARG_DEBUG=""
if [ "${{ inputs.debug }}" == "true" ]; then
ARG_DEBUG="${{ inputs.debug }}"
fi
# Navigate into the folder containing the validation scripts
cd gradle-enterprise-maven-build-validation
Expand All @@ -102,7 +109,8 @@ runs:
${ARG_ARGS:+"-a" "$ARG_ARGS"} \
${ARG_GE_URL:+"-s" "$ARG_GE_URL"} \
${ARG_GE_ENABLE:+"-e"} \
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"}
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \
${ARG_DEBUG:+"--debug"}
# Set the Build Scan urls as outputs
RECEIPT_FILE=".data/01-validate-local-build-caching-same-location/latest/exp1-*.receipt"
Expand Down
10 changes: 9 additions & 1 deletion .github/actions/maven/experiment-2/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
failIfNotFullyCacheable:
description: "Terminates with exit code 3 if the build is not fully cacheable"
required: false
debug:
description: "Enable debug logging for this experiment of the build validation scripts"
required: false
outputs:
buildScanFirstBuild:
description: "First build scan url"
Expand Down Expand Up @@ -87,6 +90,10 @@ runs:
if [ "${{ inputs.failIfNotFullyCacheable }}" == "true" ]; then
ARG_FAIL_IF_NOT_FULLY_CACHEABLE="${{ inputs.failIfNotFullyCacheable }}"
fi
ARG_DEBUG=""
if [ "${{ inputs.debug }}" == "true" ]; then
ARG_DEBUG="${{ inputs.debug }}"
fi
# Navigate into the folder containing the validation scripts
cd gradle-enterprise-maven-build-validation
Expand All @@ -102,7 +109,8 @@ runs:
${ARG_ARGS:+"-a" "$ARG_ARGS"} \
${ARG_GE_URL:+"-s" "$ARG_GE_URL"} \
${ARG_GE_ENABLE:+"-e"} \
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"}
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \
${ARG_DEBUG:+"--debug"}
# Set the Build Scan urls as outputs
RECEIPT_FILE=".data/02-validate-local-build-caching-different-locations/latest/exp2-*.receipt"
Expand Down

0 comments on commit 5903b7b

Please sign in to comment.