Kork Library

Kork is a common library used across multiple Spinnaker components.

Introduction

Kork is a common library used across multiple Spinnaker components. A component uses a specific version of Kork depending on the last time that component’s spinnaker-dependencies version was updated. This guide is meant for developers who need to make changes to Kork, test those changes locally in the component that relies on those changes, and deploy those changes once they’ve been submitted.

Local development cycle

Kork

  1. Make desired changes to kork module locally.
  2. Invoke $ ./gradlew -PenablePublishing=true -Pversion=0.1.0-SNAPSHOT publishToMavenLocal.
  3. Make note of the version:
  1. $ ./gradlew -PenablePublishing=true publishToMavenLocal
  2. Inferred project: kork, version: 0.1.0-SNAPSHOT

Component (Gate, Orca, Clouddriver, etc.)

With Kork now in your local maven repository (~/.m2/ by default), we must make the component pickup this new version.

  1. In the component’s build.gradle file, add the following inside the allprojects block:
  1. repositories {
  2. mavenLocal()
  3. }
  1. Inside the allprojects.configurations.all.resolutionStrategy block, add this, replacing the version with the version printed from the publishToMavenLocal task:

    1. eachDependency {
    2. if (it.requested.group == 'io.spinnaker.kork') it.useVersion '0.1.0-SNAPSHOT'
    3. }
  2. Voila! The component now uses your locally source, hand-crafted, artisan Kork library!

Release process

Kork

  1. Create and submit a PR for your Kork changes.
  2. Create a new Kork release that follows the version naming convention. Make note of this version number.
  3. Monitor the Travis CI build and confirm the new packages have been deployed to Bintray .

Spinnaker-dependencies

  1. Create and submit a new PR to the spinnaker-dependencies.yml file that updates the Kork library to your new version.
  2. Create a new spinnaker-dependencies release that follows the version naming convention. Again, make note of this version number.
  3. Monitor the Travis CI build and confirm the new packages have been deployed to Bintray .

Component

  1. Edit your component’s build.gradle file to update the allprojects.spinnaker.depenciesVersion to the newly released spinnaker-dependencies version.

    1. spinnaker {
    2. dependenciesVersion = "0.34.0"
    3. }
  2. Build and test locally to ensure all of the new library versions pulled in haven’t broken anything

    1. $ ./gradlew test
  3. Create a submit a PR to the component that includes bumping this version number and any build/test fixes.

  4. Create and submit a PR for the feature that relied on the Kork changes.

Last modified February 17, 2022: Update instructions to build and use kork in local development. (#181) (cbb30bf)