Skip to content

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!

@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
@bigdaz bigdaz modified the milestones: v3.4, v3.3.2, v3.4.0 Jun 13, 2024
eduardbosch-jt pushed a commit to jobandtalent/gradle-actions that referenced this pull request May 30, 2025
Adding Develocity input actions. 

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

```yaml
    - 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
|
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.

2 participants