Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
20d23e4
add experiments as composite actions
jprinet Mar 11, 2022
02ebe59
Add parameters description
jprinet Mar 14, 2022
905a72c
Add project directory variable
jprinet Mar 17, 2022
10e3bf2
Add Composite Experiment 5
jprinet Mar 22, 2022
2dfb479
Set GITHUB_TOKEN to curl command
jprinet Mar 23, 2022
d381ba5
Add Cache inputs to composite Experiment 5
jprinet Mar 23, 2022
1a140c6
Remove experiment 5
jprinet Apr 5, 2022
b940106
Add both build scan identifiers as output
jprinet Apr 5, 2022
5314bbd
Formatting and comments
jprinet Apr 5, 2022
d015559
Merge branch 'gradle:main' into feature/expe_as_composite_actions
jprinet Apr 5, 2022
2dfc534
CR follow-up: change directory structure
jprinet Apr 19, 2022
f60a8dd
CR follow-up: align script and GH action parameters
jprinet Apr 19, 2022
d062c51
CR follow-up: remove build scan ids as composite output
jprinet Apr 19, 2022
d84c36c
CR follow-up: Set Github token as optional input
jprinet Apr 20, 2022
8ace879
Polish readme a bit
etiennestuder Apr 22, 2022
4e9927c
Polish comments a bit
etiennestuder Apr 22, 2022
5fd4a98
Polish action descriptions a bit
etiennestuder Apr 22, 2022
a1891e0
Streamline action inputs' description and ordering
etiennestuder Apr 22, 2022
c8dc067
Treat tasks inputs as optional
etiennestuder Apr 22, 2022
702435f
Rename actions
etiennestuder Apr 22, 2022
13a4967
CR follow-up: Align experiments 2 and 3 with experiment 1
jprinet Apr 22, 2022
0e24e7a
Merge remote-tracking branch 'jprinet/feature/expe_as_composite_actio…
etiennestuder Apr 24, 2022
131a9ee
Polish
etiennestuder Apr 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CR follow-up: Align experiments 2 and 3 with experiment 1
Signed-off-by: Jerome Prinet <[email protected]>
  • Loading branch information
jprinet committed Apr 22, 2022
commit 13a49677ce46a99a3539c8a9516068589ada16f6
72 changes: 43 additions & 29 deletions .github/actions/gradle/exp2/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,30 @@ name: Run experiment 2
description: "Runs experiment 2 of the build validation scripts for Gradle"

inputs:
repositoryUrl:
description: "Project repository URL"
required: true
branch:
description: "Git Branch"
required: true
task:
description: "Gradle task"
gitRepo:
description: "The URL for the Git repository to validate"
required: true
gitBranch:
description: "The branch for the Git repository to validate"
required: false
gitCommitId:
description: "The Git commit id for the Git repository to validate"
required: false
projectDir:
description: "Project directory"
description: "The build invocation directory within the Git repository"
required: false
tasks:
description: "The Gradle tasks to invoke"
required: false
args:
description: "Additional arguments to pass to Gradle"
required: false
default: .
gradleEnterpriseUrl:
description: "Gradle Enterprise URL"
required: true
outputs:
buildScanId1:
description: "First build scan identifier"
value: ${{ steps.run.outputs.buildScanId1 }}
buildScanId2:
description: "Second build scan identifier"
value: ${{ steps.run.outputs.buildScanId2 }}
description: "The URL for the Gradle Enterprise server to connect to"
required: false
enableGradleEnterprise:
description: "Enables Gradle Enterprise on a project not already connected"
required: false

runs:
using: "composite"
Expand All @@ -34,16 +35,29 @@ runs:
run: |
cd gradle-enterprise-gradle-build-validation

# add instructions to save build scan urls
BUILD_SCAN_FILE_1=$(pwd)/exp2-build-scan-url-1.txt
BUILD_SCAN_FILE_2=$(pwd)/exp2-build-scan-url-2.txt
echo "echo \${build_scan_urls[0]} > ${BUILD_SCAN_FILE_1}" >> 02-validate-local-build-caching-same-location.sh
echo "echo \${build_scan_urls[1]} > ${BUILD_SCAN_FILE_2}" >> 02-validate-local-build-caching-same-location.sh
EXTRA_ARGS=""
if [ ! -z "${{ inputs.gitBranch }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -b ${{ inputs.gitBranch }}"
fi
if [ ! -z "${{ inputs.gitCommitId }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -c ${{ inputs.gitCommitId }}"
fi
if [ ! -z "${{ inputs.projectDir }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -p ${{ inputs.projectDir }}"
fi
if [ ! -z "${{ inputs.tasks }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -t ${{ inputs.tasks }}"
fi
if [ ! -z "${{ inputs.args }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -a ${{ inputs.args }}"
fi
if [ ! -z "${{ inputs.gradleEnterpriseUrl }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -s ${{ inputs.gradleEnterpriseUrl }}"
fi
if [ ! -z "${{ inputs.enableGradleEnterprise }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -e"
fi

# run experiment
./02-validate-local-build-caching-same-location.sh -r ${{ inputs.repositoryUrl }} -b ${{ inputs.branch }} -t ${{ inputs.task }} -p ${{ inputs.projectDir }} -s ${{ inputs.gradleEnterpriseUrl }}

# set scan url as output
echo "::set-output name=buildScanId1::$(cat ${BUILD_SCAN_FILE_1} | sed 's:.*/::')"
echo "::set-output name=buildScanId2::$(cat ${BUILD_SCAN_FILE_2} | sed 's:.*/::')"
./02-validate-local-build-caching-same-location.sh -r ${{ inputs.gitRepo }} $EXTRA_ARGS
shell: bash
72 changes: 43 additions & 29 deletions .github/actions/gradle/exp3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,30 @@ name: Run experiment 3
description: "Runs experiment 3 of the build validation scripts for Gradle"

inputs:
repositoryUrl:
description: "Project repository URL"
required: true
branch:
description: "Git Branch"
required: true
task:
description: "Gradle task"
gitRepo:
description: "The URL for the Git repository to validate"
required: true
gitBranch:
description: "The branch for the Git repository to validate"
required: false
gitCommitId:
description: "The Git commit id for the Git repository to validate"
required: false
projectDir:
description: "Project directory"
description: "The build invocation directory within the Git repository"
required: false
tasks:
description: "The Gradle tasks to invoke"
required: false
args:
description: "Additional arguments to pass to Gradle"
required: false
default: .
gradleEnterpriseUrl:
description: "Gradle Enterprise URL"
required: true
outputs:
buildScanId1:
description: "First build scan identifier"
value: ${{ steps.run.outputs.buildScanId1 }}
buildScanId2:
description: "Second build scan identifier"
value: ${{ steps.run.outputs.buildScanId2 }}
description: "The URL for the Gradle Enterprise server to connect to"
required: false
enableGradleEnterprise:
description: "Enables Gradle Enterprise on a project not already connected"
required: false

runs:
using: "composite"
Expand All @@ -34,16 +35,29 @@ runs:
run: |
cd gradle-enterprise-gradle-build-validation

# add instructions to save build scan urls
BUILD_SCAN_FILE_1=$(pwd)/exp3-build-scan-url-1.txt
BUILD_SCAN_FILE_2=$(pwd)/exp3-build-scan-url-2.txt
echo "echo \${build_scan_urls[0]} > ${BUILD_SCAN_FILE_1}" >> 03-validate-local-build-caching-different-locations.sh
echo "echo \${build_scan_urls[1]} > ${BUILD_SCAN_FILE_2}" >> 03-validate-local-build-caching-different-locations.sh
EXTRA_ARGS=""
if [ ! -z "${{ inputs.gitBranch }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -b ${{ inputs.gitBranch }}"
fi
if [ ! -z "${{ inputs.gitCommitId }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -c ${{ inputs.gitCommitId }}"
fi
if [ ! -z "${{ inputs.projectDir }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -p ${{ inputs.projectDir }}"
fi
if [ ! -z "${{ inputs.tasks }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -t ${{ inputs.tasks }}"
fi
if [ ! -z "${{ inputs.args }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -a ${{ inputs.args }}"
fi
if [ ! -z "${{ inputs.gradleEnterpriseUrl }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -s ${{ inputs.gradleEnterpriseUrl }}"
fi
if [ ! -z "${{ inputs.enableGradleEnterprise }}" ]; then
EXTRA_ARGS="$EXTRA_ARGS -e"
fi

# run experiment
./03-validate-local-build-caching-different-locations.sh -r ${{ inputs.repositoryUrl }} -b ${{ inputs.branch }} -t ${{ inputs.task }} -p ${{ inputs.projectDir }} -s ${{ inputs.gradleEnterpriseUrl }}

# set scan url as output
echo "::set-output name=buildScanId1::$(cat ${BUILD_SCAN_FILE_1} | sed 's:.*/::')"
echo "::set-output name=buildScanId2::$(cat ${BUILD_SCAN_FILE_2} | sed 's:.*/::')"
./03-validate-local-build-caching-different-locations.sh -r ${{ inputs.gitRepo }} $EXTRA_ARGS
shell: bash