@@ -2,22 +2,31 @@ name: Run experiment 1
2
2
description : " Run Gradle Experiment 1"
3
3
4
4
inputs :
5
- repositoryUrl :
6
- description : " Project repository URL"
5
+ gitRepo :
6
+ description : " Git repository URL"
7
7
required : true
8
- branch :
9
- description : " Git Branch"
10
- required : true
11
- task :
12
- description : " Gradle task"
8
+ tasks :
9
+ description : " Gradle tasks"
13
10
required : true
11
+ gitBranch :
12
+ description : " Git Branch"
13
+ required : false
14
+ gitCommitId :
15
+ description : " Git Commit"
16
+ required : false
14
17
projectDir :
15
18
description : " Project directory"
16
19
required : false
17
- default : .
20
+ args :
21
+ description : " Gradle additional arguments"
22
+ required : false
18
23
gradleEnterpriseUrl :
19
24
description : " Gradle Enterprise URL"
20
- required : true
25
+ required : false
26
+ enableGradleEnterprise :
27
+ description : " Enables Gradle Enterprise on a project not already connected"
28
+ required : false
29
+
21
30
outputs :
22
31
buildScanId1 :
23
32
description : " First build scan identifier"
40
49
echo "echo \${build_scan_urls[0]} > ${BUILD_SCAN_FILE_1}" >> 01-validate-incremental-building.sh
41
50
echo "echo \${build_scan_urls[1]} > ${BUILD_SCAN_FILE_2}" >> 01-validate-incremental-building.sh
42
51
52
+ EXTRA_ARGS=""
53
+ if [ ! -z "${{ inputs.gitBranch }}" ]; then
54
+ EXTRA_ARGS="$EXTRA_ARGS -b ${{ inputs.gitBranch }}"
55
+ fi
56
+ if [ ! -z "${{ inputs.gitCommitId }}" ]; then
57
+ EXTRA_ARGS="$EXTRA_ARGS -c ${{ inputs.gitCommitId }}"
58
+ fi
59
+ if [ ! -z "${{ inputs.projectDir }}" ]; then
60
+ EXTRA_ARGS="$EXTRA_ARGS -p ${{ inputs.projectDir }}"
61
+ fi
62
+ if [ ! -z "${{ inputs.args }}" ]; then
63
+ EXTRA_ARGS="$EXTRA_ARGS -a ${{ inputs.args }}"
64
+ fi
65
+ if [ ! -z "${{ inputs.gradleEnterpriseUrl }}" ]; then
66
+ EXTRA_ARGS="$EXTRA_ARGS -s ${{ inputs.gradleEnterpriseUrl }}"
67
+ fi
68
+ if [ ! -z "${{ inputs.enableGradleEnterprise }}" ]; then
69
+ EXTRA_ARGS="$EXTRA_ARGS -e"
70
+ fi
71
+
43
72
# run experiment
44
- ./01-validate-incremental-building.sh -r ${{ inputs.repositoryUrl }} -b ${{ inputs.branch }} - t ${{ inputs.task }} -p ${{ inputs.projectDir }} -s ${{ inputs.gradleEnterpriseUrl }}
73
+ ./01-validate-incremental-building.sh -r ${{ inputs.gitRepo }} -t ${{ inputs.tasks }} $EXTRA_ARGS
45
74
46
75
# set scan url as output
47
76
echo "::set-output name=buildScanId1::$(cat ${BUILD_SCAN_FILE_1} | sed 's:.*/::')"
0 commit comments