Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move build summary extraction logic out #487

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

sorin-florea
Copy link
Member

@sorin-florea sorin-florea commented Aug 22, 2023

This PR moves the build scan summary logic into a separate jar file that is built externally to the build validation scripts.

It also restructures the final distribution.

New Gradle scripts distribution layout:

gradle-enterprise-gradle-build-validation
├── 01-validate-incremental-building.sh
├── 02-validate-local-build-caching-same-location.sh
├── 03-validate-local-build-caching-different-locations.sh
├── 04-validate-remote-build-caching-ci-ci.sh
├── 05-validate-remote-build-caching-ci-local.sh
├── LICENSE
├── README.md
├── VERSION
├── gradle-enterprise.license
├── lib
│   ├── develocity
│   │   └── build-scan-summary-0.9-2024.1.1-20240503130149.jar
│   └── scripts
│       ├── 01-cli-parser.sh
│       ├── 02-cli-parser.sh
│       ├── 03-cli-parser.sh
│       ├── 04-cli-parser.sh
│       ├── 05-cli-parser.sh
│       ├── build-scan-offline.sh
│       ├── build-scan-online.sh
│       ├── build-scan-parse.sh
│       ├── color.sh
│       ├── config.sh
│       ├── exit-code.sh
│       ├── git.sh
│       ├── gradle-init-scripts
│       │   ├── configure-gradle-enterprise.gradle
│       │   ├── configure-local-build-caching.gradle
│       │   └── configure-remote-build-caching.gradle
│       ├── gradle.sh
│       ├── help.sh
│       ├── init.sh
│       ├── interactive-mode.sh
│       ├── java.sh
│       ├── libs.sh
│       ├── logging.sh
│       ├── maven.sh
│       ├── paths.sh
│       ├── project.sh
│       └── summary.sh
├── mapping.example
└── network.settings

New Maven scripts distribution layout:

gradle-enterprise-maven-build-validation
├── 01-validate-local-build-caching-same-location.sh
├── 02-validate-local-build-caching-different-locations.sh
├── 03-validate-remote-build-caching-ci-ci.sh
├── 04-validate-remote-build-caching-ci-local.sh
├── LICENSE
├── README.md
├── VERSION
├── gradle-enterprise.license
├── lib
│   ├── develocity
│   │   └── build-scan-summary-0.9-2024.1.1-20240503130149.jar
│   └── scripts
│       ├── 01-cli-parser.sh
│       ├── 02-cli-parser.sh
│       ├── 03-cli-parser.sh
│       ├── 04-cli-parser.sh
│       ├── build-scan-offline.sh
│       ├── build-scan-online.sh
│       ├── build-scan-parse.sh
│       ├── color.sh
│       ├── config.sh
│       ├── exit-code.sh
│       ├── git.sh
│       ├── gradle.sh
│       ├── help.sh
│       ├── init.sh
│       ├── interactive-mode.sh
│       ├── java.sh
│       ├── libs.sh
│       ├── logging.sh
│       ├── maven-libs
│       │   ├── common-custom-user-data-maven-extension-1.13.jar
│       │   ├── configure-gradle-enterprise-maven-extension-2.5.2.jar
│       │   └── gradle-enterprise-maven-extension-1.18.4.jar
│       ├── maven.sh
│       ├── paths.sh
│       ├── project.sh
│       └── summary.sh
├── mapping.example
└── network.settings

build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
Copy link
Member

@etiennestuder etiennestuder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I left some comments for polishing.

build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Show resolved Hide resolved
build.gradle.kts Show resolved Hide resolved
components/scripts/lib/build-scan-offline.sh Outdated Show resolved Hide resolved
Copy link
Member

@etiennestuder etiennestuder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, Sorin.

build.gradle.kts Outdated Show resolved Hide resolved
@erichaagdev
Copy link
Member

Successfully ran the below experiments at commit 0e2028a.

./01-validate-incremental-building.sh -r git@github.com:gradle/gradle-build-scan-quickstart.git -c 710a21dad423192a0ea2d9aea77f381f40eb8a6a -t 'build' -s https://ge.solutions-team.gradle.com
./02-validate-local-build-caching-same-location.sh -r git@github.com:gradle/gradle-build-scan-quickstart.git -c 710a21dad423192a0ea2d9aea77f381f40eb8a6a -t 'build' -s https://ge.solutions-team.gradle.com
./03-validate-local-build-caching-different-locations.sh -r git@github.com:gradle/gradle-build-scan-quickstart.git -c 710a21dad423192a0ea2d9aea77f381f40eb8a6a -t 'build' -s https://ge.solutions-team.gradle.com

./01-validate-local-build-caching-same-location.sh -r git@github.com:gradle/maven-build-scan-quickstart.git -c feb731de5b279d3a941f81fb3d1845ec0405388b -g 'verify' -s https://ge.solutions-team.gradle.com
./02-validate-local-build-caching-different-locations.sh -r git@github.com:gradle/maven-build-scan-quickstart.git -c feb731de5b279d3a941f81fb3d1845ec0405388b -g 'verify' -s https://ge.solutions-team.gradle.com

@erichaagdev
Copy link
Member

When I invoke a script I get this right at the start:

image

Message:

/Users/eric/Projects/gradle/gradle-enterprise-gradle-build-validation/local/lib/scripts/exit-code.sh: line 3: SUCCESS: readonly variable

To reproduce it, just run:

./01-validate-incremental-building.sh \
  -r git@github.com:gradle/gradle-build-scan-quickstart.git \
  -c 710a21dad423192a0ea2d9aea77f381f40eb8a6a \
  -t 'build' \
  -s https://ge.solutions-team.gradle.com

@erichaagdev
Copy link
Member

This is probably an issue with the jar, but I noticed this in debug mode:

image

@jthurne jthurne self-assigned this May 9, 2024
@jthurne
Copy link
Member

jthurne commented May 9, 2024

When I invoke a script I get this right at the start:

image

Message:

/Users/eric/Projects/gradle/gradle-enterprise-gradle-build-validation/local/lib/scripts/exit-code.sh: line 3: SUCCESS: readonly variable

To reproduce it, just run:

./01-validate-incremental-building.sh \
  -r git@github.com:gradle/gradle-build-scan-quickstart.git \
  -c 710a21dad423192a0ea2d9aea77f381f40eb8a6a \
  -t 'build' \
  -s https://ge.solutions-team.gradle.com

Fixed in 9fadce5

Copy link
Member

@erichaagdev erichaagdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good and works. Approved, but there is still this one unresolved comment: https://github.com/gradle/gradle-enterprise-build-validation-scripts/pull/487/files#r1595971133

jthurne and others added 9 commits May 10, 2024 11:47
…eparate jar

`lib/develocity` contains the proprietary code

`lib/third-party` contains the third-party open source libraries.
  In this commit, all OSS libraries are contained in a single jar.
Resolve build scan summary dependencies
build.gradle.kts Outdated Show resolved Hide resolved
Co-authored-by: Eric Haag <ehaag@gradle.com>
Signed-off-by: Sorin Florea <sorin.florea.v@gmail.com>
@erichaagdev
Copy link
Member

Did some testing and all looks good up to this point. Each distribution has their respective license and scripts are working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants