A step definition file is a yaml
copy file following the GitHub steps specification, with two extensions. First, it must have exactly one top-level key named steps:
copy. Additionally, the file may use SkyLounge parameters. A step definition may contain one or more steps.
The example below shows an excerpt from a gradlew
copy build step, with a SkyLounge parameter specifying the java-version
copy.
---
Path: <your-organization>/skylounge-library/steps/gradlew/build/step.yml
---
steps:
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: "liberica"
java-version: ((jvm_version))
cache: "gradle"
- name: Unit test
run: ./gradlew test
- name: Build Jar
run: ./gradlew assemble
copy
Steps should be stored in your skylounge-library
copy in the steps directory.
Parameter documentation
Additionally, you need to provide a file named params.yml
copy in the same directory as the step.yml
copy. This file is used when generating a skylounge.yml
copy based on a blueprint profile. The file documents the parameters in the job definition for developer consumption and will be inserted into generated skylounge.yml
copy. The file starts with a single key params
copy.
Below is an example params.yml
copy for our sample step above:
params:
jvm_version: # The JVM version to use
copy