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

Adding Develocity input actions #244

Merged
merged 10 commits into from
Jun 13, 2024
Merged

Adding Develocity input actions #244

merged 10 commits into from
Jun 13, 2024

Conversation

cdsap
Copy link
Member

@cdsap cdsap commented Jun 12, 2024

Adding Develocity input actions.

If an input is configured in the action, it will generate the environment variable, example:

    - name: Setup Gradle
      uses: gradle/actions/setup-gradle@v3
      with:
        develocity-injection-enabled: true
        develocity-url: https://develocity.your-server.com
        develocity-plugin-version: 3.17.4

    - name: Run a Gradle build with Develocity injection enabled from input actions
      run: ./gradlew build

This configuration will create the environment variables:

DEVELOCITY_INJECTION_ENABLED=true
DEVELOCITY_URL=https://develocity.your-server.com
DEVELOCITY_PLUGIN_VERSION=3.17.4

Relation variable-input available:

Variable Input
DEVELOCITY_INJECTION_ENABLED develocity-injection-enabled
DEVELOCITY_URL develocity-url
DEVELOCITY_ALLOW_UNTRUSTED_SERVER develocity-allow-untrusted-server
DEVELOCITY_CAPTURE_FILE_FINGERPRINTS develocity-capture-file-fingerprints
DEVELOCITY_ENFORCE_URL develocity-enforce-url
DEVELOCITY_PLUGIN_VERSION develocity-plugin-version
DEVELOCITY_CCUD_PLUGIN_VERSION develocity-ccud-plugin-version
GRADLE_PLUGIN_REPOSITORY_URL gradle-plugin-repository-url
GRADLE_PLUGIN_REPOSITORY_USERNAME gradle-plugin-repository-username
GRADLE_PLUGIN_REPOSITORY_PASSWORD gradle-plugin-repository-password

@cdsap cdsap marked this pull request as ready for review June 12, 2024 17:45
@cdsap cdsap requested a review from bigdaz June 12, 2024 17:46
Copy link
Member

@bigdaz bigdaz left a comment

Choose a reason for hiding this comment

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

When I performed a proper review, I found some minor code issues. So I've requested these be fixed, plus some documentation updates.
Thanks!

sources/src/configuration.ts Outdated Show resolved Hide resolved
sources/src/configuration.ts Outdated Show resolved Hide resolved
docs/setup-gradle.md Outdated Show resolved Hide resolved
docs/setup-gradle.md Outdated Show resolved Hide resolved
.github/workflows/integ-test-inject-develocity.yml Outdated Show resolved Hide resolved
@cdsap cdsap requested a review from bigdaz June 13, 2024 18:11
@@ -369,3 +369,15 @@ function getBooleanInput(paramName: string, paramDefault = false): boolean {
}
throw TypeError(`The value '${paramValue} is not valid for '${paramName}. Valid values are: [true, false]`)
}

function getMaybeBooleanInput(paramName: string): boolean | undefined {
Copy link
Member

Choose a reason for hiding this comment

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

This should return a TypeError for any value besides '', 'false' or 'true'. I'll fix this.

@bigdaz bigdaz merged commit d0a116f into gradle:main Jun 13, 2024
63 checks passed
@bigdaz bigdaz modified the milestones: v3.4, v3.3.2, v3.4.0 Jun 13, 2024
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

2 participants