Skip to content

Zylquinal/cucumber-for-java

Repository files navigation

Cucumber for Java (Fast)

Environment variables

Some values used for the Gradle configuration shouldn't be stored in files to avoid publishing them to the Version Control System.

To avoid that, environment variables are introduced, which can be provided within the Run/Debug Configuration within the IDE, or on the CI – like for GitHub: ⚙️ Settings > Secrets and variables > Actions.

Environment variables used by the current project are related to the plugin signing and publishing.

Environment variable name Description
PRIVATE_KEY Certificate private key, should contain: -----BEGIN RSA PRIVATE KEY----- ... -----END RSA PRIVATE KEY-----
PRIVATE_KEY_PASSWORD Password used for encrypting the certificate file.
CERTIFICATE_CHAIN Certificate chain, should contain: -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----
PUBLISH_TOKEN Publishing token generated in your JetBrains Marketplace profile dashboard.

Predefined Run/Debug configurations

Within the default project structure, there is a .run directory provided containing predefined Run/Debug configurations that expose corresponding Gradle tasks:

Run/Debug configurations

Configuration name Description
Run Plugin Runs :runIde IntelliJ Platform Gradle Plugin task. Use the Debug icon for plugin debugging.
Run Tests Runs :test Gradle task.
Run Verifications Runs :verifyPlugin IntelliJ Platform Gradle Plugin task to check the plugin compatibility against the specified IntelliJ IDEs.

Continuous integration

In the .github/workflows directory, you can find definitions for the following GitHub Actions workflows:

  • Build
    • Triggered on push and pull_request events.
    • Runs the Gradle Wrapper Validation Action to verify the wrapper's checksum.
    • Runs the verifyPlugin and test Gradle tasks.
    • Builds the plugin with the buildPlugin Gradle task and provides the artifact for the next jobs in the workflow.
    • Verifies the plugin using the IntelliJ Plugin Verifier tool.
    • Prepares a draft release of the GitHub Releases page for manual verification.
  • Release
    • Triggered on released event.
    • Updates CHANGELOG.md file with the content provided with the release note.
    • Signs the plugin with a provided certificate before publishing.
    • Publishes the plugin to JetBrains Marketplace using the provided PUBLISH_TOKEN.
    • Sets publish channel depending on the plugin version, i.e. 1.0.0-beta -> beta channel.
    • Patches the Changelog and commits.
  • Run UI Tests
    • Triggered manually.
    • Runs for macOS, Windows, and Linux separately.
    • Runs runIdeForUiTests and test Gradle tasks.
  • Template Cleanup
    • Triggered once on the push event when a new template-based repository has been created.
    • Overrides the scaffold with files from the .github/template-cleanup directory.
    • Overrides JetBrains-specific sentences or package names with ones specific to the target repository.
    • Removes redundant files.

All the workflow files have accurate documentation, so it's a good idea to take a look through their sources.